From: Tu, Truong Date: Wed, 23 May 2012 20:46:24 +0000 (-0700) Subject: "Initial commit to Gerrit" X-Git-Tag: "1.14.21-05232012"^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21f1c0141a923124e37d297a99ba083149044eaf;p=profile%2Fivi%2Flibgsf.git "Initial commit to Gerrit" --- diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..8c9e2c2 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,2 @@ +Jody Goldberg +Manuel Mausz diff --git a/BUGS b/BUGS new file mode 100644 index 0000000..abaf367 --- /dev/null +++ b/BUGS @@ -0,0 +1,23 @@ +General + - Can we buffer things to support sequential access only ? + +gsf-output-stdio.c: + +1. We require write permission in the target directory. + +2. A "chdir" between open and close might move the file! + +3. Changing the directory structure between open and close might + produce interesting effects. + +4. If the target file is multiple (hard) linked, the file will + be unlinked. (Thus, the other "copies" will not change.) + +5. If the target file is owned by someone else, we will most + likely take ownership. + +6. Race conditions (inter-process and inter-thread) all over. + +OLE2 + Properties + - in/out support for blobs and storages diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..b578119 --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 St, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/COPYING.LIB b/COPYING.LIB new file mode 100644 index 0000000..6e46c8b --- /dev/null +++ b/COPYING.LIB @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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 Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + 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 Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +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 and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +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 other code 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. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + 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, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser 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 combine 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) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) 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. + + d) 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. + + e) 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 materials to be 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 with +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 Lesser 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 + + 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. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..a50face --- /dev/null +++ b/ChangeLog @@ -0,0 +1,5445 @@ +2011-05-20 Morten Welinder + + * Release 1.14.21 + +2011-05-10 Andreas J. Guelzow + + * gsf/gsf-opendoc-utils.c (get_gsf_odf_version_string): bump to 1.2 + (get_gsf_odf_version): bump to 1.2 + +2011-05-09 Andreas J. Guelzow + + * gsf/gsf-opendoc-utils.c (od_meta_user_defined): check for all ODF defined + value types and use the correct attribute name + (meta_write_props): use the correct attribute name + +2011-05-09 Andreas J. Guelzow + + * gsf/gsf-opendoc-utils.c (od_meta_user_defined): initialize type + and name. + +2011-05-02 Jean Brefort + + * gsf/gsf-impl-utils.h: fix GSF_DYNAMIC_CLASS_FULL to make gcc-4.6 happy. + +2011-04-05 Morten Welinder + + * Makefile.am: ${ACLOCAL_FLAGS}, not $(ACLOCAL_FLAGS) which seems + to matter to Gentoo. Fixes #645777. + +2011-03-28 Morten Welinder + + * configure.in: Implement --without-gconf (as opposed to looking + for gconftool-2. + +2011-03-24 Morten Welinder + + * Release 1.14.20 + +2011-03-24 Morten Welinder + + * configure.in: Post-release bump. + +2011-03-11 Morten Welinder + + * gsf/gsf-opendoc-utils.c (od_meta_user_defined_end): Create a + value of the requested type. + (od_meta_user_defined): Handle the meta:type attribute. + (GsfOOMetaIn): Add new member "typ". + (meta_write_props): Fix typo. + +2010-12-17 Morten Welinder + + * tests/test-outmem-printf.c (test): Attempt a leak fix. + +2010-11-10 Morten Welinder + + * gsf/gsf-msole-utils.c (msole_prop_parse): Handle NULL error + message without crashing. [#634435] Patch by Caolan McNamara. + +2010-09-25 Morten Welinder + + * configure.in: Post-release bump. + +2010-09-25 Morten Welinder + + * Release 1.14.19 + +2010-09-25 Morten Welinder + + * gsf/gsf-libxml.c (gsf_xml_in_start_element): Don't complain over + elements in unknown namespaces. + +2010-09-15 Andreas J. Guelzow + + * gsf/gsf-opendoc-utils.c (gsf_ooo_ns): add another one of OOo's + namespaces + * gsf/gsf-opendoc-utils.h: add new enum value to support above + name spaces) + +2010-08-28 Morten Welinder + + * gsf/gsf-impl-utils.h (GSF_CLASS_FULL): Don't use C89 argument + lists. + + * gsf/gsf-output-bzip.c (gsf_output_bzip_close): Rework previous + change. We do not want two prototypes. + +2010-08-15 Andreas J. Guelzow + + * gsf/gsf-opendoc-utils.c (gsf_ooo_ns): add some more of OOo's + namespaces + * gsf/gsf-opendoc-utils.h: add new enum values to support above + name spaces) + * gsf/gsf-output-bzip.c (gsf_output_bzip_close): quieten compile + +2010-07-28 Morten Welinder + + * gsf/gsf-utils.c (gsf_debug_flag): New function. + + * gsf/gsf-libxml.c (gsf_xml_in_start_element): Don't complain over + missing namespace uris unless a debug flag is set. + +2010-04-07 Morten Welinder + + * configure.in: Post-release-bump. + +2010-04-07 Morten Welinder + + * Release 1.14.18 + +2010-04-06 Morten Welinder + + * gsf/gsf-outfile-zip.c (zip_header_write, zip_dirent_write): Use + dirent->flags for consistency. Fixes #614968. + (zip_dirent_update_flags): New function. + (zip_dirent_new_out): Deduce dirent->flags. + + * gsf/gsf-infile-zip.c (zip_dirent_new_in): Read dirent->flags. + +2010-04-05 Morten Welinder + + * gsf/gsf-libxml.c (gsf_xml_out_add_cstr): Fix win32 warning about + format. + +2010-02-13 Morten Welinder + + * configure.in: Post-release-bump. + +2010-02-13 Morten Welinder + + * Release 1.14.17 + +2009-11-18 Morten Welinder + + * gsf/gsf-doc-meta-data.c (gsf_doc_meta_data_foreach): Sort the + key-value pairs. + +2009-11-17 Andreas J. Guelzow + + * autogen.sh: allow dirs on PATH to have spaces withou causing warning + +2009-10-29 Morten Welinder + + * gsf/gsf-libxml.c (gsf_xml_probe_element): Fix crash on documents + like + +2009-10-11 Morten Welinder + + * Release 1.14.16 + +2009-09-25 Morten Welinder + + * thumbnailer/main.c (call_convert): Use gdk_pixbuf if available. + +2009-09-25 Morten Welinder + + * configure.in (libgsf_gnome_reqs): Remove gnome-vfs stuff. + Fixes #593480 + +2009-09-22 Andreas J. Guelzow + + * gsf/gsf-opendoc-utils.c (gsf_ooo_ns): add variant of OO_NS_FIELD + +2009-08-20 Morten Welinder + + * gsf/gsf-libxml.c (gsf_xml_in_start_element): Complain to stderr, + not stdout. Fixes #592471. + +2009-06-20 Morten Welinder + + * configure.in: Post-release-bump. + +2009-06-20 Morten Welinder + + * Release 1.14.15 + +2009-06-17 Morten Welinder + + * gsf/gsf-msole-utils.c (msole_prop_parse): Use gsf_timestamp_new + and gsf_timestamp_set_time. + + * gsf/gsf-timestamp.c (gsf_timestamp_from_string): Improve error + checking. + (gsf_timestamp_set_time): New function. + (gsf_timestamp_new): New function. + +2009-06-05 Morten Welinder + + * gsf/gsf-msole-utils.c (msole_prop_parse): If parsing fails, + don't return a bogus value. Fixes #584848. + +2009-05-26 Andreas J. Guelzow + + * gsf/gsf-opendoc-utils.h (gsf_odf_version): deleted + (gsf_odf_version_string): deleted + (get_gsf_ooo_ns): new + (get_gsf_odf_version_string): new + (get_gsf_odf_version): new + +2009-05-25 Andreas J. Guelzow + + * gsf/gsf-opendoc-utils.[ch]: replace GSF_ODF_VERSION with a variable + +2009-05-25 Andreas J. Guelzow + + * gsf/gsf-opendoc-utils.[ch]: replace GSF_ODF_VERSION_STRING with the + varaible gsf_odf_version_string and turn GSF_ODF_VERSION into an + enum. + +2009-05-24 Andreas J. Guelzow + + * gsf/gsf-opendoc-utils.c (gsf_opendoc_metadata_write): use + GSF_ODF_VERSION_STRING + * gsf-opendoc-utils.h (GSF_ODF_VERSION): new and bump to 1.1 + (GSF_ODF_VERSION_STRING): new + +2009-05-23 Morten Welinder + + * configure.in: Psot-release bump. + +2009-05-23 Morten Welinder + + * Release 1.14.14 + +2009-05-16 Andreas J. Guelzow + + * gsf/gsf-opendoc-utils.h: add namespace enumeration constant for + new OOo and Gnumeric namespaces + * gsf/gsf-opendoc-utils.c (gsf_ooo_ns): add new namespaces for OOo + and Gnumeric + +2009-05-13 Andreas J. Guelzow + + * gsf/gsf-libxml.c (gsf_xml_out_start_element): remove erroneous + g_return_if_fail. Note that some part of the code specifically + handles that situation. + (close_tag_if_neccessary): If we are in GSF_XML_OUT_CHILD we need + not close the tag + +2009-05-10 Andreas J. Guelzow + + * gsf/gsf-opendoc-utils.h: add namespace enumeration constant for + MSOXL + * gsf/gsf-opendoc-utils.c (gsf_ooo_ns): add namespace for MSOXL + +2009-05-10 Andreas J. Guelzow + + * gsf/gsf-opendoc-utils.c (gsf_opendoc_meta_dtd): scan meta's + children for more namespaces to handle CleverAge's files. + +2009-05-10 Andreas J. Guelzow + + * gsf/gsf-opendoc-utils.h: add more new namespace enumeration + constants + * gsf/gsf-opendoc-utils.c (gsf_ooo_ns): add more new namespaces + +2009-05-10 Andreas J. Guelzow + + * gsf/gsf-opendoc-utils.h: add new namespace enumeration + constants + * gsf/gsf-opendoc-utils.c (gsf_ooo_ns): add new namespaces + +2009-05-06 Morten Welinder + + * configure.in : post release bump + +2009-05-06 Morten Welinder + + * Release 1.14.13 + +2009-05-06 Andreas J. Guelzow + + Fixes #581530 + * gsf/gsf-opendoc-utils.c (gsf_opendoc_meta_dtd): split into + gsf_opendoc_meta_dtd and gsf_opendoc_meta_st_dtd + (gsf_opendoc_metadata_subtree_free): free the state not the doc + (gsf_opendoc_metadata_subtree): use your own dtd + (gsf_opendoc_metadata_subtree_internal): new + +2009-04-28 Emmanuel Pacaud + + Add doap file. + +2009-04-25 Morten Welinder + + * configure.in : post release bump + +2009-04-25 Morten Welinder + + * Release 1.14.12 + +2009-04-25 Morten Welinder + + * gsf/gsf-input-memory.c (gsf_input_memory_new_clone): Fix + preconditions. Always allocate at least one byte. Avoid cast. + Fixes #580228. + +2009-04-17 Morten Welinder + + * gsf/gsf-output.c (gsf_output_set_error): Fix allocation method + problem for errors. Fixes #579155. + +2009-04-15 Morten Welinder + + * gsf/gsf-infile-msole.c (gsf_infile_msole_new_child): Fix a + couple of warnings. + +2009-04-13 Andreas J. Guelzow + + * gsf/gsf-opendoc-utils.c (GsfOOMetaIn): added field + (od_meta_user_defined): implement + (od_meta_user_defined_end): new + (gsf_opendoc_meta_dtd): handle "user-defined" completely + (gsf_opendoc_metadata_read): initialize state.name + +2009-04-11 Jody Goldberg + + * gsf/gsf-libxml.c (lookup_child) : handle namespace uri being + declared as both default and explict prefix. + +2009-02-07 Morten Welinder + + * configure.in (bonobo): auto-detect. + +2009-02-19 Jody Goldberg + + * gsf/gsf.h : document the members of timestamp to avoid gtk-doc + warnings. + + * gsf/gsf-timestamp.c (gsf_timestamp_from_string) : renamed from. + (gsf_timestamp_parse) : here, and this is deprecated. + +2009-02-18 Jody Goldberg + + * gsf/gsf-infile-msole.c (gsf_infile_msole_new_child) : Handle + small-block files that are not block aligned. [#572290] + +2009-02-04 Morten Welinder + + * gsf/gsf-libxml.c (gsf_xml_out_add_cstr): Drop characters that + xml 1.0 cannot represent. Bandaids #568919. + +2009-01-30 J.H.M. Dassen (Ray) + + * gsf/gsf-output-csv.c (gsf_output_csv_quoting_mode_get_type): + Declare "values" as static, as the second argument to + g_enum_register_static may not be stack-allocated, because GObject + keeps a reference to the data. This fixes a problem generating the + documentation in some environments; see + http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015 . + +2009-01-26 Morten Welinder + + * gsf/gsf-libxml.c (gsf_xml_in_characters): Handle the case where + we get here without being initialized. See 568994. + (gsf_xml_in_end_document): Mark ourselves uninitialized here. + +2009-01-06 Jody Goldberg + + * configure.in : post release bump + +2009-01-06 Jody Goldberg + + * Release 1.14.11 + +2009-01-02 Jody Goldberg + + * gsf/gsf-open-pkg-utils.c (gsf_open_pkg_open_rel) : clean up the + logic to handle rels with empty components, leading '/', or '.' + to deal with POI generated files. + +2008-12-25 Morten Welinder + + * configure.in (statfs): Fix detection for Darwin. Fixes #565603. + + * gsf-gnome/gsf-input-gnomevfs.h, gsf-gnome/gsf-output-gnomevfs.h: + Fix compilation in gnome case. Fixes #565605. + +2008-12-24 Morten Welinder + + * gsf/gsf-input-gio.c (make_local_copy): Use larger buffer. + (gsf_input_gio_new, gsf_input_gio_new_for_path, + gsf_input_gio_new_for_uri): Use g_return_val_if_fail as + appropriate. + + * gsf/gsf-input-stdio.c (make_local_copy): New function. + (gsf_input_stdio_new, gsf_input_stdio_new_FILE): Use + make_local_copy for non-regular files. + +2008-12-14 Morten Welinder + + * */*.c: Clean up glib includes. Patch from Pedro Fragoso. Fixes + #564004. + +2008-11-23 Jody Goldberg + + * gsf/gsf-utils.c (DllMain): glib-2.18 deprecated + G_WIN32_DLLMAIN_FOR_DLL_NAME, create a DllMain ourselves to + capture the dll handle. + (gsf_init): use it here with + g_win32_get_package_installation_directory_of_module. + + * configure.in : add MSGs for the preceding bz2 test. + +2008-11-23 Jody Goldberg + + From : Richard W.M. Jones + * configure.in : AC_CHECK_LIB doesn't work with the Windows port + of libbz2 because dnl it uses the __stdcall calling convention. + +2008-11-08 Morten Welinder + + * gsf/gsf-output-bzip.c: Pretend to use args in the + don't-have-bzip case. + * gsf/gsf-intput-bzip.c: Pretend to use args in the + don't-have-bzip case. + +2008-11-05 Morten Welinder + + * */*.c: Fix problem with formats. Based on patch from Hib Eris, + #559291. + +2008-10-30 Morten Welinder + + * gsf/gsf-output-stdio.c (rename_wrapper): Only use statfs if it + is the expected two-argument kind. Fixes #558253. + +2008-10-23 J.H.M. Dassen (Ray) + + * gsf/gsf-utils.c: Natural endian doubles aren't just used on VFP + enabled ARM, but on ARM with EABI as well. Adjust the logic for + defining G_FLOAT_BYTE_ORDER accordingly. Patch courtesy of Riku Voipio + . (Debian #503144) + +2008-10-19 Jody Goldberg + + * Release 1.14.10 + +2008-10-17 Andreas J. Guelzow + + * gsf-gnome/gsf-input-gnomevfs.h: add #define if + LIBGSF_GNOMEVFS_VIA_GIO is defined + +2008-10-17 Morten Welinder + + * gsf-gnome/Makefile.am: Don't compile the gnomevfs part unless + asked to. + +2008-10-16 Morten Welinder + + * configure.in: Define LIBGSF_GNOMEVFS_VIA_GIO via command line, + if needed. + * gsf-gnome/gsf-output-gnomevfs.h: Don't include config file. Get + LIBGSF_GNOMEVFS_VIA_GIO from command line. + * gsf-gnome/gsf-input-gnomevfs.h: Ditto. + +2008-10-05 Morten Welinder + + * gsf/gsf-infile-msole.c (ole_info_read_metabat): Use g_warning, + not g_return_val_if_fail. Fixes #554848. + +2008-09-28 Morten Welinder + + * tools/gsf.c (ls_R): Handle NULL children. Fixes #553861. + +2008-09-24 Morten Welinder + + * gsf/gsf-infile-tar.c (unpack_octal): Add error check. Fixes + #553655. + + * tools/gsf.c (open_archive): Also try tar file format. + + * gsf/gsf-infile-tar.[ch]: New files. + +2008-09-14 Gil Forcada + + * configure.in: + * po/LINGUAS: + Added support for po/LINGUAS file, closing #551577. + +2008-09-12 Jody Goldberg + + * gsf/gsf-msole-utils.c (gsf_msole_iconv_get_codepage_string_list) : + We intentionally fallthrough to the next case. + +2008-09-11 Jody Goldberg + + * gsf/gsf-msole-utils.c (msole_prop_read) : local variable shadowed a + poorly named parameter. It wasn't a bug, but it can't hurt to fix + it. [Coverity #189] + +2008-09-10 Jody Goldberg + + * gsf/gsf-output.c (gsf_output_real_vprintf) : add va_end after the + G_VA_COPY. [Coverity #250] + * gsf/gsf-output-memory.c (gsf_output_memory_vprintf) : ditto. + [Coverity #251] + +2008-09-03 Morten Welinder + + * gsf/gsf-output-stdio.c (rename_wrapper): Work around sshfs + brokenness. Fixes #509883. + +2008-08-30 Jody Goldberg + + * configure.in : Post release bump + +2008-08-29 Jody Goldberg + + * Release 1.14.9 + +2008-08-28 Morten Welinder + + * configure.in (GNOMEVFS_REQ, BONOBO_REQ): Define as needed. + * libgsf-gnome-1.pc.in: Use the above. + +2008-08-28 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xml_in_doc_add_nodes) : new, split from + gsf_xml_in_doc_new to facilitate splitting node sets so that they + can be used in multiple situations. + +2008-08-24 Jody Goldberg + + * gsf/gsf-infile-msvba.c (gsf_input_find_vba) : move this here from + tools/gsf-vba-dump. + (gsf_infile_msvba_get_modules) : new. + (vba_extract_module_source) : store the code rather than dumping it to stdout. + + * tools/gsf-vba-dump.c (test) : use the new utilities. + (cb_dump_vba) : do the dumping here. + +2008-07-28 Hubert Figuiere + + * thumbnailer/gsf-office-thumbnailer.schemas.in: + * thumbnailer/main.c (zip_thumbnail): Add support for OpenPkg + (MS Office Open XML) thumbnailing. + +2008-07-19 Jody Goldberg + + * gsf/gsf-open-pkg-utils.c : Some components do not have relations. + Do not generate a warning. e.g. foreach_rel in an empty sheet. + +2008-07-18 Dominic Lachowicz + + * gsf/gsf-input-gio.c (gsf_input_gio_new): Don't leak @input if + we're going to make a local copy of the requested file + +2008-07-02 Morten Welinder + + * gsf-gnome/gsf-output-gnomevfs.c: Use gio, not gnomevfs, when + LIBGSF_GNOMEVFS_VIA_GIO is defined. + + * gsf-gnome/gsf-input-gnomevfs.c (gsf_input_gnomevfs_new, + gsf_input_gnomevfs_new_uri): Call gsf_input_gio_new_for_uri, not + gsf_input_gio_new_for_path. + +2008-07-01 Jody Goldberg + + * gsf/gsf-open-pkg-utils.c (gsf_open_pkg_open_rel) : make public. + (gsf_open_pkg_foreach_rel) : new. + +2008-06-30 Jody Goldberg + + * gsf/gsf-infile.c (gsf_infile_child_by_aname) : new. + (gsf_infile_child_by_vaname) : new. + +2008-06-13 Jody Goldberg + + * tests/test-msole1.c : + * tests/test-http.c : + * tests/test-zip1.c : + * tests/test-gzip1.c : + * tests/test-gzip2.c : + * tests/test-bzip.c : + * tests/test-msvba.c : Clear error after use in preparation for the + next file. + +2008-06-08 Kjartan Maraas + + * configure.in: Add nb to ALL_LINGUAS. + +2008-05-20 Tor Lillqvist + + * libgsf-zip.in: Message catalogs nowadays end up in share/locale + as they should, not lib/locale. + +2008-05-04 Jody Goldberg + + * tools/gsf-vba-dump.c (test) : support MS OOX. + +2008-04-13 Morten Welinder + + * gsf/gsf-utils.c (gsf_init): Run-time test for gsf_le_get_double. + Might save __arm__ people some head scratching. + +2008-04-09 Morten Welinder + + * configure.in: Reorganize gnome-vfs/bonobo checks. + + * gsf-gnome/gsf-input-gnomevfs.c (gsf_input_gnomevfs_new_uri): + Prepare for making this a simple wrapper over gio. + + * gsf/gsf-utils.c (gsf_base64_decode_step): Use + g_base64_decode_step when available. + (gsf_base64_encode_step): Use g_base64_encode_step when available. + (gsf_base64_encode_close): Use g_base64_encode_close when available. + +2008-03-17 Dominic Lachowicz + + * tests/Makefile.am: libgsf-gio-1.la doesn't exist any more + +2008-03-17 J.H.M. Dassen (Ray) + + * libgsf-gio-1.pc.in: No longer needed. + * configure.in, Makefile: Drop references to it. + +2008-03-16 Morten Welinder + + * gsf/Makefile.am: Don't install gio support in its own library. + +2008-03-06 J.H.M. Dassen (Ray) + + * doc/gsf-vba-dump.1: New. + +2008-03-14 Dominic Lachowicz + + * libgsf-gio-1.pc.in: + * tests/test-gio.c: + * tests/test-gvfs.c: + * tests/Makefile.am: + * gsf/gsf-output-gio.h: + * gsf/Makefile.am: + * gsf/gsf-input-gio.c: + * gsf/gsf-output-gio.c: + * gsf/gsf-input-gio.h: + * gsf-gvfs: + * configure.in: + * Makefile.am: + * libgsf-gvfs-1.pc.in: Migrate names from "gvfs" to "gio"; + move GIO code to gsf/ and get rid of gsf-gvfs/ + +2008-03-14 Dominic Lachowicz + + * gsf-gvfs/gsf-input-gvfs.c: + * gsf-gvfs/gsf-output-gvfs.c: g_file_new() functions cannot fail + +2008-03-14 Dominic Lachowicz + + * tests/Makefile.am: + * gsf-gvfs/gsf-input-gvfs.c: + * gsf-gvfs/gsf-output-gvfs.c: + * gsf-gvfs/gsf-input-gvfs.h: + * gsf-gvfs/gsf-output-gvfs.h: + * gsf-gvfs/Makefile.am: + * configure.in: + * Makefile.am: Update GIO backend to use glib 2.16's API + +2008-03-06 J.H.M. Dassen (Ray) + + * doc/gsf.1: Fixed typo in font setting. + * doc/gsf-office-thumbnailer.1, doc/gsf.1: Define .URL macro when not + already defined by the man implementation and use it for hyperlinks. + +2008-03-05 Morten Welinder + + * configure.in: Post release bump. + +2008-03-05 Morten Welinder + + * Release 1.14.8 + +2008-02-07 Morten Welinder + + * gsf/gsf-infile-msole.c (ole_dirent_new): Add new argument to + keep track of what entries we have seen before. All callers + changed. Check for loops. Handle overflow in block computation. + Fixes #513831. + (ole_init_info): Sanity check num_sbat too. + +2007-12-07 Jody Goldberg + * gsf/gsf-infile-msole.c (ole_make_bat) : be more forgiving of + failure. We do not need to abort completely on a cycle, just + truncate. + +2007-11-22 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xml_out_add_enum) : ref/unref the type class. + Peek does not seem sufficient to fully instantiate it. + +2007-11-10 Morten Welinder + + * tools/gsf.c (gsf_dump_props): Let 'gsf listprops archive' print + a list of properties. + (gsf_list_props): New function. + (gsf_help): Update accordingly. + + * gsf/gsf-msole-utils.c (msole_debug): New function. + (msole_prop_parse): Use msole_debug so we don't print scale + messages unless we want to. + +2007-11-02 Morten Welinder + + * gsf/gsf-output-csv.c (gsf_output_csv_set_sink): Allow setting a + NULL sink. + +2007-10-29 Morten Welinder + + * gsf/gsf-input-http.c (gsf_input_http_finalize): Let g_free + handle NULL. + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_finalize): Let + g_slist_free handle empty lists too. + +2007-10-27 Morten Welinder + + * gsf/gsf-msole-utils.c (msole_prop_parse): Improve sanity + checks. [#404934] + +2007-10-27 Jody Goldberg + + * gsf-win32/Makefile.am : Only install headers on win32. [#459771] + +2007-10-27 Jody Goldberg + + * gsf/gsf-opendoc-utils.c : Add + urn:oasis:names:tc:opendocument:xmlns:presentation:1.0 + +2007-10-15 Morten Welinder + + * gsf/gsf-msole-utils.c (gsf_msole_metadata_read): Sanity check + sections without hitting g_return_val_if_fail. Probably fixes + #485964. + +2007-09-25 Jody Goldberg + + * gsf/gsf-outfile-stdio.c (gsf_outfile_stdio_new_child) : use it for + standard children too. + +2007-09-19 Dom Lachowicz + + * gsf/gsf-outfile-stdio.c (gsf_outfile_stdio_new_child): Pass the va_list + to the child + +2007-09-07 Jody Goldberg + + * configure.in : post release bump + +2007-09-07 Jody Goldberg + + * Release 1.14.7 + +2007-09-07 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xml_out_start_element) : Good grief. + Overzealous renaming breaks all xml output. + +2007-09-04 Jody Goldberg + + * gsf/gsf-open-pkg-utils.c (gsf_outfile_open_pkg_add_extern_rel) : add + some docs. + + * gsf/gsf-libxml.c : s/xml/xout/ to placate gtk-doc. + +2007-09-03 Jody Goldberg + + * configure.in : post release bump + +2007-09-03 Jody Goldberg + + * Release 1.14.6 + +2007-08-30 Jody Goldberg + + * gsf/gsf-open-pkg-utils.c (gsf_outfile_open_pkg_relate) : handle + relative paths better. + (open_pkg_rel_begin) : init rel::is_extern. + (open_pkg_rel_begin) : parse and store TargetMode as is_extern. + (gsf_open_pkg_rel_is_extern) : new. + (gsf_open_pkg_rel_get_target) : new. + (gsf_open_pkg_rel_get_type) : new. + (gsf_open_pkg_lookup_rel_by_type) : new. + (gsf_open_pkg_lookup_rel_by_id) : new. + (gsf_open_pkg_open_rel_by_id) : renamed from ... + (gsf_open_pkg_get_rel_by_id) : which was deprecated because the name + was unclear. + (gsf_open_pkg_open_rel_by_type) : renamed from ... + (gsf_open_pkg_get_rel_by_type) : which was deprecated because the name + was unclear. + (GsfOutfileOpenPkgRel) : delete. + (gsf_outfile_open_pkg_close) : use straight GsfOpenPkgRel and export + the TargetMode for is_extern. + (gsf_outfile_open_pkg_create_rel) : new. + (gsf_outfile_open_pkg_add_extern_rel) : new. + + * gsf/gsf-libxml.c (gsf_xml_out_get_output) : new. + +2007-07-29 J.H.M. Dassen (Ray) + + * configure.in: Resync ALL_LINGUAS with po files. + +2007-07-24 Jody Goldberg + + From coverity + * gsf/gsf-msole-utils.c (cb_write_dict) : fix buffer overrun that + would overwrite a variable with itself +1 + +2007-07-22 Jody Goldberg + + * gsf/gsf-input-memory.c (gsf_input_memory_new_clone) : add some + safety checks against invalid parameters. + +2007-07-20 Dom Lachowicz + + * gsf-gvfs/gsf-input-gvfs.c: Make a local copy of the stream if it's not + seekable + * gsf-gvfs/gsf-output-gvfs.c: Use replace() instead of create() when creating + streams. create() won't overwrite an existing file. Document limitations + regarding seeking. + +2007-07-14 Jean Brefort + + * configure.in: always initialize have_gvfs. + +2007-07-12 Dom Lachowicz + + * gsf-gvfs/gsf-input-gvfs.c: + * gsf-gvfs/gsf-input-gvfs.h: + * gsf-gvfs/gsf-output-gvfs.c: + * gsf-gvfs/gsf-output-gvfs.h: + * gsf-gvfs/Makefile.am: + * libgsf-gvfs-1.pc.in: + * Makefile.am: + * configure.in: New GVFS-based backend + + * tests/test-gvfs.c: + * tests/Makefile.am: Small test harness for the new GVFS-based backend + +2007-07-10 Jody Goldberg + + * configure.in : post release bump + +2007-07-10 Jody Goldberg + + * Release 1.14.5 + +2007-07-05 Jody Goldberg + + * python/gsfmodule.c : warning suppression. + +2007-06-30 Jody Goldberg + + * gsf/gsf-output-csv.c (gsf_output_csv_quoting_mode_get_type) : missed + converting this back from a dynamic type. + +2007-06-30 Jody Goldberg + + * gsf/gsf-open-pkg-utils.c (gsf_outfile_open_pkg_set_sink) : fix a doc + build error. + +2007-06-30 Jody Goldberg + + * configure.in : fix --without-bonobo case in the --without-gnome + case. [#4488842] + +2007-06-30 Jody Goldberg + + * thumbnailer/Makefile.am : Work even if gconf macros are not + installed. + * configure.in : ditto. + +2007-06-30 Jody Goldberg + + * *.[ch] (*register_type) : back out the move to dynamic types. + They have significant problems with threads. [#450722] + Which also patches a compilation glitch on windows. [#449807] + +2007-06-19 J.H.M. Dassen (Ray) + + * doc/Makefile.am: Add gsf.1 to manpage_DATA. + +2007-06-18 Jody Goldberg + + * configure.in : post release bump. + +2007-06-18 Jody Goldberg + + * Release 1.14.4 + +2007-06-13 Jody Goldberg + + * gsf/gsf-impl-utils.h (GSF_PARAM_STATIC) : deprecate in favour of + glib's G_PARAM_STATIC_STRINGS. + (GSF_DYNAMIC_CLASS_FULL) : No need to add a reloc by making the type + info static. + (GSF_DYNAMIC_INTERFACE_FULL) : ditto. + +2007-06-11 Morten Welinder + + * gsf/gsf-input-gzip.c (GsfInputGZip): Use gsf_off_t for + header_size and trailer_size to kill warnings. + + * gsf/gsf-input.c (gsf_input_read): Fix warning. + + * gsf-gnome/gsf-input-bonobo.c (gsf_input_bonobo_read): Fix printf + size mismatch. + +2007-06-10 Jody Goldberg + + * gsf/gsf-open-pkg-utils.c : Move over from gnumeric. + * po/POTFILES.in : Add the new code. + +2007-06-10 Jody Goldberg + + * configure.in : Add a test for setrlimit. + * thumbnailer/main.c : use it here, just in case. + +2006-12-21 Federico Mena Quintero + + https://bugzilla.novell.com/show_bug.cgi?id=229609 - Limit the + resource consumption of the helper process in gsf-office-thumbnailer. + + * thumbnailer/main.c (set_resource_limits): New function. We use + setrlimit() to put a cap on how much resources the helper process + can use, as convert(1) is known to leak tons of memory and CPU on + certain WMF files. + (main): Call set_resource_limits(). + +2007-06-10 Jody Goldberg + + * doc/gsf-sections.txt : Add the dynamic _register_type functions, and + the new nano-http class. + +2007-06-10 Jody Goldberg + + * gsf/gsf-utils.c (gsf_init_dynamic) : register the new input type. + + From : Michael Lawrence [#362373] + * gsf/gsf-input-http.[ch] : provide a nano-http (from libxml2) + input wrapper. + * tests/test-http.c : add. + +2007-06-10 Jody Goldberg + + From : Eduardo Limo [#442205] + * configure.in : Make bonobo support optional, but enabled by default. + * gsf-gnome/Makefile.am : Use the new configure flag here. + +2007-06-10 Jody Goldberg + + * m4/Makefile.am : new. + * configure.in : Add it. + * Makefile.am : handle m4 as a subdir rather than in EXTRA_DIST to + avoid distcheck failure. + +2007-04-08 J.H.M. Dassen (Ray) + + * doc/gsf.1: New. + * gsf/gsf-meta-names.h, gsf/gsf.h, gsf/gsf-impl-utils.h, + gsf/gsf-utils.h: Documentation work. + +2007-02-16 Jody Goldberg + + * tests/test-cp-zip.c (clone) : make more resistant to read failures. + +2007-01-23 Morten Welinder + + * configure.in (pygtk): Show result. + +2007-01-13 J.H.M. Dassen (Ray) + + * configure.in: Adjusted pkg-config requirements to reflect that + libgsf-gnome doesn't need libxml-2.0. + +2007-01-10 Morten Welinder + + * gsf/gsf-libxml.c (push_child, gsf_xml_in_end_element): Handle + nested contents. + +2006-12-17 Jody Goldberg + + * gsf/gsf-input-bzip.c : include gsf-input-impl.h + to suppress warning. + +2006-12-15 Dom Lachowicz + + * gsf/gsf-input-bzip.c: Set input name + * gsf/gsf-input-gzip.c: Ditto + * gsf/gsf-input-proxy.c: Ditto + * gsf/gsf-input-textline.c: Ditto + +2006-12-15 Dom Lachowicz + + * gsf/gsf-input-textline.c (gsf_input_textline_new): Set the input's + size based on its source sink's size. + +2006-12-10 Jody Goldberg + + Begin merging patch from Danny Milosavljevic (danny.milo@gmx.net) + * gsf/gsf-blob.c (gsf_blob_get_size) : constify. + (gsf_blob_peek_data) : constify. + +2006-12-09 J.H.M. Dassen (Ray) + + * gsf/gsf-output.h: Annotate GsfOutputClass.Vprintf with a format + attribute. + +2006-12-06 Morten Welinder + + * gsf/gsf-utils.c (gsf_mem_dump_full): Cleanup. (Avoid boundary + case problems and print line-by-line.) + + * gsf/gsf-output.c (gsf_output_real_vprintf): Do not reuse a + va_list argument. That does not work. + +2006-12-04 Morten Welinder + + * thumbnailer/main.c: Use g_printerr, not fprintf. That fixes + output in non-UTF8 locales. + + * configure.in (libgsf_reqs): Bump glib req to 2.8 for g_try_new. + + * gsf/gsf-infile-msole.c (ole_init_info): Use g_try_new, not + g_alloca. (And g_free the memory after use.) Fixes #381600. + + * gsf/gsf-output-csv.c (gsf_output_csv_write_field): Quote on + initial or terminal whitespace, see bug #359348. + +2006-12-02 Morten Welinder + + * gsf/gsf-infile-msole.c (ole_info_read_metabat): Advance bats in + the empty case too. Fixes #381588. + +2006-12-01 Christian Neumair + + * gsf/gsf-libxml.c: (gsf_xml_gvalue_from_str): + Handle types derived from G_TYPE_ENUM and G_TYPE_FLAGS correctly. + Bail if type was not handled. + +2006-11-20 Morten Welinder + + * gsf/gsf-libxml.c (gsf_xml_out_add_gvalue): Plug leak. + +2006-11-20 Jody Goldberg + + * doc/gsf-docs.sgml : Add some missing indicies. + * doc/Makefile.am : init with gsf_init + +2006-11-17 Jody Goldberg + + * gsf/*.[ch] : update copyrights + +2006-11-17 Jody Goldberg + + * gsf/*.[ch] : Make GTypes dynamic and enable gsf_init_dynamic + +2006-11-10 Jody Goldberg + + * tools/gsf-vba-dump.c : Handle vba in .doc too. + PPT is going to be more work. It seems to be embedded in the escher + stream as a compressed data blob. + +2006-11-09 Tor Lillqvist + + * libgsf-zip.in: Fix typo. + +2006-11-05 Jody Goldberg + + * configure.in : post release bump + +2006-11-05 Jody Goldberg + + * Release 1.14.3 + +2006-11-03 Jody Goldberg + + * gsf/gsf-msole-utils.c (gsf_msole_metadata_read) : add some debug + spew to help track the OOo prop warnings. Looks like an OOo + problem. + +2006-11-03 J.H.M. Dassen (Ray) + + * gsf/gsf-doc-meta-data.c (gsf_doc_prop_free), gsf/gsf-infile-ar.c + (ar_dirent_free), gsf/gsf-infile-msole.c (gsf_infile_msole_read), + gsf/gsf-input-textline.c (gsf_input_textline_finalize), gsf/gsf-input.c + (gsf_input_finalize), gsf/gsf-outfile-msole.c + (gsf_outfile_msole_finalize): simplified as g_free handles NULL + properly. Fixes #369663. + +2006-10-25 Jody Goldberg + + * gsf/gsf-opendoc-utils.c (meta_write_props) : clean up the code to + handle missing values and invalid properties. + +2006-10-24 Jody Goldberg + + * gsf/gsf-opendoc-utils.c (meta_write_props) : OLE2 stores a single + string, ODF stores a vector. + +2006-10-02 Jody Goldberg + + * configure.in : post release bump + +2006-09-26 Jody Goldberg + + * Release 1.14.2 + +2006-09-26 Morten Welinder + + * configure.in (test_python): Fix python tests. + +2006-09-24 Jody Goldberg + + Patch from Robert: + * autogen.sh : Check srcdir for the extra macros. + * python/Makefile.am : Include srcdir. + +2006-09-24 Jody Goldberg + + Patch from Ivan: + * configure.in : conditionalize the python checks. + +2006-09-23 Jody Goldberg + + * gsf/gsf-libxml.c (push_child) : Handle namespaces internally by id + rather than object pointer. We don't actually need the struct and + the code is simpler when using ids. + (lookup_child) : ditto. No need for a verbose warning if the document + does not yet define a namespace. + (gsf_xml_in_start_element) : warn when we find an unknown namespace uri. + (gsf_xml_in_doc_free) : now that we are using ids, the ns_by_id array + goes away. We did not really need it. + (gsf_xml_in_doc_new) : Get rid of ns_by_id and use ids directly. This + fixes support for multiple uris with the same id (common when + versioning) + (gsf_xml_in_doc_new) : Be sure to look up the parent of the e_node, + not the node already in the tree to fix the multple decl handling. + +2004-07-16 Stepan Kasal + + YES, 2004!. Commit an ancient patch that was forgotten. + + Cleanup of test-*msole*.c examples. + * tests/test-cp-msole.c: + * tests/test-dump-msole.c: + * tests/test-restore-msole.c: + * tests/test-msole1.c: + * tests/test-msole2.c: + * tests/test-msole-printf.c: + +2006-09-23 Jody Goldberg + + Patch from Frederic Peters : #354690 + * python/Makefile.am : Link to our version of libgsf, not the system. + +2006-09-18 Morten Welinder + + * gsf/gsf-input.c (gsf_input_uncompress): Use correct HAVE_ symbol + for bzip2 and fix typo. Fixes #356391. + +2006-09-06 Morten Welinder + + * gsf/gsf-infile-msole.c (ole_init_info): Silence a warning issued + for an only marginally bogus file. See bug 346118. + (ole_dirent_new): Always treat the root directory as a directory, + even if the file claims otherwise. See bug 346118. + + * tools/gsf.c (gsf_dump_props): Print proper filename in error + message. + +2006-08-28 Wouter Bolsterlee + + * thumbnailer/gsf-office-thumbnailer.schemas.in: Trivial + patch to install all the schemas in the correct place. + Fixes bug #353216. + +2006-08-20 Jody Goldberg + + * gsf/gsf-infile-msole.c (ole_init_info) : Add validation in case + ::num_metabat too large for the ::num_bats. + +2006-08-19 Jody Goldberg + + http://bugzilla.gnome.org/show_bug.cgi?id=352055 + * gsf/gsf-msole-utils.c (gsf_msole_metadata_read) : do not generate + an error when given an empty property file. It's not a perfect + solution but it will be what most people want. + +2006-08-19 Jody Goldberg + + * gsf/gsf-doc-meta-data.c (gsf_doc_prop_dump) : new. + (cb_print_property) : split out from here. + + * tools/gsf.c (gsf_dump_props) : new. + (main) : Add 'props' command to dump metadata. + +2006-06-30 Morten Welinder + + * gsf/gsf-msole-utils.c (gsf_msole_metadata_read): Validate + num_props a little bit. (#346189, Michal Kowalczuk) + +2006-06-14 Jody Goldberg + + From Dannym. + * gsf/gsf-msole-utils.c (msole_metadata_write_prop) : Fix export of + R8. Typo was using SET_FLOAT rather than SET_DOUBLE. + +2006-05-26 Jody Goldberg + + * gsf/gsf-doc-meta-data.c (gsf_doc_prop_set_link) : as per Federico's + note. Handle the case of @link being the result of + gsf_doc_prop_get_link. + (gsf_doc_prop_set_val) : ditto. + +2006-05-25 Jody Goldberg + + * gsf/gsf-infile-msvba.c (vba_dir_read) : dump as xml. + This is still a cheesy hack, but at least it does something useful. + +2006-05-18 Jody Goldberg + + * thumbnailer/gsf-office-thumbnailer.schemas.in : Add OpenOffice 1.0 + mime types and missing OpenDocument types. + +2006-05-08 Jody Goldberg + + * configure.in : post release bump + +2006-05-08 Jody Goldberg + + * Release 1.14.1 + +2006-05-02 Jody Goldberg + + From : Ronan MELENNEC + * gsf/gsf-timestamp.c (gsf_timestamp_as_string) : make it clear that + the time stamp is in UTC. + +2006-05-05 Morten Welinder + + * gsf/gsf.c (main): New (uninstalled) beginning of a tar-like + program. + +2006-04-30 Jody Goldberg + + * gsf/gsf-libxml.c (GsfXMLOut) : added 'pretty-print' property to + optionally disable auto indenting of output. + +2006-04-18 Jody Goldberg + + From: Xavier Roche + * gsf/gsf-msole-utils.c (msole_prop_parse) : Fix over zealous boundary + check for wide character string properties. There are _two_ bytes + per character. + +2006-04-21 Morten Welinder + + * gsf/gsf-libxml.c (gsf_xml_out_add_cstr): Drop characters 1-8, 11, + 12, 14-31 on the floor. The XML 1.0 spec does not allow them. + Bandaids #339335. + +2006-04-15 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xml_in_check_ns) : handle default namespaces + properly. + (gsf_xml_in_namecmp) : ditto. + +2006-04-10 Jody Goldberg + + * gsf/gsf-timestamp.c (gsf_timestamp_as_string) : single digit seconds + should pad with 0. + +2006-04-08 Jody Goldberg + + * gsf/gsf-input.c (gsf_input_sibling) : fix docs. + +2006-04-08 Morten Welinder + + * gsf/gsf-infile-msole.c (ole_init_info): Constrain big blocksize + to be no bigger than file size. + +2006-04-07 Jody Goldberg + + http://bugzilla.gnome.org/show_bug.cgi?id=336858 + * gsf/gsf-infile-msole.c (ole_info_read_metabat) : handle situation + where an entire metabat is unused. We don't have any normative docs + on what that indicates but this seems relatively safe. + +2006-04-07 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xml_in_check_ns) : check the current default + namespace too. + (gsf_xml_in_namecmp) : ditto. + (gsf_xml_in_start_element) : improve the warning for unexpected + elements. + + * gsf/gsf-blob.h : deprecate the non-standard name 'GSF_TYPE_BLOB' + and add GSF_BLOB_TYPE. + + * doc/gsf-docs.sgml : fix up the organization a bit. + * doc/gsf-sections.txt : ditto. + +2006-03-20 Morten Welinder + + * gsf/gsf-libxml.c (gsf_xml_in_doc_parse): Set new member + state.initialized. + (gsf_xml_in_start_document): Ditto. + (gsf_xml_in_end_document): Avoid crashing if not initialized. + Works around #335152. + +2006-03-08 Morten Welinder + + * doc/Makefile.am (manpagedir): Fix #316107. + +2006-03-07 Eduardo Lima + + * gsf/gsf-doc-meta-data.c (gsf_doc_prop_free): Ensure that + prop->linked_to is valid before free it. + (gsf_doc_prop_set_val): Just unset and free prop->val if it is not + NULL. + (gsf_doc_prop_set_link): Just free prop->linked_to if it is not NULL. + +2006-03-06 Ivan, Wong Yat Cheung + + * configure.in: detect gmtime/gmtime_r + * gsf/gsf-timestamp.c: various fixes to enable compilatioon on win32 + + * thumbnailer/Makefile.am: disable running of gconftool when + cross-compile + +2006-03-03 Jody Goldberg + + * thumbnailer/main.c (call_convert) : use -thumbnail rather than -resize + to handle transparent backgrounds. I can not find normative docs on + this but it seems to do the right thing. It seems like we also want + '+matte' + +2006-03-02 Eduardo Lima + + * gsf/gsf-docprop-vector.c (gsf_docprop_vector_as_string) : no need + to call g_value_unset () because g_value_array_get_nth () returns + just a pointer to the value. + +2006-03-02 Luciano M. Wolf + + * gsf/gsf-opendoc-utils.c (od_meta_keyword) : init the value to string + before storing the result. + +2006-03-02 Jody Goldberg + + * thumbnailer/gsf-office-thumbnailer.schemas.in : Add the opendoc + types to the schema. Need to check the older OOo 1.x formats before + we can add them. + +2006-03-02 Jody Goldberg + + * configure.in : post release bump + +2006-03-02 Jody Goldberg + + * Release 1.14.0 / 1.13.99 (for Novell) + +2006-03-02 Jody Goldberg + + * gsf/gsf-opendoc-utils.c (gsf_opendoc_metadata_write) : enabled. + (meta_write_props) : new. + (gsf_opendoc_metadata_read) : handle keywords. + (od_meta_keyword) : ditto. + +2006-03-02 Jody Goldberg + + * gsf/gsf-doc-meta-data.c (gsf_doc_meta_dump) : Move this here from + test-msole1. + +2006-03-01 Jody Goldberg + + * gsf/gsf-timestamp.c (gsf_timestamp_parse) : enable this. keep the + cheesy name to avoid api changes. + (gsf_timestamp_as_string) : sync with timestamp_parse. + +2006-02-26 Jody Goldberg + + * thumbnailer/main.c (read_thumbnail_and_write) : split out ole2 + handling into. + (msole_thumbnail) : here. + (zip_thumbnail) : and add a quick call to unzip for ODF. We can tack + on MS Office Open when docs become available. + +2006-02-25 J.H.M. Dassen (Ray) + + * gsf/gsf-input-textline.c, gsf/gsf-input-textline.h, gsf/gsf-libxml.c, + gsf/gsf-outfile-zip.c, gsf/gsf-output.c, gsf/gsf-utils.c: Documentation work. + +2006-02-16 Morten Welinder + + * gsf/gsf-libxml.c (gsf_xml_in_start_document): Plug leaks. + (gsf_xml_in_start_element): Fix key used for inserting into + state->ns_prefixes hash. + +2006-01-21 Morten Welinder + + * gsf/gsf-libxml.c (gsf_xml_parser_context_full): Fix a + hypothetical leak. + +2006-02-15 Morten Welinder + + * gsf/gsf-infile-zip.c (gsf_infile_zip_seek): Plug leak by + shutting down the old stream properly. + +2006-02-15 Morten Welinder + + * gsf/gsf-infile-zip.c (gsf_infile_zip_seek): + +2006-02-04 J.H.M. Dassen (Ray) + + * configure.in: Add "sv" to ALL_LINGUAS. + +2006-01-20 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xml_parser_context_full) : set + xmlParserCtxt::replaceEntities. This fixes parsing problems with + attributes that contain & + +2006-01-08 Stepan Kasal + + * gsf/gsf-impl-utils.h (GSF_CLASS_FULL): Wrap (type==0) by G_UNLIKELY. + +2006-01-06 Dom Lachowicz + + * gsf/gsf-clip-data.c (gsf_clip_data_finalize): Bug 325989 - Memory + leak in gsf_clip_data_finalize(). Based on a patch from Michal + Kowalczuk. + +2006-01-02 Stepan Kasal + + * doc/tmpl/*.sgml: Cleanup errors introduced by gtk-doc, #318666. + +2005-12-24 Stepan Kasal + + * doc/developer/blocksize.html: New file in a new subdir. + * doc/Makefile.am: Distribute it. + +2005-12-07 Morten Welinder + + * gsf/gsf-output-iconv.c (iconv_flush): Fix handling of partial + input sequences. Fixes #323503. + +2005-11-16 Tor Lillqvist + + * configure.in: Calculate CURRENT_MINUS_AGE as the libtool version + info's CURRENT - AGE and AC_SUBST it. This number gets used in the + DLL name, and thus needed in libgsf-zip. + + * libgsf-zip.in: Use CURRENT_MINUS_AGE. DLLs are always in "bin" + nowadays. Build packages for gsf-gnome, too. + + * gsf/gsf-utils.c: Use G_WIN32_DLLMAIN_FOR_DLL_NAME to get DLL + name, use g_win32_get_package_installation_directory() to + construct locale directory name at run-time on Win32. + + * tests/*.c: Initialize GError pointers to NULL. + + * thumbnailer/Makefile.am (install-data-local): Workaround for + MSYS feature that causes problems when running gconftool on Win32. + +2005-11-07 Kjartan Maraas + + * gsf-win32/Makefile.am: Unbreak the build + * gsf/Makefile.am: Same here. + +2005-11-07 Ivan, Wong Yat Cheung + + * gsf/gsf-opendoc-utils.c: use /* FIXME FIXME FIXME Blah Blah */ + instead of #warning for non-gcc compilers. (#306740) + +2005-11-07 Ivan, Wong Yat Cheung + + * Makefile.am: + * configure.in: + * dumpdef.in: New + * gsf.mk: New + * gsf/Makefile.am: + * gsf-gnome/Makefile.am: + * gsf-win32/Makefile.am: + For Win32 Only: 1.) For every source directory of a library, pass all + the public headers (with all #include removed) to the C preprocessor. + 2.) Pass the result from 1. to a perl script which extracts names of + all the public functions and variables. 3.) Concat all from step 2. to + produce a single .def file at the top directory of the library. No + --export-all-symbols anymore. + + * gsf/.cvsignore: + * gsf-win32/.cvsignore: + Shutup CVS. + +2005-11-07 Jody Goldberg + + * configure.in : post release bump + +2005-11-06 Jody Goldberg + + * Release 1.13.3 + +2005-11-06 J.H.M. Dassen (Ray) + + * gsf/gsf-timestamp.h: Dropped two superfluous declarations. + * doc/gsf-sections.txt: Mark internal symbols as subsection "Private" + so as not to be counted for coverage stats. + * doc/tmpl/*.sgml: Cascaded updates. + +2005-11-05 Jody Goldberg + + * gsf/gsf-libxml.c (push_child) : apply extension if one was supplied. + (lookup_child) : pass the extension to push_child. + (gsf_xml_in_start_element) : if none of the current node's children + match, check for extensions. + (gsf_xml_in_ext_free) : new. + (gsf_xml_in_end_element) : free any extensions. + (gsf_xml_in_push_state) : handle an extension that adds children to + the current node vs an extension to add a handler for an unknown node. + +2005-11-05 Jody Goldberg + + Patch from Luciano Miguel Wolf + * gsf/gsf-opendoc-utils.c (od_get_meta_prop) : fix typo. + +2005-11-05 J.H.M. Dassen (Ray) + + * doc/gsf-docs.sgml: Fleshed things out a bit. + +2005-11-04 Christian Neumair + + * libgsf-gnome-1.pc.in: Add required packages to Requires field. + +2005-11-01 J.H.M. Dassen (Ray) + + * README: Updated list archive URL. (Debian #336699) + +2005-10-30 J.H.M. Dassen (Ray) + + * gsf/gsf-infile-ar.c, gsf/gsf-infile-msole.c, gsf/gsf-infile-zip.c, + sf/gsf-infile.c, gsf/gsf-input-textline.c, gsf/gsf-input.c, + gsf/gsf-libxml.c, gsf/gsf-outfile-msole.c, gsf/gsf-outfile-zip.c, + gsf/gsf-output-transaction.c, gsf/gsf-output.c, + gsf/gsf-structured-blob.c: Minor documentation work. + +2005-10-29 J.H.M. Dassen (Ray) + + * doc/gsf-docs.sgml: Add OpenDoc documentation. + * gsf/gsf-timestamp.c, gsf/gsf-utils.c, doc/tmpl/compression.sgml, + doc/tmpl/gsf-opendoc-utils.sgml, doc/tmpl/msole.sgml, + doc/tmpl/utils.sgml, doc/tmpl/zip.sgml: Add some basic documentation. + +2005-10-26 Stepan Kasal + + * tests/test-dump-msole.c: Improve the description line in the top + comment; remove an unused #include. + * tests/test-restore-msole.c: Likewise. + +2005-10-17 Stepan Kasal + + * gsf/gsf-libxml.c (lookup_child): `inst' is a local variable, not + a parameter. + + * doc/gsf.types: Add #include to fix a + warning. + + * gsf/gsf-output-csv.c (gsf_output_csv_init): Initialize eol_len, too. + +2005-10-10 Jody Goldberg + + * configure.in : post release bump + +2005-10-10 Jody Goldberg + + * Release 1.13.2 + +2005-10-10 Jody Goldberg + + DOH! + * gsf/gsf-libxml.c (gsf_xml_in_end_element) : clear the content before + we pop the node. + (gsf_xml_in_doc_new) : restore the hack to handle bools in + has_content. There are still several callers that are passing bool. + (gsf_xml_in_doc_new) : Fix bogus typo that was crashing everything. + (gsf_xml_in_doc_new) : Init root_node + +2005-10-10 Jody Goldberg + + * configure.in : post release bump + +2005-10-10 Jody Goldberg + + * Release 1.13.1 + +2005-10-10 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xml_in_end_element) : Clean up after + extensions. If the extensions was created by an unknown handler we + do not need to do anything special. If it was created by a start + handler then there are effectively two nodes for one parse state, + loop back to clear the original. + (gsf_xml_in_push_state) : finally get an api that will be able to do + what we'll need. + +2005-10-04 Jody Goldberg + + * configure.in : post release bump + +2005-10-04 Jody Goldberg + + * Release 1.13.0 + +2005-10-03 Sven Herzberg + + Got okay from Morten for this: + + * gsf-gnome/gsf-output-gnomevfs.c: create the file if necessary; fixes + bug 317766 + +2005-10-02 Jody Goldberg + + From : Luciano Wolf (luciano.wolf@indt.org.br) + * gsf/gsf-opendoc-utils.{c,h} : new + * gsf/Makefile.am : Add gsf/gsf-opendoc-utils.{c,h} + +2005-10-02 Jody Goldberg + + * gsf/gsf-libxml.c (glade_enum_from_string) : imported from goffice. + (glade_flags_from_string) : ditto. + (gsf_xml_gvalue_from_str) : ditto. + (lookup_child) : break this out of. + (gsf_xml_in_start_element) : here. + Add a new flags to node 'share_children_with_parent' this is allows + all of a nodes siblings to work as mutual children. Eg for + for rich text which need to nest arbitrarily. + (gsf_xml_in_doc_parse) : renamed from gsf_xml_in_parse. + Takes a GsfXMLInDoc rather than a GsfXMLIn. This is useful to keep + the lifecycle of the GsfXMLIn more under our control. We intialize + it not the caller. People no longer need to inherit/contain it, now + they store their state seperately. + +2005-10-02 Jody Goldberg + + * configure.in : bump the version to 1.13.0 due to the xml changes. + Add -Wno-pointer-sign to make the warnings stop. + * doc/gsf-sections.txt : update + * doc/gsf.types : update + +2005-10-01 Stepan Kasal + + * configure.in (VERSION_INFO): Fix the definition, add a comment. + +2005-09-18 Stepan Kasal + + * configure.in: Make sure that the Automake conditional + GCONF_SCHEMAS_INSTALL is always set. + * msvc/README: Don't mention packages which are not prerequisities + of libgsf. + +2005-09-16 Stepan Kasal + + * doc/gsf-sections.txt: Add gsf_input_stdio_new_FILE. + +2005-09-06 Jody Goldberg + + * configure.in : post release bump + +2005-09-06 Jody Goldberg + + * Release 1.12.3 + +2005-08-24 Jody Goldberg + + * configure.in : Make gconf optional + * Makefile.am : ditto. + +2005-08-22 Jody Goldberg + + * gsf-gnome/Makefile.am : Add -no-undefined on win32 [#314221] + +2005-08-19 Tim Janik + + * gsf/gsf-outfile-zip.c (zip_close_stream): call deflateEnd, free + stream and buffer space, so we are not holding on to large amounts + of memory until we're done with the current directory. + +2005-08-17 J.H.M. Dassen (Ray) + + * doc/gsf-office-thumbnailer.1: Added. + * doc/Makefile.am: Updated accordingly. + +2005-08-16 Stepan Kasal + + * configure.in: Update obsolete AC_TRY_* macros. + Before the tests for g_chmod and g_access, LIBGSF_LIBS should be + _prepended_ to LIBS, not appended; more specific libs have to be + listed first. + * gsf/gsf-impl-utils.h: Align tabs. + +2005-08-13 Morten Welinder + + * configure.in: Post release bump + +2005-08-13 Morten Welinder + + * Release 1.12.2 + +2005-08-11 Jean Brefort + + * gsf/gsf-impl-utils.h: made GSF_CLASS_FULL and GSF_DYNAMIC_CLASS_FULL + really full. + +2005-08-09 J.H.M. Dassen (Ray) + + * configure.in: Changed tests for g_chmod and g_access: actually try + linking the test fragments and use the LIBS being constructed in those + attempts. + +2005-08-09 Morten Welinder + + * configure.in: Test for g_chmod and g_access. + + * gsf/gsf-output-stdio.c (gsf_output_stdio_close): Use the right + errno. Fixes part of #312930. + (chmod_wrapper): New function to help Win32. + (access_wrapper): Renamed from gsf_access and simplified. + +2005-08-09 J.H.M. Dassen (Ray) + + * thumbnailer/main.c (show_error_and_exit): Mark this G_GNUC_NORETURN + as well. + +2005-08-08 J.H.M. Dassen (Ray) + + * *: Updated the FSF's address. + +2005-08-07 Stepan Kasal + + * gsf/gsf-input-stdio.c (gsf_input_stdio_new_FILE): Don't forget + to set the keep_open flag. + * thumbnailer/main.c (show_error_string_and_exit): Add G_GNUC_NORETURN. + +2005-08-05 Jody Goldberg + + * gsf/gsf-msole-utils.c (msole_prop_parse) : be more careful + +2005-08-02 Morten Welinder + + * gsf/gsf-input-stdio.c (gsf_input_stdio_new_FILE): New function + for symmetry. (This is not as useful as it might seem since the + file must be seekable.) + +2005-08-02 Stepan Kasal + + * Makefile.am (clean-local): That rule contained command + "rm -f intl/po2tbl.sed". But it seems the subdirectory intl/ is + no longer used. + (ACLOCAL_AMFLAGS): Remove again. + (EXTRA_DIST): Remove files added by gettextize and files distributed + by default. + (DISTCLEANFILES): Add the three intltool-* scripts. + * configure.in (GCONFTOOL): Determine by a procedure similar to + what is in gnumeric/configure.in. + * thumbnailer/Makefile.am (install-data-local): Fix the rule so that + we pass distcheck. + * acinclude.m4, acinclude.m4.am15: Partial cleanup of the comments; + in particular, don't speak as if Automake 1.5 were something new. + +2005-07-11 Morten Welinder + + * gsf/gsf-output.c (gsf_output_set_name_from_filename): Make this + work for NULL filename. + +2005-07-30 Jody Goldberg + + http://bugzilla.gnome.org/show_bug.cgi?id=310118 + * gsf/gsf-msole-utils.c (msole_metadata_write_prop) : be more careful + about NULL strings. This fixes the crash on export, but there are + still some warnings on import that put us into an inconsistent + state. + (msole_prop_parse) : In the LPSTR case use the actual byte size not + the result of the conversion. If the encoding is off, we ended up + with the wrong size. + +2005-07-24 Dom Lachowicz + + * gsf/gsf-msole-utilc.c (msole_prop_parse): Move some g_prints behind + a debug macro. + +2005-07-19 Federico Mena Quintero + + * thumbnailer/main.c (main): Oops, remove some leftover debugging code. + + * configure.in: Generate thumbnailer/Makefile. Add a test for GConf. + + * Makefile.am (SUBDIRS): Added the thumbnailer directory. + + * gsf/gsf-utils.c (gsf_init): Call bindtextdomain() and + bind_textdomain_codeset(). + + * gsf/gsf-clip-data.c: Mark strings for translation. + + * gsf/gsf-blob.c: Likewise. + + * gsf/gsf-msole-utils.c: Mark strings in GErrors for translation. + + * gsf/Makefile.am (AM_CPPFLAGS): Add the locale directory. + +2005-07-19 gettextize + + * Makefile.am (SUBDIRS): Add po. + (ACLOCAL_AMFLAGS): New variable. + (EXTRA_DIST): Add config.rpath, m4/ChangeLog. + * configure.in (AC_CONFIG_FILES): Add po/Makefile.in. + +2005-07-19 Federico Mena Quintero + + * configure.in: Pull in intltool and gettext. + + * thumbnailer/gsf-office-thumbnailer.schemas.in: New file with the + schemas for the thumbnailer. + +2005-07-18 Federico Mena Quintero + + * thumbnailer/main.c: New file with a very simple GNOME + thumbnailer for MS Office files. This will grow to something more + sophisticated in the future. + + * thumbnailer/Makefile.am: New file. + + I'll add this subdir to the build tomorrow, when I get the GConf + bits right for configure.in. + +2005-07-18 Stepan Kasal + + * gsf/gsf-libxml.c (gsf_xml_in_doc_free): In the description, remove + the reference to the nonexistent gsf_xml_in_doc_prep. + +2005-07-07 Ivan, Wong Yat Cheung + + * msvc/.cvsignore: + * msvc/README: + * msvc/config.dsp: + * msvc/install.pl: + * msvc/autom4te.hack: New + Include a hacked version autoheader that doesn't need a posix + environment. The whole MSVC building process is now posix- + independent. + +2005-07-06 Federico Mena Quintero + + * gsf/gsf-blob.[ch]: New files with a GsfBlob object, used to hold + generic binary data. + + * gsf/gsf-clip-data.[ch]: New files with a GsfClipData object, + used to hold the VT_CF property data. + + * gsf/gsf-msole-utils.c (parse_vt_cf): New function; creates a + GsfClipData for the resulting GValue. + (msole_prop_parse): Handle the VT_CF property. + + * gsf/gsf-utils.h (GSF_ERROR): Add a generic error quark. + (GsfError): Add an enum with generic error values; so far we only + have GSF_ERROR_OUT_OF_MEMORY and GSF_ERROR_INVALID_DATA. + + * gsf/gsf-utils.c (gsf_error_quark): Implement. + + * gsf/Makefile.am: Added gsf-blob.[ch] and gsf-clip-data.[ch]. + + * doc/gsf-sections.txt: Added sections for GsfBlob and + GsfClipData. Added the GsfError stuff to the "utils" section. + + * doc/gsf-docs.sgml: Add the GsfBlob and GsfClipData sections. + Renamed the old "GsfBlob" entity to "GsfStructuredBlob", to match + the object to which it refers. + + * doc/tmpl/utils.sgml: Document the GError bits. + + * doc/tmpl/gsf-clip-data.sgml: New file. + + * doc/tmpl/gsf-blob.sgml: New file. + +2005-07-05 Jon K Hellan + + * gsf/gsf-msole-utils.c (msole_metadata_write_prop): Fix + VT_FILETIME export. + +2005-07-01 Morten Welinder + + * gsf/gsf-output-memory.c (gsf_output_memory_vprintf): Don't use a + va_list twice as an argument. (The standard does not allow that.) + Fixes i86_64 problems and was found by Jean. + + * gsf/gsf-utils.c (gsf_mem_dump_full): Kill a warning. + +2005-06-30 Jody Goldberg + + * gsf/gsf-msole-utils.c (gsf_msole_iconv_get_codepage_string_list) : + Add 0x8001 as a synonym for 1252 as per the OOo docs. I wish there + was something more normative than that. + + * gsf/gsf-docprop-vector.c : remove custom GTypeValueTable it was + wrong and unnecessary. This fixes the leak of the GValueArray + +2005-06-30 Ivan, Wong Yat Cheung + + * win: Rename to msvc + * msvc: Add MSVC build files, see msvc/README for + details. + +2005-06-23 Ivan, Wong Yat Cheung + + * configure.in: Check for the existence of S_ISREG, + if it is not defined (e.g. MS's PSDK), do + it ourself. + +2005-06-21 Ivan, Wong Yat Cheung + + * gsf/gsf-input-stdio.c: + * gsf/gsf-libxml.c: + * gsf/gsf-msole-utils.c: + * gsf/gsf-outfile-msole.c: + * gsf/gsf-outfile-stdio.c: + * gsf/gsf-output-stdio.c: + * gsf/gsf-timestamp.c: + * gsf/gsf-utils.h + * gsf-win32/gsf-input-win32.c: + * gsf-win32/gsf-output-win32.c: Remove all #warning. That is + a gcc only directive. Use /* FIXME FIXME FIXME Blah Blah */ instead. + Remove all _MSC_VER, which are either unnecessary or not belong + there. + +2005-06-13 Morten Welinder + + * gsf/gsf-msole-utils.c (msole_prop_parse): Use g_value_set_uint64 + and g_value_set_int64 where appropriate. + (msole_prop_cmp): Handle offsets larger than int. + +2005-06-12 Jody Goldberg + + * configure.in : post release bump + +2005-06-12 Jody Goldberg + + * Release 1.12.1 + +2005-06-12 Jody Goldberg + + * gsf/gsf-msole-utils.c (gsf_msole_lid_to_codepage) : codepages are + signed. + (gsf_msole_iconv_win_codepage) : ditto. + (gsf_msole_iconv_open_codepages_for_export) : ditto. + (gsf_msole_iconv_open_codepage_for_export) : ditto. + (gsf_msole_iconv_get_codepage_string_list) : ditto. + -535(uint16) == 65001 + +2005-06-12 Jody Goldberg + + * gsf/gsf-impl-utils.h (GSF_DYNAMIC_CLASS_FULL) : remove useless + trailing backslash that was confusing gtk-doc + + * gsf/gsf-output-stdio.c (gsf_output_stdio_new_valist) : new. + (gsf_output_stdio_new_full) Use it here. + (gsf_output_stdio_new) : And use that here. + * gsf/gsf-outfile-stdio.c (gsf_output_stdio_new_valist) : new. + (gsf_outfile_stdio_new_full) Use it here. + (gsf_outfile_stdio_new) : And use that here. + +2005-06-10 Morten Welinder + + * gsf/gsf-libxml.c (gsf_xml_out_add_enum): New function. + +2005-06-08 Morten Welinder + + * gsf/gsf-output-stdio.c (gsf_output_stdio_new): Test + directory-ness of the right mode. + +2005-06-04 Stepan Kasal + + * gsf/gsf-output.h (gsf_output_vprintf): Add the function attribute + G_GNUC_PRINTF (2, 0). Add the same to various static *vprintf + funtions in other files. + * gsf/gsf-output-csv.c (gsf_output_cvs_close): The parameter is + unused, mark it as such. + + * .cvsignore: Add gtk-doc.make; remove gsf-config; replace stamp-h + and stamp-* by stamp-h*. + +2005-06-03 Jody Goldberg + + * gsf/gsf-utils.h (gsf_init_dynamic) : new hook. Unimplemented yet. + + * gsf/gsf-impl-utils.h (prefix) : use a cleaner pattern for the + dynamic type/interface declarations. + +2005-06-02 Jody Goldberg + + * gsf/gsf-msole-utils.c (msole_vt_name) : suppress warning + (msole_prop_parse) : assign the right type. + +2005-06-02 Dom Lachowicz + + * gsf/gsf-outfile-zip.c (zip_flush): Check for Z_BUF_ERROR case. + This is the cause of AbiWord bug #7652 + +2005-06-02 Morten Welinder + + * gsf/gsf-libxml.c (gsf_xml_out_add_float): Use "C" locale + conventions. Fix ambiguities in docs. + +2005-06-01 Morten Welinder + + * gsf/gsf-input-gzip.c (gsf_input_gzip_read): Only trigger the + truncated-file check after we have added a single NUL byte. + (check_header): Avoid overflows. + +2005-05-31 Jody Goldberg + + * gsf/gsf-input-gzip.c (gsf_input_gzip_read) : get upset when an input + file is truncated. + (check_header) : Add a heuristic to warn about files with > 1000:1 + compression ratios. It is crude but likely to catch the worst + truncated files were we're using data rather than a trailer by + accident. + +2005-05-31 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xml_in_parse) : add some protection. + +2005-05-30 Jody Goldberg + + * gsf/gsf-msole-utils.c (msole_metadata_write_section) : warning + suppression. + (msole_prop_parse) : it seems GValue needs to be a G_OBJECT in order + for it to be unrefed. + +2005-05-28 Jody Goldberg + + * gsf/gsf-docprop-vector.c (gsf_docprop_vector_finalize) : patch leak. + +2005-05-25 Morten Welinder + + * configure.in (CFLAGS): Don't use -Wcrazy. + +2005-05-15 J.H.M. Dassen (Ray) + + * configure.in: Enable a number of additional warnings (when available) + for which the current code base is already virtually clean. + Ensure at link time that the shared objects, contain complete + dependency information for all symbols they use from elsewhere. + +2005-05-10 Jody Goldberg + + * configure.in : post release bump + +2005-05-09 Jody Goldberg + + * Release 1.12.0 + +2005-05-08 Jody Goldberg + + * gsf/gsf-outfile-msole.c (ole_bytes_left_in_block) : As per Stuart + Cunningham from the AAF group the header is always bb.size. + (gsf_outfile_msole_new_full) : ditto. pad the header with zeros. + +2005-05-08 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xml_in_start_element) : Do not check for a + namespace we have not seen yet. Fixes crash when reading OOo 2.0 + with the dtd from 1.0 + +2005-05-05 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xml_in_check_ns) : Add some safety. + +2005-05-04 Jody Goldberg + + * gsf/gsf-msole-utils.c (msole_vt_name) : handle sparse entries. + +2005-05-03 Jody Goldberg + + * gsf/gsf-msole-utils.c (gsf_msole_metadata_write) : complete rewrite. + Just write the properties then seek back to fill in the offsets + rather than measuring then writing. + (cb_count_props) : new. collect builtin vs user defined props + from the hash. + (msole_metadata_write_section) : new. write the props and collect the + offsets and ids. Handle linked props, vectors and variant vectors. + (msole_metadata_write_prop) : Adds padding to the simple types. + (gvalue_to_msole_vt) : map from a GValue to a variant type. Be smart + about handling boxed types, and check vectors to see if they are + fixed type vs variant. Use the table of builtin types if possible + to deal with ambiguities. + (cb_write_dict) : new. + (msole_vtname) : new util to get debug name. + +2005-04-27 Morten Welinder + + * gsf/gsf-utils.c (gsf_property_settings_collect, + gsf_property_settings_collect_valist, gsf_property_settings_free): + New functions. + + * gsf/gsf-outfile-zip.c (gsf_outfile_zip_new): Move guts into + gsf_outfile_zip_constructor. + (gsf_outfile_zip_constructor): New function. + (gsf_outfile_zip_class_init): Link in gsf_outfile_zip_constructor. + Add entry-name and sink properties. In the process separate + filenames from gsf_output_name which is UTF-8 encoded. + (stream_name_write_to_buf): Greatly simplify using GString. + + * gsf/gsf-infile-zip.c: New property "source". Install a proxy + layer between the zip file and the source so we don't dup + GsfInputStdio or GsfInputGnomeVFS objects (which is expensive and + subject to lots of problems). + +2005-04-26 Morten Welinder + + * tests/test-cp-zip.c (clone): Be a bit verbose. Make the copy + use the compression levels of the source. + + * gsf/gsf-outfile-zip.c: Add construct-only compression-level + property. + (gsf_outfile_zip_set_compression_method): Make this an empty stub + and deprecate. + + * gsf/gsf-zip-utils.c (gsf_vdir_add_child): Do not sort because + doing so breaks copying of OOo files. + + * gsf/gsf-infile-zip.c: Add readable compression-level property. + (vdir_child_by_index): simplify. (This is really use + g_slist_nth_data, modulo pointer types.) + +2005-04-26 Jody Goldberg + + * gsf/gsf-msole-utils.c (cb_measure_props) : handle custom props for + ints and uints. + +2005-04-26 Jody Goldberg + + * gsf/gsf-msole-utils.c (msole_gsf_name_to_prop) : fix my silliness + (check_variant) : new. + (cb_measure_props) : renamed from add_props. Signature changed to + match the new foreach semantics. Some initial work on handling + variant vectors vs single type vectors. Removed nasty kludge for + DocumentParts and HeadingPairs. + + * gsf/gsf-docprop-vector.c (gsf_value_get_docprop_vector) : Use + g_value_get_object and clarify the docs. + (gsf_value_set_docprop_vector) : delete + (VAL_IS_GSF_DOCPROP_VECTOR) : new. + (IS_GSF_DOCPROP_VECTOR) : adjust to use the std GObject semantics + +2005-04-23 Jody Goldberg + + * gsf/gsf-doc-meta-data.h (gsf_doc_prop_new) : new + (gsf_doc_prop_free) : new + (gsf_doc_prop_swap_val) : new + + * gsf/gsf-msole-utils.c : disable the debug spew + +2005-04-22 Stepan Kasal + + * configure.in: Use m4 macros for version numbering. + +2005-04-16 Jody Goldberg + + * tests/test-msole1.c : update for the new ms-ole property import api + + * gsf/gsf-msole-utils.c : disable debug spew + (msole_prop_id_to_gsf) : flag links + (msole_prop_read) : store the property directly. + (msole_prop_store) : delete. + +2005-04-16 Jody Goldberg + + * gsf/gsf-docprop-vector.c (gsf_value_get_docprop_varray) : Add some + safety. + +2005-04-16 Jody Goldberg + + * gsf/gsf-doc-meta-data.[ch] : Major interface changes to make the + hash like behavior perfectly clear, and to support links. + +2005-04-16 Jody Goldberg + + * doc/gsf-sections.txt : update + +2005-04-12 Morten Welinder + + * configure.in: revert last change. + +2005-04-12 Stepan Kasal + + * configure.in: Small changes in the pygtk check, though it's + currently not in use. + +2005-04-11 Jody Goldberg + + * tests/test-msole1.c: Make the test program work. + +2005-04-10 Jody Goldberg + + * gsf/gsf-msole-utils.c (gsf_msole_metadata_write) : replace incessant + if (success) with a 'goto err' and prune more non-C89 var decls + +2005-04-09 Jody Goldberg + + * gsf/gsf-outfile.h : remove G_GNUC_NULL_TERMINATED for now. + we do not want to require glib-2.7 + +2005-04-09 Jody Goldberg + + * gsf/gsf-outfile-impl.h (new_child) : change the signature to pass in + var_args. Changed all callers. + + * gsf/gsf-outfile.c (gsf_outfile_new_child_full) : new. + (gsf_outfile_new_child) : convert into a wrapper to + gsf_outfile_new_child_full. + * gsf/gsf-input.c (gsf_input_error_id) : renamed from gsf_input_error + and a deprecated wrapper with the old name. + * gsf/gsf-docprop-vector.c (gsf_value_get_docprop_varray) : new. + * gsf/gsf-infile-msvba.c (vba_project_read) : add a few new + signatures. + +2005-04-09 Jody Goldberg + + From Manuel Mausz + * gsf/gsf-msole-utils.c (gsf_msole_metadata_write) : initial + implementation. + +2005-04-07 Jody Goldberg + + * configure.in : bump the library version to indicate api change + +2005-04-04 Stepan Kasal + + * configure.in (LIBGSF_MODULES): This macro was replaced by... + (libgsf_reqs, libgsf_gnome_reqs): ... these two shell variables. + PKG_CHECK_MODULES from pkconfig-0.16.0 double quotes its arguments, + which is an error; using shell variables is a handy workaround. + * Makefile.am: Clean up. + * test/Makefile.am (LDADD): Use this, instead of the per-target + variables. + +2005-04-04 Morten Welinder + + * gsf/gsf-output-csv.c (gsf_output_csv_write_field): Fix auto + quoting. + + * gsf/gsf-output-iconv.h: Make GsfOutputIconvClass public. + * gsf/gsf-output-impl.h: Make GsfOutputClass public. + * gsf/gsf-output-csv.h: Make GsfOutputCsvClass public. + +2005-04-03 J.H.M. Dassen (Ray) + + * configure.in: Fixed the GNOME support check: "LIBGSF_MODULES" needed + to be expanded in the PKG_CHECK_MODULES. + +2005-04-01 Morten Welinder + + * gsf/gsf-output-iconv.c: New file. + * gsf/gsf-output-csv.c: New file. + + * gsf/gsf-output.c (gsf_output_dispose): Silently close if needed. + +2005-04-01 Stepan Kasal + + s/INCLUDES/AM_CPPFLAGS/ "automake -Wall" has told me this. + + * configure.in: More sophisticated check for zlib, an improved + version of the check in gnumeric (to be removed soon from there), + which in turn was inspired by libxml2's configure.in. + Require Autoconf 2.54 and other cosmetic changes. + * autogen.sh: Require Autoconf 2.54 and other cosmetic changes. + +2005-03-31 Morten Welinder + + * gsf/gsf-output.c (gsf_output_set_error): Make public. + + * */*.c: Don't test for NULL before g_free. + + * gsf/gsf-utils.h (GSF_LE_GET_GINT64, GSF_LE_SET_GINT64, + GSF_LE_SET_GUINT64): New macros for completeness. + +2005-03-29 Morten Welinder + + * gsf/gsf-impl-utils.h (GSF_PARAM_STATIC): Define suitably. + * gsf/*.c: Use GSF_PARAM_STATIC for properties. + + * configure.in: Don't check for readline and lstat. Do check for + mode_t. + + * gsf/gsf-output-stdio.c (gsf_output_stdio_new): Again use mode_t + for saved umask. + +2005-03-28 Morten Welinder + + * */*.c: Use canonical property names. + +2005-03-25 Morten Welinder + + * gsf/gsf-output-stdio.c (gsf_output_stdio_close): In case of + error, simply unlink the temporary file and leave the target file + alone. + + * gsf/gsf-output-gzip.c (gzip_output_block): If we cannot write to + the sink, set an error for ourself. + (gzip_flush): If we get a compression failure, set an error for + ourself. + + * gsf/gsf-input-gzip.c (gsf_input_gzip_class_init): Install + set_property, get_property, and constructor methods. + (check_header): Allow skipping the header. Allow getting + uncompressed size from construction property. + (gsf_input_gzip_read): Allow having to trailer. + (gsf_input_gzip_dup): Cleanly construct the new object. + + * gsf/gsf-output-gzip.c (gsf_output_gzip_class_init): Rename + "container" property to "raw" with opposite semantics. + +2005-03-25 Morten Welinder + + * gsf/gsf-output-gzip.c (gsf_output_gzip_set_property): Handle + NULL sink better. + (gsf_output_gzip_new): Don't bother closing the output on error. + + * gsf/gsf-output.c (gsf_output_dispose): Renamed from _finalize. + Don't complain when a stream with an error is not closed -- just + silently close it. + (gsf_output_class_init): Hook up for _dispose instead of + _finalize. + + * gsf/gsf-output-gzip.c (gsf_output_gzip_close): Do nothing for a + stream with an error. + +2005-03-25 Morten Welinder + + * gsf/gsf-output-gzip.c (gsf_output_gzip_class_init): Install + set_property, get_property, and constructor methods. + (gsf_output_gzip_constructor): Allow skipping the gzip header. + (gsf_output_gzip_close): Allow skipping the tail. + +2005-03-24 Morten Welinder + + * gsf/gsf-output-stdio.c (gsf_access): Renamed from + file_is_writable. Make it a full access wrapper. Caller changed. + +2005-03-23 Morten Welinder + + * gsf/gsf-utils.c (gsf_filename_to_utf8): Make this sane (which it + never was). We no longer use this, but keep it around. + (gsf_extension_pointer): Fix this for Win32. + +2005-03-23 Ivan, Wong Yat Cheung + + * gsf/gsf-msole-utils.c: Add new function + gsf_msole_iconv_get_codepage_string_list() which returns all + possible names of a codepage given a codepage number. This helps + gsf_msole_iconv_open_codepage_for_(im|ex)port(). + * gsf-win32/Makefile.am: some more minor changes so that + libgsf_win32_1_la can be built as dll. + +2005-03-23 Morten Welinder + + * gsf/gsf-output-stdio.c (follow_symlinks): Handle lack of ELOOP. + + * gsf/gsf-input-memory.c (gsf_input_mmap_new): g_open has a + mandatory mode arg that open does not. + +2005-03-22 Morten Welinder + + * gsf/gsf-libxml.c (close_tag_if_neccessary): New function. + (gsf_xml_out_add_cstr_unchecked, gsf_xml_out_add_cstr): Use + close_tag_if_neccessary. Patch from #167166. + +2005-03-22 Morten Welinder + + * gsf/gsf-output-stdio.c (gsf_output_stdio_new): Conditionalize + owner/group stuff on HAVE_CHOWN. Use file_is_writable. + (file_is_writable): New function. + + * gsf/gsf-input-memory.c (gsf_input_mmap_new): Use f_open, not + open. + + * gsf/gsf-outfile-stdio.c (gsf_outfile_stdio_new): Simplify using + g_mkdir. + + * configure.in: Require glib 2.6 for g_filename_display_name. + + * gsf/gsf-output-stdio.c (rename_wrapper): Use g_rename and + g_unlink. + (gsf_output_stdio_new): Use g_stat. Fix error message. + + * gsf/gsf-input-stdio.c (gsf_input_stdio_seek): Don't call perror. + (struct GsfInputStdio): Add filename member. + (gsf_input_stdio_finalize): Free filename member. + (gsf_input_stdio_dup): Use filename member. + (gsf_input_stdio_new): Fix error messages; initialize filename + member; use g_fopen to open file. + + * gsf/gsf-docprop-vector.c: Fix includes. + + * gsf/gsf-infile-stdio.c (gsf_infile_stdio_new): Simply using + glib's GDir stuff. (This should fix Win32 in the process.) + +2005-03-05 Jody Goldberg + + Patch from Frank Chiulli + * gsf/Makefile.am : Add gsf-docprop-vector + * gsf/gsf-docprop-vector.{c,h} : new files to add vector support + * tests/test-msole1.c (print_property) : support for vectors + * gsf/gsf-msole-utils.c (msole_prop_parse) : ditto + +2005-02-02 Dom Lachowicz + + * gsf/gsf-output-gnomevfs.c: A bit more robustness and documentation + for bug 159442. + +2005-01-16 Dom Lachowicz + + * gsf/gsf-output-gnomevfs.c: This should fix bug 159442 by truncating + newly-created files whenever possible WHILE preserving file permissions. + +2004-09-25 Stepan Kasal + + * gsf/gsf-output-stdio.c: Use g_file_read_link() - (bug 149827) + +2004-12-02 Dom Lachowicz + + * gsf/gsf-input-memory.c: Add mmap support on win32 (bug #160294) + * gsf/gsf-shared-memory.c: Ditto + +2004-12-06 Jody Goldberg + + * configure.in : post release bump + +2004-12-06 Jody Goldberg + + * Release 1.11.1 + +2004-12-05 Morten Welinder + + * gsf/gsf-output-stdio.c (gsf_output_stdio_close): Flush file if + we don't close it. + +2004-12-01 Morten Welinder + + * gsf/gsf-output-stdio.c (gsf_output_stdio_new): Make sure new + files end us with as lose permissions as the umask says. + [#159331] + (rename_wrapper): New function to hide the fact that Win32's + rename does not unlink the target file if it exists. [#160108] + +2004-11-28 Jody Goldberg + + * configure.in : Post release bump + +2004-11-28 Jody Goldberg + + * Release 1.11.0 + +2004-11-28 Jody Goldberg + + * gsf/gsf-msole-utils.c (msole_prop_parse) : NULL unhandled types + +2004-11-25 Sven Herzberg + + * gsf-gnome/gsf-output-gnomevfs.c: (gsf_output_gnomevfs_new_uri): + truncate the output file to length 0 when opening (fix #159442) + +2004-11-23 Jody Goldberg + + * gsf/gsf-output-stdio.c (gsf_output_stdio_close) : add a hook to + accept existing FILE* + (gsf_output_stdio_new_FILE) : new. + +2004-11-19 Veerapuram Varadhan + + * Add gsf/gsf-meta-names.h + + * gsf/gsf-doc-meta-data.[ch] (gsf_get_prop_val, + gsf_get_prop_val_str): new + (gsf_doc_meta_data_get_prop) : return GsfDocProp instead of + GsfDocMetaData. Caller should release the return value. + + * gsf/Makefile.am : Add gsf-meta-names.h to the list of headers. + +2004-11-16 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xml_in_start_element) : Check the unknown + handler if we come across something that has not been registered + yet. + (gsf_xml_in_doc_set_unknown_handler) : new. + (gsf_xml_in_doc_new) : split part of this out into + (gsf_xml_in_doc_extend) : here, so that we can add nodes to a + description later. + +2004-11-12 Morten Welinder + + * gsf/gsf-libxml.c (gsf_xml_out_add_cstr): Escape 1..31 when used + in attributes. + +2004-11-02 Jody Goldberg + + * tests/test-msole1.c (test) : fix leak and use + gsf_msole_metadata_read_real. + + * gsf/gsf-msole-utils.c (gsf_msole_metadata_read) : store them in + GsfDocProp + (gsf_msole_metadata_read_real) : renamed from gsf_msole_metadata_read + (gsf_msole_metadata_read) : a quick stub to avoid creating a leak in + existing calls to this routine. + +2004-11-02 Jody Goldberg + + From Frank + * gsf/gsf-msole-utils.c (gsf_msole_metadata_read) : store the + properties + * tests/test-msole1.c (test) : dump the properties + * gsf/Makefile.am : Add gsf-doc-meta-data.c to the build + * gsf/gsf-doc-meta-data.c (gsf_doc_meta_data_set_prop) : init + the GValue before we assign. + +2004-09-20 Morten Welinder + + * gsf/*.c: Remove useless casts of 0 to gsf_off_t in parameters. + + * gsf/gsf-output.c (gsf_output_set_name_from_filename): New function. + * gsf/gsf-output-stdio.c (gsf_output_stdio_new): Use + gsf_output_set_name_from_filename. + * gsf/gsf-outfile-stdio.c (gsf_outfile_stdio_new): Use + gsf_output_set_name_from_filename. + + * gsf/gsf-input.c (gsf_input_set_name_from_filename): New function. + * gsf/gsf-input-stdio.c (gsf_input_stdio_new): Use + gsf_input_set_name_from_filename. + * gsf/gsf-infile-stdio.c (gsf_infile_stdio_new): Use + gsf_input_set_name_from_filename. + + * gsf/gsf-infile-zip.c (zip_update_stream_in): Add seek error check. + (gsf_infile_zip_read): Ditto. + +2004-09-19 Dom Lachowicz + + * configure.in: Morten's VFS local copy requires VFS >= 2.2. Upgrade configure check. + * gsf-gnome/gsf-input-gnomevfs.c (gsf_input_gnomevfs_new_uri): Follow symlinks similarly to the STDIO input + * gsf/gsf-input-stdio.c (gsf_input_stdio_new): Convert file name to UTF8 + * gsf/gsf-output-stdio.c (gsf_output_stdio_new): Convert file name to UTF8 + * BUGS: remove above + +2004-09-17 Morten Welinder + + * gsf/gsf-infile-zip.c (zip_find_trailer): Fix gsf_input_seek + check. + + * gsf/gsf-input.c: Doc fixes, notably reversing the sense of + gsf_input_seek_emulate's return value. + +2004-09-17 Morten Welinder + + * gsf-gnome/gsf-input-gnomevfs.c (gsf_input_gnomevfs_new_uri): + Force local copy for small (<256KB) files that are not local. + + * gsf/gsf-infile-msole.c (gsf_infile_msole_new): Add a proxy layer + so we don't have to dup files or net connections. + + * gsf/gsf-input.c (gsf_input_dup): Provide error messages. + + * gsf/gsf-input-proxy.c (gsf_input_proxy_read): gsf_input_read + updates our position so we should not. + + * gsf/gsf-input-proxy.[ch]: New file. + +2004-09-16 Morten Welinder + + * gsf/gsf-input-textline.c (gsf_input_textline_dup): Set size. + + * gsf/gsf-input-memory.c (gsf_input_memory_dup): Set size. + + * gsf-gnome/gsf-input-gnomevfs.c (gsf_input_gnomevfs_seek): Ugly + work-around for gnome-vfs bug. + + * gsf/gsf-input.c (gsf_input_dup): Check size and seek return + value. + + * gsf/gsf-infile.c (gsf_infile_child_by_name): Protect against + NULL input name. + (gsf_infile_child_by_index): Ditto. + + * gsf/gsf-infile-msole.c (gsf_infile_msole_new_child): Handle + failure to dup. + (ole_info_get_sb_file): Handle failure to dup. + (gsf_infile_msole_new_child): Handle failure from + ole_info_get_sb_file. + +2004-09-15 Dom Lachowicz + + * gsf-win32/gsf-input-win32.c: Create more meaningful error messages + from HRESULTs. + * gsf-win32/gsf-output-win32.c: Ditto. Add error reporting. + +2004-08-27 Stepan Kasal + + * gsf/gsf-outfile-zip.c (gsf_outfile_zip_seek): Use G_GNUC_UNUSED. + * gsf/gsf-output-gzip.c (gsf_output_gzip_seek): Likewise. + * gsf/gsf-structured-blob.c (blob_dup): Likewise. + * gsf/gsf-input-textline.c (gsf_input_textline_dup): Likewise. + * gsf/gsf-input-memory.c (gsf_input_memory_dup): Likewise. + (gsf_input_mmap_new): Remove useless #warning. + +2004-08-26 Morten Welinder + + * gsf/gsf-shared-memory.c (gsf_shared_memory_finalize): Don't + check size overflow here. + (gsf_shared_memory_mmapped_new): Check it here. Return NULL if we + don't have mmap. + + * gsf/gsf-timestamp.c (gsf_value_set_timestamp): Renamed from + g_value_set_timestamp. + +2004-08-25 Stepan Kasal + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_close_root): Be careful + with empty files (fixes bug #150923). + +2004-08-25 Morten Welinder + + * gsf/gsf-utils.c (gsf_base64_encode_step): Avoid potential + rounding error. + + * gsf/gsf-input-bzip.c (gsf_input_memory_new_from_bzip): Kill + pointless #warning. + +2004-08-23 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xml_out_add_cstr) : Add some libxml compat + behavior and ignore NULLs + (gsf_xml_out_add_cstr_unchecked) : ditto + +2004-08-17 Stepan Kasal + + * gsf/gsf-utils.c (BASE64_LINE_LEN): New constant to determine + the line length, my mbox indicates that 76 is commonly used. + (gsf_base64_encode_simple): Use it. + (gsf_base64_encode_step): Use it too; remember that `already' + holds line length / 4. + (gsf_base64_encode_close): Don't add '\n' if not necessary. + +2004-07-29 Stepan Kasal + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_new_full): One more sanity + check, bb.size has to be at least DIRENT_SIZE. + (gsf_outfile_msole_close_root): For non-root dirs, don't set + FIRSTBLOCK to DIRENT_MAGIC_END, it is BAT_MAGIC_END_OF_CHAIN; though + both are -1. Explanation: BAT_MAGIC_END_OF_CHAIN is of type ``block + number'' while DIRENT_MAGIC_END is of type ``dirent number''. + +2004-08-20 Jody Goldberg + + * configure.in : post release version bump + +2004-08-20 Jody Goldberg + + * Release 1.10.1 + +2004-08-17 Jon K Hellan + + * gsf/gsf-utils.c (gsf_base64_decode_simple): Revert base64 + initialization change. + +2004-08-16 Morten Welinder + + * gsf/gsf-utils.c (gsf_base64_encode_simple): Request line + breaking. + +2004-08-13 Jon K Hellan + + * gsf/gsf-utils.c (gsf_base64_decode_simple): Initialize during + first use. + +2004-08-10 Morten Welinder + + * gsf/gsf-input-textline.c (gsf_input_textline_utf8_gets): Fix + off-by-one in buffer length check. + +2004-08-08 Jon K Hellan + + * gsf/gsf-output-stdio.c (follow_symlinks, gsf_output_stdio_new): + Use g_error_new_literal, not g_error_new on strings which we do + not control. + +2004-07-30 Christopher James Lahey + + * gsf/gsf-input.c (gsf_input_class_init), gsf/gsf-output.c + (gsf_output_class_init): Use correct types for properties here. + +2004-07-30 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xml_out_class_init) : Init the parent_class + here. + (gsf_xml_out_init) : not here. + +2004-07-27 Stepan Kasal + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_new_full): + Fix a race condition with a static buffer. + Write correct sb.shift to the header, even if it differs + from the default. + +2004-07-29 Jody Goldberg + + * gsf/gsf-outfile-msole.c (ole_bytes_left_in_block) : sigh. + Pull my head out of my rearend. a one line function with two + errors. I really shouldn't code when tired. + (ole_pad_zero) : remove residual parm rename ole_ from bb_ + (ole_pad_bat_unused) : add a residual parm. + (gsf_outfile_msole_close_root) : pad metabat with BAT_UNUSED + +2004-07-29 Morten Welinder + + * gsf/gsf-input-memory.c (gsf_input_mmap_new): Use NULL, not 0 for + pointer. + (gsf_input_memory_seek): Use G_GNUC_UNUSED instead of + void-casting. + + * gsf/gsf-libxml.c (gsfXMLInParser): Ditto. + (gsf_xml_in_get_entity, gsf_xml_in_warning, gsf_xml_in_error, + gsf_xml_in_fatal_error): Use G_GNUC_UNUSED instead of + void-casting. + (gsf_xml_out_add_color): Make buffer size overflow safe. + + * gsf/gsf-utils.c: Always #define G_ARMFLOAT_ENDIAN. + +2004-07-28 Stepan Kasal + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_close_root): + Check for overflow of the size field of a regular file entry. + +2004-07-28 Jody Goldberg + + * gsf/gsf-outfile-msole.c (bb_pad_zero) : add a residual param to not + fill the entire block if desired and clarify that the current block + is cur_size - HEADER not block_size. + (gsf_outfile_msole_close_root) : Clarify the metabat writing logic a + bit and just in case add a CHAIN_END to the last incomplete metabat + (ole_bytes_left_in_block) : similar to Kasal's suggestion without the + -1 % size + 1 + (bb_pad_zero) : use it here to make this safe to use when not at the + end of the file. + (ole_pad_bat_unused) : and here to fix the mystery corruption when XL + reads the file. + +2004-07-27 Jody Goldberg + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_close_root) : the last + xbat does not require a forwarding link + +2004-07-27 Stepan Kasal + + * gsf/gsf-outfile-msole.c (metabat_size): Nuke; doesn't have to + be an instance variable, it can be local ... + (gsf_outfile_msole_close_root): ... here. + (gsf_outfile_msole_set_block_shift): Don't set metabat_size. + +2004-07-26 Jody Goldberg + + * gsf/gsf-outfile-msole.c (OLE_DEFAULT_METABAT_SIZE): delete + (gsf_outfile_msole_close_root) : pull out of + (gsf_outfile_msole_close) : here as a cleanup gesture. + + Per : Stepan Kasal + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_set_block_shift) : Use + BAT_INDEX_SIZE, not hardwired shift of 2. + (gsf_outfile_msole_close): Use the current sb.shift, not + OLE_DEFAULT_SB_SHIFT. + +2004-07-23 Stepan Kasal + + Replace various instances of local parent_class variables by + a static ones, initialized by class_init. + * gsf/gsf-*.c: (20 files touched) + * gsf/gsf-output-transaction.c: A general cleanup. + +2004-07-21 Stepan Kasal + + The gsf_ouput_printf method didn't correctly update cur_offset. + + The implementations of vprintf virtual method shouldn't touch + cur_offset but they should return the number of bytes written; + the dispatcher updates cur_offset accordingly. + + * gsf/gsf-output-impl.h (Vprintf): The virtual private method now + returns number of bytes printed. + * gsf/gsf-output.c (gsf_output_vprintf): Renamed to ... + (gsf_output_ireal_vprintf): ... this. + (gsf_output_printf): Collect the va_list and call ... + (gsf_output_vprintf): ... this new function, which dispatches + the Vprintf virtual method and takes care of updating cur_offset + and cur_size, via ... + (gsf_output_inc_cur_offset): ... a new static function, extracted + from ... + (gsf_output_write): ... there. + (gsf_output_real_vprintf): In this fallback code, don't call + gsf_output_write, but only dispatch to the Write virual method, + so that gsf_output_inc_cur_offset is not called twice. + * gsf/gsf-output.h (gsf_output_vprintf): New public method. + * gsf/gsf-output-stdio.c (gsf_output_stdio_vprintf): Adapt. + * gsf/gsf-output-transaction.c (gsf_output_trans_vprintf): Likewise. + * gsf/gsf-outfile-msole.c (gsf_output_class): New static variable, + which is set to point to GsfOutput class structure. + (gsf_outfile_msole_vprintf): Adapt. If it's a MSOLE_BIG_FILE, + call vprintf method of the underlaying file, else fall back to + gsf_output_class->Vprintf. + * gsf/gsf-output-memory.c (parent_class): New static variable. + (gsf_output_memory_vprintf): Use it too. Adapt to the new prototype. + +2004-07-21 Stepan Kasal + + Make the two fseek() wrappers more consistent. + + * gsf/gsf-input-stdio.c (gsf_input_stdio_seek): Fix the overflow + checking. + * gsf/gsf-output-stdio.c (gsf_output_stdio_seek): Set errno=0 + before calling fseek(). + +2004-07-21 Stepan Kasal + + Gnomish autogen.sh uses ACLOCAL_FLAGS, if some of the macros are + in nonstandard places. If you touch configure.in then, aclocal.m4 + is regenerated, but without ACLOCAL_FLAGS. This change ensures + that ACLOCAL_FLAGS is propagated to the Makefile. + + * configure.in: AC_SUBST(ACLOCAL_FLAGS) + * Makefile.am: ACLOCAL_AMFLAGS = @ACLOCAL_FLAGS@ + +2004-07-20 Stepan Kasal + + * gsf/gsf-output-stdio.c: Check for overflow + +2004-07-09 Stepan Kasal + + * gsf/gsf-infile-zip.c (zip_find_trailer): Remove the + "overflow check"; it can never catch anything. + + * gsf/gsf-output-memory.c (MAX_STEP): Parenthesize. + (gsf_output_memory_expand): Fix the overflow checking. + (gsf_output_memory_seek): make use of G_GNUC_UNUSED, instead of void + reference. + +2004-07-12 Stepan Kasal + + * gsf/gsf-output-iochannel.c (GET_OUTPUT_CLASS): Remove unused macro. + * gsf/gsf-structured-blob.c (GET_CLASS): Likewise. + +2004-06-15 Jody Goldberg + + * gsf/gsf-utils.c (gsf_input_dump) : flush the stream when we're just + using stdio. + +2004-07-04 J.H.M. Dassen (Ray) + + * configure.in: recheck all PKG_CHECK_MODULES for libgsf for + libgsf-gnome as well, so as not to trip on unresolved symbols with a + -Wl,-z,defs build. + +2004-07-03 Jody Goldberg + + * configure.in : post release bump + +2004-07-03 Jody Goldberg + + * Release 1.10.0 + +2004-07-01 Jody Goldberg + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_vprintf) : premature + optimization is the root of all evil. We can not directly write + small block data because it will be in the wrong place and will miss + the transition to large block. This is not a hugely common case and + does not need such special attention. + +2004-06-25 Jody Goldberg + + * gsf/gsf-output-stdio.c (gsf_output_stdio_seek) : conditionalize the + use of fseeko. + * gsf/gsf-input-stdio.c (gsf_input_stdio_seek) : ditto. + * gsf/gsf-outfile-msole.c : Extend Stuart's work to use the internal + block sizes rather than keeping them global. + +2004-06-25 Jody Goldberg + For : Stuart Cunningham + * gsf/gsf-output-stdio.c (gsf_output_stdio_seek) : use fseeko + * gsf/gsf-input-stdio.c (gsf_input_stdio_seek) : ditto. + * gsf/gsf-outfile-msole.c : rework to honor the requested block sizes + +2004-06-15 Morten Welinder + + * gsf-gnome/gsf-input-gnomevfs.c (gsf_input_gnomevfs_new_uri): + Don't leak info components. Handle lack of get_file_info + supports. Rework make_local_copy case. Work around gnomevfs + get_file_info bogosity. + +2004-06-13 Jody Goldberg + + * configure.in : bump to 1.10.0 to handle all the signature changes in + return values. + * *.[ch] : return the interesting base type rather than the derived + type for *_new. + +2004-06-11 Morten Welinder + + * gsf-gnome/gsf-input-gnomevfs.c (gsf_input_gnomevfs_new): Change + return type to plain GsfInput*. + (gsf_input_gnomevfs_new_uri): Change return type to plain + GsfInput*. If seek is not supported, snarf a local copy. + +2004-06-06 Dom Lachowicz + + * gsf-gnome/gsf-input-gnomevfs.c (gsf_input_gnomevfs_new): Better + solution for Morten's problem. + +2004-05-26 Morten Welinder + + * gsf-gnome/gsf-input-gnomevfs.c (gsf_input_gnomevfs_new): Handle + failure to parse URI. + +2004-05-20 Dom Lachowicz + + * gsf/gsf-outfile-stdio.c: mkdir() has a different prototype on win32 + +2004-05-17 Jody Goldberg + + * gsf/gsf-infile-msole.c (ole_dirent_new) : work around odd files from + softmaker, seems like they consider dirs to be rootdirs ?? + +2004-05-17 Morten Welinder + + * gsf/gsf-utils.c (gsf_le_get_double, gsf_le_set_double): Attempt + ARM fix. Fix various #error messages. + +2004-05-15 Jody Goldberg + + * configure.in : post release bump + +2004-05-15 Jody Goldberg + + * Release 1.9.1 + +2004-05-11 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xml_out_set_doc_type) : new. + + * doc/gsf-sections.txt : more cleanup, still ugly but at least it's + somewhat better. + * doc/gsf-docs.sgml : drop the useless Gsf section + +2004-05-09 Jody Goldberg + + * s/ZipDirent/GsfZipDirent + * s/ZipVDir/GsfZipVDir + +2004-05-09 Dom Lachowicz + + * gsf/gsf-infile-zip.c: Don't pollute the global namespace + * gsf/gsf-outfile-zip.c: Ditto + * gsf/gsf-zip-impl.h: Ditto + * gsf/gsf-zip-utils.c: Ditto + +2004-05-09 Dom Lachowicz + + * gsf/gsf-infile-stdio.c: Fix non-static definition of 'parent_class' + * gsf/gsf-outfile-stdio.c: Ditto + +2004-05-07 James M. Cape + + * doc/gsf-sections.txt: Hide type macros. + * gsf/gsf-output.c: s///. + +2004-05-06 Jody Goldberg + + http://bugzilla.gnome.org/show_bug.cgi?id=141899 + * doc/Makefile.am : Apply patch from James Cape + +2004-05-05 J.H.M. Dassen (Ray) + + * doc/Makefile.am: Install docs in the $(DOC_MODULE) subdir of + $(HTML_DIR) rather than in $(HTML_DIR) itself. + +2004-05-05 Jody Goldberg + + * configure.in : post release bump + +2004-05-04 Jody Goldberg + + * Release 1.9.0 + +2004-05-04 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xml_in_start_element) : support merging of + content from a node and some of it's children + (gsf_xml_in_end_element) : ditto. + (gsf_xml_in_characters) : ditto. + (sf_xml_in_doc_new) : kludge to support the old interface but still + allow new semantics. + +2004-05-01 Dom Lachowicz + + * gsf-gnome/gsf-input-gnomevfs.c (gsf_input_gnomevfs_new_uri) : Don't + require gnome-vfs-method.h + + * gsf-gnome/gsf-output-gnomevfs.c (gsf_output_gnomevfs_new_uri): we + require random access. + + * gsf-win32/gsf-input-win32.c: fix seek's return value in the win32 + IStream input. + +2004-04-28 Jody Goldberg + + * gsf-gnome/gsf-input-gnomevfs.c (gsf_input_gnomevfs_new_uri) : we + require random access. + +2004-04-26 Jody Goldberg + + * doc/Makefile.am : steal a few things from gtk-doc.make to get things + building. A full jump to gtk-doc.make directly is failing, dunno + why + + * Makefile.am : Remove the AUTOMAKE_OPTIONS = 1.4 that disabled the + DISTCHECK_CONFIGURE_FLAGS + +2004-04-24 Jody Goldberg + + * gsf/gsf-infile-msole.c (ole_dirent_new) : placate the bogus + -fstrict-aliasing gods. gcc is being stupid. + + * configure.in : call this 1.9.0 + +2004-04-27 Dom Lachowicz + + * gsf/gsf-output-bzip.c (gsf_output_bzip_write): If the output + buffer turns full on the last deflate, empty the buffer. + +2004-04-24 Morten Welinder + + * gsf/gsf-output-gzip.c (gsf_output_gzip_write): If the output + buffer turns full on the last deflate, empty the buffer. + +2004-04-05 Jody Goldberg + + * gsf-gnome/gsf-input-gnomevfs.c (gsf_input_gnomevfs_seek) : fix sense + of return. This code is clearly not being used. A year and a half + and no one noticed ??? + +2004-03-31 Morten Welinder + + * gsf/gsf-output-stdio.c (gsf_output_stdio_new): Plug leak. + +2004-03-31 Michael Meeks + + * tests/test-msvba-zip.c (find_match): + size limit the matches to the available bits for + storing the match length (doh). & make debug nicer. + +2004-03-16 Morten Welinder + + * gsf/gsf-output.c (gsf_output_finalize): Chain up. + * gsf/gsf-shared-memory.c (gsf_shared_memory_finalize): Chain up. + * gsf-gnome/gsf-shared-bonobo-stream.c + (gsf_shared_bonobo_stream_finalize): Chain up. + +2004-03-12 Michael Meeks + + * gsf/gsf-infile-msvba.c (vba_dir_read), + * tests/test-msvba-zip.c (decode_dir): + simplify / treat op 9 as the quirk-meister. + +2004-03-11 Michael Meeks + + * tests/test-msvba-zip.c (decode_dir): better + quirk understanding. + (find_match): remove unnecessary hacks. + +2004-03-10 Michael Meeks + + * tests/test-msvba-zip.c (decode_dir): impl. + a good run at enterpreting 'dir'. + + * tests/test-msvba-zip.c (do_compress): bin nasty + 3 byte header store / restore and generate header + on the fly. + +2004-03-09 Michael Meeks + + * tests/test-msvba-zip.c (find_match): shrink dodgy + looking matches. + +2004-03-08 Michael Meeks + + * tests/test-msvba-zip.c (output_match): add a + small/stupid LZSS compressor. + +2004-03-08 Michael Meeks + + * tests/test-msvba-zip.c: add for compressing/decompressing + 'dir' (or other pure compressed) streams. + + * gsf/gsf-msole-utils.c (gsf_msole_inflate): move from + * gsf/gsf-infile-msvba.c (gsf_vba_inflate): here. + +2004-03-01 Jody Goldberg + + * configure.in : drop -Wmissing-format-attribute because it was + irritating me. + +2004-03-01 Jody Goldberg + + * gsf/gsf-outfile-stdio.c : + * gsf/gsf-infile-stdio.c : Some utility wrappers to pull or push from + a directory tree. + * tests/test-dump-msole.c : + * tests/test-restore-msole.c : tests for it. + +2004-02-24 Dom Lachowicz + + * configure.in: Add Win32 stuff + * libgsf-win32-1.pc.in: Ditto + * Makefile.am: Ditto + * gsf-win32/Makefile.am: Win32 build system + +2004-02-05 Jon K Hellan + + * configure.in: Fix typo. + +2004-02-05 Tomasz K³oczko + + * Makefile.am: Added "DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc" + for force correct pass build documentation during "make dist" + (like in many other GNOME projects). + Added gtk-doc.make to EXTRA_DIST for generate correct tar ball on + "make dist". + * configure.in: Removed old on place defined gtk-doc suport and added use + GTK_DOC_CHECK([1.0]). + +2004-01-30 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xml_in_fatal_error) : Looks like Daniel has + added another field + +2004-01-30 Jody Goldberg + + http://bugzilla.gnome.org/show_bug.cgi?id=130596 + * configure.in : apply the patch + +Wed Jan 28 00:43:36 2004 Matthias Clasen + + * doc/Makefile.am (EXTRA_HFILES): Add ../gsf-gnome/*.h to give + gtk-doc a chance to pick up declarations from there. (Partial fix + for bug #132661. + +2004-01-20 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xml_in_start_element) : minor portability fix. + +2004-01-18 Dom Lachowicz + + * gsf/gsf-msole-utils.c: Country code for Albania is sq_AL not al_AL + * gsf-win32/*.c: Some work on the IStream input and output + +2003-12-09 Dom Lachowicz + + * gsf/*.c: Documentation + +2003-12-06 Jody Goldberg + + * gsf/gsf-infile-msvba.c : Major work. + We can now extract the compressed source for all of our sample + files. There's still lots of unknowns, but at least the code + is visible now. The next step will be looking at the p-code + +2003-11-28 Jody Goldberg + + * gsf/gsf-utils.c (gsf_input_hex_dump) : new. + (gsf_mem_dump_full) : expand the interface a bit. + +2003-11-03 Jody Goldberg + + * gsf/Makefile.am (uninstall) : make the impl headers for the base + interfaces public. + +2003-10-29 Jody Goldberg + + * gsf/gsf-msole-utils.c (msole_prop_parse) : The anal check should + take the prevailing char width also as noted by Xavier Roche. + + * gsf/gsf-infile-msole.c (ole_init_info) : Doh! do not double convert + to native endianness. Fixes error reading files > 13.6 Meg on sparc + and alpha as noted by Xavier Roche. + +2003-10-21 Jody Goldberg + + * gsf/gsf-msole-utils.c : Make the codepage arguments int to allow + smooth handling of bogus files that encode the codepage as an int + and break the utf-8 page '65001' because it looks like -535 + +2003-10-09 Jody Goldberg + + * libgsf-gnome-1.spec.in : An old patch from Joseph Frazee + +2003-09-29 Jody Goldberg + + * gsf/gsf-infile-msole.c (gsf_infile_msole_new) : as noted by Nick + Lamb a failure should not change the file pos of @input. + +2003-09-23 Jody Goldberg + + * configure.in : downgrade. No need to force a version bump yet. + * gsf/gsf-libxml.c (gsf_xml_parser_context_full) : use a _full version + internally because that seems cleaner than manually tweaking pointers. + However, its a cosmetic change and not worth a version bump. + +2003-09-22 Jody Goldberg + + * configure.in : jump to 1.9.0 for api change. + + * gsf/gsf-libxml.c : Initialize sax handler correctly to make sure + they work with libxml2 2.6.0. + (gsf_xml_parser_context) : take a sax handler and user data so taht we + can initialize it on creation. + +2003-09-21 Tor Lillqvist + + * libgsf-zip.in: New file. + + * configure.in: Expand it. + + * Makefile.am (EXTRA_DIST): Distribute it. + +2003-09-13 Jody Goldberg + + * configure.in : post release bump to 1.8.3 for now. + If this becomes the basis for the interleaved write support it will + jump to 1.9 without a release. + +2003-09-12 Jody Goldberg + + * Release 1.8.2 + +2003-09-12 Jody Goldberg + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_close) : libole2 depends + on all entries having names. Hard code 'Root Entry' for the root. + +2003-08-24 Dom Lachowicz + + * win/libgsf.ds*: Add win32 project files, from Jeremy Davis + * gsf/*: Some casts and ifdefs to let this puppy build on win32 using + MSVC. Also from Jeremy Davis, with some touch-up work by myself. + * configure.in: check for + +2003-08-03 Jody Goldberg + + * gsf/gsf-outfile-msole.c : some initial work to define an interface + for using non-default block sizes. We're just managing these values + not using them yet. + +2003-08-02 Jody Goldberg + + * gsf/gsf-infile-msole.c (ole_make_bat) : weaken the post condition + from error -> warning in the event that a BAT is missing a valid + terminator. We've already loaded a BAT, and we're sure that it is + not too big. Hopefully this will allow some of the data to be + restored. + +2003-08-01 Jody Goldberg + + For Stuart Cunningham + * gsf/gsf-infile-msole.c (gsf_infile_msole_read) : another patch to + fix non-default sector size support. + +2003-07-17 Jody Goldberg + + * gsf/gsf-infile-zip.c (zip_dup) : take an error arg. + (zip_child_init) : ditto. + (gsf_infile_zip_dup) : use the error from zip_dup and zip_child_init. + + * gsf/gsf-infile-impl.h : Take GError args for child_by_* virtuals. + We can not expose them yet. + * gsf/gsf-structured-blob.c (blob_child_by_index) : fix here. + (blob_child_by_name) : and here. + * gsf/gsf-infile-ar.c : and here. + * gsf/gsf-infile-msvba.c : and here. + + * gsf/gsf-infile-msole.c (ole_dup) : catch gsf_input_dup failures + for the underlying source, and take a GError arg. + (gsf_infile_msole_dup) : pass the new err arg to ole_dup and use error + from ole_dup directly. No need to cruft another one up. + (gsf_infile_msole_new_child) : Take a GError arg to pass to ole_dup. + +2003-07-15 Jody Goldberg + + For Stuart Cunningham + * gsf/gsf-infile-msole.c (ole_get_block) : fix ole block seeking in + 4k-sector files + +2003-07-03 Jody Goldberg + + For : Stuart Cunningham + * gsf/gsf-infile-msole.c (ole_dirent_new) : store the directory's CLSID + (gsf_infile_msole_get_class_id) : new. + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_close) : store the CLSID + (gsf_outfile_msole_set_class_id) : new. + (gsf_outfile_msole_init) : be really anal and ensure the CLSID is 0. + +2003-07-02 Jody Goldberg + + * gsf/gsf-infile-msole.c (gsf_infile_msole_new_child) : Even if a + directory claims to have a size set it to 0. Thanks to the AAF + people for the test case. + +2003-06-28 Jody Goldberg + + * doc/Makefile.am : fix the case when gtk-doc is not available + +2003-06-20 Morten Welinder + + * gsf/gsf-input-gzip.c (gsf_input_gzip_read): Handle premature end + of stream. + +2003-06-21 Jody Goldberg + + As per ryang@bway.org : + * README : s/automake/autoconf/ and add automake details. + +2003-06-15 Jon K Hellan + + * configure.in: Remove test for obsolete orbit-python module. + +2003-06-09 J.H.M. Dassen (Ray) + + * debian/*: Updated debianisation. + +2003-06-07 Jody Goldberg + + * configure.in : post release version bump + +2003-06-07 Jody Goldberg + + * Release 1.8.1 + +2003-06-06 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xml_out_simple_int_element) : new util. + (gsf_xml_out_simple_float_element) : ditto. + +2003-05-14 J.H.M. Dassen (Ray) + + * gsf/Makefile.am: Added $(LIBGSF_LIBS) to libgsf_1_la_LIBADD to get + complete inter-library dependency information. + +2003-05-13 Dom Lachowicz + + * COPYING.LIB: update the the version of the LGPL license we're + actually licensed under + +2003-05-13 Dom Lachowicz + + * libgsf-1.spec.in: Updates from Rui + +2003-05-12 Morten Welinder + + * gsf/gsf-output-gzip.c (gsf_output_gzip_finalize): Plug + truck-sized leak. + +2003-05-12 Jody Goldberg + + * configure.in : post release version bump + +2003-05-11 Jody Goldberg + + * Release 1.8.0 + +2003-04-29 Dom Lachowicz + + * gsf-win32/gsf-input-istream.[ch]: IStream based input. Untested + * gsf-win32/gsf-output-istream.[ch]: IStream based output. Untested + +2003-04-29 Morten Welinder + + * gsf/gsf-msole-utils.c + (gsf_msole_iconv_open_codepage_for_import): Try MACROMAN as alias + for 10000. + +2003-04-28 Morten Welinder + + * gsf/gsf-msole-utils.c + (gsf_msole_iconv_open_codepage_for_import): Remove code + duplication. + +2003-04-21 Jody Goldberg + + * gsf/gsf-infile-msole.c (ole_dirent_new) : terminate the name before + conversion. + +2003-04-15 Morten Welinder + + * gsf/gsf-input-memory.c (gsf_input_mmap_new): FREEBSD have broken + mmap -- we must keep the file descriptor around. + +2003-04-09 Jody Goldberg + + From Xavier Roche + * gsf/gsf-msole-utils.c (msole_prop_parse) : gsize is not always + guinit32. Fixes sparc-64 problem. + * gsf/gsf-infile-msvba.c (vba3_dir_read) : ditto. + +2003-04-01 Jody Goldberg + + * gsf/gsf-impl-utils.h : Add utils for objects in plugins + +2003-03-20 Dom Lachowicz + + * configure.in: Better checks for bz2 + +2003-03-20 Morten Welinder + + * gsf/gsf-input-bzip.c (gsf_input_memory_new_from_bzip): Warning + killer. + + * gsf/gsf-libxml.c (gsf_xml_in_doc_new): Kill warning. + +2003-03-09 Jody Goldberg + + * Relicense from GPL -> LGPL + +2003-03-05 Dom Lachowicz + + * NEWS: update for correctness and mention AR infile + * README: typo police + +2003-03-05 Jody Goldberg + + * gsf/gsf-libxml.c : More morten warnings + +2003-03-05 Morten Welinder + + * gsf/gsf-input-memory.c (gsf_input_memory_seek): Fix return type. + + * gsf/gsf-input.c (gsf_input_seek): Fix failure return. + +2003-03-05 Morten Welinder + + * gsf/gsf-infile.c (gsf_infile_num_children): Fix failure return + value. + (gsf_infile_name_by_index): Ditto. + (gsf_infile_child_by_index): Ditto. + (gsf_infile_child_by_name): Ditto. + * gsf/gsf-outfile.c (gsf_outfile_new_child): Ditto. + +2003-03-04 Dom Lachowicz + + * gsf/gsf-zip-impl.h: s/off_t/gsf_off_t + * gsf/gsf-infile-ar.[ch]: AR infile. DOES NOT YET WORK + +2003-02-23 Dom Lachowicz + + * gsf/gsf-input.c (gsf_input_copy): remove == TRUE for Morten + +2003-02-22 Dom Lachowicz + + * gsf/gsf-input.c (gsf_input_uncompress): Support uncompressing BZ2 + streams as well, optionally + +2003-02-22 Dom Lachowicz + + * gsf/gsf-output-bzip.c: Restructure things so that it's possible to + build without bzip2 support + +2003-02-22 Dom Lachowicz + + * gsf/gsf-input-textline.c: Replace g_realloc with g_renew + * gsf/gsf-output-memory.c: Ditto + +2003-02-21 Dom Lachowicz + + * gsf/gsf-input-bzip.c: Implement this + * gsf/gsf-input-memory.[ch]: New function: gsf_input_memory_new_clone + * gsf/Makefile.am: Build bz2 importer, distribute header + * tests/test-bzip.c: New test + * tests/Makefile.am: Add new test + +2003-02-20 Dom Lachowicz + + * gsf/gsf-input-bzip.[ch]: Stubs for a BZ2 input I'm working on + +2003-02-18 Dom Lachowicz + + * gsf/gsf-input.c (gsf_input_class_init): Install GObject properties + (gsf_input_get_property): Ditto + (gsf_input_set_property): Ditto + + * gsf/gsf-output.c (gsf_output_class_init): Install GObject properties + (gsf_output_get_property): Ditto + (gsf_output_set_property): Ditto + +2003-02-14 Dom Lachowicz + + * configure.in: Emit a warning instead of breaking if VFS and Bonobo + aren't found, but --without-gnome wasn't specified. Makes the KDE folk + happy. + +2003-02-11 Jody Goldberg + + * configure.in : compartmentalize the bzip config tests, and trust + libtool for the dependent libraries enough to not mention them in + the pkg-config file + + * gsf/gsf-output-bzip.c : improve the conditionalization. + + * gsf/gsf-input-iochannel.c (gsf_input_memory_new_from_iochannel) : + warning suppression. + +2003-02-09 Dom Lachowicz + + * configure.in: Changes to (optionally) compile bz2 functionality + * Makefile.am: Ditto + * gsf/Makefile.am: Ditto + * tests/Makefile.am: Ditto + * gsf/gsf-output-bzip2.c: Changes to optionally compile parts of this + +2003-02-09 Dom Lachowicz + + * tests/test-out-bzip.c: Tester for new BZip2 output + * gsf/gsf-impl-utils.h: Correct typo + * gsf/gsf-output-gzip.c: Fix memory leak (leaked buffer) + * gsf/gsf-output-bzip.[ch]: New output class, not currently built + +2003-02-09 Dom Lachoiwcz + + * gsf/gsf-input-iochannel.[ch]: Rework as per Jody's suggestions. Now + it is a utility constructor. + +2003-02-09 Dom Lachowicz + + * gsf/gsf-input-iochannel.c: Fixed iochannel. Unfortunately uses memory + backend because there's no way to query the size of an IOChannel + +2003-02-07 Rodrigo Moya + + * gsf/gsf-input-iochannel.[ch]: new GIOChannel based input. + +2003-02-07 Dom Lachowicz + + * gsf/gsf-doc-meta-data.[ch]: Clean API a bit to include consts, gsize + +2003-02-05 Jody Goldberg + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_close) : clip long names, + and do not output a name for the root file. + +2003-02-04 Dom Lachowicz + + * Changed below commit to use g_new instead of g_malloc + typecast, at + Jody's and Morten's request + +2003-02-01 Dom Lachowicz + + * gsf/gsf-infile-msole.c + * gsf/gsf-infile-zip.c + * gsf/gsf-input-gzip.c + * gsf/gsf-input-stdio.c + * gsf/gsf-input-textline.c + * gsf/gsf-outfile-msole.c + * gsf/gsf-output-gzip.c + * gsf/gsf-output-memory.c + * gsf/gsf-utils.c + * gsf-gnome/gsf-input-bonobo.c + * gsf-gnome/gsf-input-gnomevfs.c: More castings needed + +2003-02-01 Dom Lachowicz + + * gsf/gsf-infile-msole.c: Some castings to help things build using + MSVC++ + * gsf/gsf-msole-utils.c: Ditto + +2003-01-31 Dom Lachowicz + + * test/*.c: Correctness fixes in the testcases. No need to unref a null + object + +2003-01-29 Dom Lachowicz + + * *: With Jody's permission, change all _new() calls to return the + derived/subclassed type, instead of the mix we had before + * tests/*: Updated to conform with above + +2003-01-28 Jody Goldberg + + * configure.in : post release version bump + +2003-01-28 Jody Goldberg + + * Release 1.7.2 + +2003-01-24 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xml_in_start_element) : be a touch more anal. + +2003-01-24 Jody Goldberg + + * configure.in : remove -Wunreachable-code it was damn irritating and + mostly wrong. + + * gsf/gsf-msole-utils.c : warning suppression. + + * gsf/gsf-libxml.c (gsf_xml_in_start_element) : support default + namespaces. + (gsf_xml_in_end_element) : ditto. + (gsf_xml_in_start_document) : ditto. + +2003-01-23 J.H.M. Dassen (Ray) + + * configure.in: Calculate MAJOR_VERSION_PLUS_MINOR_VERSION. + +2003-01-22 Jody Goldberg + + * gsf/gsf-libxml.c : Rename everything (again) and add namespace + support for the import wrappers. + + * configure.in : bump version to 1.7.1 to reflect the major changes in + the xml import/export api. + +2003-01-22 J.H.M. Dassen (Ray) + + * gsf/gsf-utils.h, gsf/gsf-utils.c (gsf_base64_encode_close, + gsf_base64_encode_step), gsf/gsf-input.c (gsf_input_copy, + gsf_input_uncompress), + gsf-input-textline.c (gsf_input_textline_utf8_gets): Fixed signedness. + +2003-01-21 J.H.M. Dassen (Ray) + + * gsf/gsf-msole-utils.c: Mark the 11644473600 constant as ULL. + +2003-01-21 J.H.M. Dassen (Ray) + + * gsf/gsf-input.c: The gzip signature consists of unsigned chars. + +2003-01-21 J.H.M. Dassen (Ray) + + * gsf/gsf-libxml.c, gsf/gsf-output-memory.c, gsf/gsf-output.c, + gsf/gsf-structured-blob.c, gsf/gsf-zip-utils.c: #include for + strcmp(), strlen() and memcpy(). + +2003-01-21 J.H.M. Dassen (Ray) + + * configure.in: Redirect grep output to /dev/null instead of using -q + which Morten pointed out doesn't work on Solaris. + +2003-01-20 J.H.M. Dassen (Ray) + + * configure.in: Check if -D_POSIX_SOURCE is needed for the fdopen() + prototype in a cleaner fashion; might fix problems on Mac OS X. + +2003-01-09 Morten Welinder + + * gsf/gsf-input-stdio.c (gsf_input_stdio_read): Handle eof. + +2003-01-08 Dom Lachowicz + + * gsf/gsf-output-iochannel.c (gsf_output_iochannel_write): ensure + large writes happen + + * gsf-gnome/gsf-output-gnomevfs.c (gsf_output_gnomevfs_write): + Ditto + + * gsf/gsf-input-stdio.c (gsf_input_stdio_read): Ensure that large + reads happen + + * gsf-gnome/gsf-output-gnomevfs.c (gsf_input_gnomevfs_read) : + Ditto + +2003-01-08 Jody Goldberg + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_close) : fix off by 1 in + calculation of how many meta bats are required. Store correct + position of initial xbat, the original code did not take small + blocks into account. + + * gsf/gsf-infile-msole.c (ole_make_bat) : add protection against + cycles. + +2003-01-07 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_output_xml_add_attr_cstr_safe) : clone over + logic for escaping strings from libxml and revamp it to be more + libgsf-ish. + + * gsf/gsf-utils.c : rename the base64 utilities and clean up the types + and const to match gsf conventions. + +2003-01-06 Dom Lachowicz + + * gsf/gsf-output-transaction.c : New capability - transacted + outputs. Not thoroughly tested. + + * tests/test-trans.c : Transaction testsuite for above + + * gsf/gsf-output-stdio.c (gsf_output_stdio_write) : Put write + inside of a loop to ensure that large writes are carried out + properly and feof is properly detected + + * TODO: remove the "try to support canceling a write" item since + such functionality is supported via transactions + +2003-01-05 Tor Lillqvist + + * configure.in: Check for lstat() and readlink(). Check for + native Win32 and for Win32 in general (including Cygwin). Set + automake conditionals OS_WIN32 and PLATFORM_WIN32 accordingly. + Add AC_LIBTOOL_WIN32_DLL. + + * gsf/Makefile.am: On Win32, use -no-undefined, and install (and + uninstall) import libraries. + + * gsf/gsf-output-stdio.c: Add workaround #defines for various Unix + stuff on Win32. Bypass follow_symlinks() unless HAVE_READLINK. + +2003-01-05 Jody Goldberg + + * gsf/gsf-utils.c : Pull in the bas64 utilites from evolution. Unused + for now. + +2003-01-05 Jody Goldberg + + * gsf/gsf-output.c (cb_output_unwrap) : renamed from + cb_output_wrap_screwup and weaken restrictions. The weak ref + handler is called before the wrappers finalize, so we can not always + unwrap in such a way as to avoid a warning. Just handle it silently + now. + (gsf_output_wrap) : ditto. Weaken the requirement of the wrapper to + be a GObject, no need for a full fledged GsfOutput. + (gsf_output_unwrap) : ditto. + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_close) : fix reversal of + arguments for the wrapping. + (gsf_outfile_msole_write) : ditto. + * gsf/gsf-outfile-zip.c (zip_init_write) : ditto. + (zip_close_stream) : ditto. + + * gsf/gsf-libxml.c : rename xml_sax -> GsfInputXML + (GsfOutputXML) : new + +2003-01-03 Jody Goldberg + + * gsf/gsf-impl-utils.h : add hooks for interfaces + +2002-12-24 Jody Goldberg + + * gsf/gsf-msole-utils.c (gsf_msole_metadata_read) : patch some warnings. + +2003-01-01 J.H.M. Dassen (Ray) + + * debian/changelog, debian/control, debian/libgsf-1-dev.dirs, + debian/libgsf-1-dev.files, debian/rules: Updated. + +2002-12-30 Jon K Hellan + + * gsf/gsf-msole-utils.c (msole_prop_parse): Check if res is a GValue. + (gsf_msole_metadata_read): Check if v is a GValue and holds an int + before reading codepage. Check if v is a GValue before unsetting. + +2002-12-23 Morten Welinder + + * gsf/gsf-libxml.c (gsf_xml_output_buffer_new): Fix comment and + ref output to match gsf_libxml_close. + +2002-12-20 Morten Welinder + + * gsf/gsf-libxml.c (gsf_libxml_close): Plug leak. + +2002-12-19 Dom Lachowicz + + * gsf-gnome/gsf-input-gnomevfs.c (gsf_input_gnomevfs_new_uri) : Able to + open URI objects as well as strings + + * gsf-gnome/gsf-output-gnomevfs.c (gsf_output_gnomevfs_new_uri) : ditto + +2002-12-11 Jody Goldberg + + * configure.in : post release version bump. + +2002-12-11 Jody Goldberg + + * Release 1.6.0 + +2002-12-10 Jody Goldberg + + * gsf/gsf-msole-utils.c (gsf_msole_lid_for_language) : Suggestion from + Nicolas Peninguy + +2002-12-10 Jody Goldberg + + * gsf/gsf-infile-msole.c (gsf_infile_msole_finalize) : do not unref + the info for the magic internal small block file it was already + removed. + (ole_info_get_sb_file) : do not create a reference loop from the info + to the small block file and back. Remove the default reference from + the magic internal small block file to the info. + +2002-12-10 Morten Welinder + + * gsf/gsf-structured-blob.c (blob_finalize): Link to the right + parent type. + + * gsf/gsf-outfile-zip.c (zip_dirent_new_out): Don't allocate and + throw away memory. + +2002-12-09 Jon K Hellan + + * gsf/gsf-msole-utils.c (msole_prop_parse): Fix typo. + +2002-12-09 Morten Welinder + + * gsf/gsf-outfile-zip.c (disconnect_children): Factor out from + zip_close_root. + (gsf_outfile_zip_finalize): Use here too. (This closes a leak if + closing fails.) + + * gsf/gsf-msole-utils.c (msole_prop_parse): Free the property + values until we figure out what to do with them. + + * gsf/gsf-infile-msole.c (gsf_infile_msole_finalize): Plug leak. + + * gsf/gsf-timestamp.c (gsf_timestamp_as_string): 64-bit fix. + +2002-12-04 Dom Lachowicz + + * gsf/gsf-input.c (gsf_input_copy): Copies a GsfInput to a GsfOutput. + Will probably be useful for some abiword stuff I'll be doing + + * tests/test-cp.c: New test program exercising gsf_input_copy + +2002-12-04 Morten Welinder + + * gsf/gsf-output-stdio.c (follow_symlinks): Fix error return + conventions. + (gsf_output_stdio_new): Clean up error messages. + +2002-12-03 Morten Welinder + + * gsf/gsf-output-stdio.c (gsf_output_stdio_close): Try much harder + restoring owner and permissions. Still not good. + (gsf_output_stdio_new): Simplify using g_path_get_dirname. + Respect non-writable files! + (follow_symlinks): Simplify using g_path_is_absolute and + g_path_get_dirname. Eliminate some race conditions. + +2002-11-29 Jon K Hellan + + * gsf/gsf-output-gzip.c (init_gzip): Return set error if + deflateInit2 fails. + (gzip_output_header): Add missing argument to time(). + +2002-11-27 Jon K Hellan + + * gsf/gsf-libxml.c (gsf_libxml_close): Change to do nothing. We + expect higher layers to close. + (gsf_xmlDocFormatDump): Use encoding argument. Don't call + xmlOutputBufferClose - libxml calls it for us via the callback we + supply. + + * gsf/gsf-libxml.[ch] (gsf_xmlDocFormatDump: Add encoding parameter. + +2002-11-27 Jon K Hellan + + * tests/Makefile.am (check_PROGRAMS): Add test-out-gzip.c + + * gsf/gsf-output-gzip.[ch]: New files. Gzip output. + + * gsf/Makefile.am (libgsf_1_la_SOURCES): Add gsf-output-gzip.c. + (libgsf_1_include_HEADERS): Add gsf-output-gzip.h. + +2002-11-25 Jon K Hellan + + * tests/test-outmem-printf.c (test): Adjust to new + gsf_output_memory_get_bytes API. + + * gsf/gsf-outfile-zip.c (root_register_child): Don't ref children + which are directories. + + * tests/test-zip-out-subdirs.c (test): Make close/unref strategy + the same as in test-cp-zip/test-cp-ole (with change above, this + works!). Test closing subdirs at different times in the lifecycle. + +2002-11-25 Jon K Hellan + + * gsf/gsf-outfile-zip.c (zip_init_write): Fail if already writing + to another stream in archive. Set "writing" flag in zip root to + indicate that we're writing to a stream. + (zip_close_stream): Unset "writing" flag in zip root to indicate + that we're now free to write to a new stream. + (zip_close_root): s/g_message/g_warning/. + + * tests/test-zip-out-subdirs.c (test): Close each substream before + starting to write to the next. + +2002-11-24 Jon K Hellan + + * gsf/gsf-outfile-zip.c (stream_name_len, + stream_name_write_to_buf): Stop recursing at root of zip archive, + i.e. don't append name of archive file to stream names. Take zip + rather than outfile argument. + (stream_name_build): Take zip rather than outfile argument. + (zip_dirent_new_out): Call stream_name_build with new signature. + +2002-11-24 Dom Lachowicz + + * gsf/gsf-ouput-iochannel.c (): New output sink. No IOChannel + input sink possible due to API limitations + + * gsf/gsf-input-stdio.c (_new): Open files with "rb" status + +2002-11-24 Dom Lachowicz + + * gsf/gsf-output-memory.c (gsf_output_memory_get_bytes): WARNING: + changed prototype + (gsf_output_memory_seek): Re-implement seek() in a saner fashion + (gsf_output_memory_write): ditto + (gsf_output_memory_vprintf): ditto + (gsf_output_memory_init): ditto + +2002-11-24 Dom Lachowicz + + * gsf-gnome/gsf-input-gnomevfs.c (gsf_input_gnomevfs_seek): Code + cleanup + +2002-11-24 Dom Lachowicz + + * gsf/gsf-output-memory.c (gsf_output_memory_seek): Implement + seek() by implementing a cursor as well as the existing nwritten + and capacity fields + (gsf_output_memory_write): ditto + (gsf_output_memory_vprintf): ditto + (gsf_output_memory_init): ditto + +2002-11-23 Jody Goldberg + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_vprintf) : rename from + gsf_output_msole_vprintf to conform to naming convention. + (gsf_outfile_msole_class_init) : hook up the vprintf method and fix + some old cut-n-paste errors. + + * gsf/gsf-output.c (gsf_output_finalize) : free the new printf buf. + (gsf_output_init) : init the new printf buf. + (gsf_output_vprintf) : use a stream local buffer and handle older + version of glibc that did not return the required number of + characters. + +2002-11-23 Jon K Hellan + + * tests/test-zip-out-subdirs.c: New test program. Add. + + * tests/Makefile.am (check_PROGRAMS): Add test-zip-out-subdirs. + +2002-11-23 Jon K Hellan + + * tests/test-zip-out.c: New test program. Add. + + * tests/Makefile.am (check_PROGRAMS): Add test-zip-out. + + * gsf/gsf-outfile-zip.c (gsf_outfile_zip_finalize): Only free + vdirs from the root down. + (zip_trailer_write): Take no. of entries as a parameter, so that + the root_order array doesn't have to be live when we call this + function. + (zip_close_root): Slight tweak of Dom's fix. + +2002-11-23 Dom Lachowicz + + * gsf/gsf-outfile-zip.c (zip_close_root): Free the root_array and + unref the child outputs when closing the root directory + +2002-11-22 Dom Lachowicz + + * gsf/gsf-output-stdio.c (gsf_output_stdio_new): Disable creating + backup copies of files, open files with "wb" status instead of + just "w" + +2002-11-22 Dom Lachowicz + + * gsf/gsf-output.c (gsf_output_puts): Check for null input + (gsf_output_vprintf): Don't use static internal buffer, will lead + to nasty race conditions and a memory-leak on shutdown + +2002-11-22 Jon K Hellan + + * tests/test-outmem-printf.c: New test program. Add. + + * tests/Makefile.am (check_PROGRAMS): Add test-outmem-printf. + + * gsf/gsf-output-memory.c (gsf_output_memory_vprintf): + New. vprintf implementation which uses g_vsnprintf directly + into buffer if there is space. + (gsf_output_memory_class_init): Initialize vprintf virtual. + +2002-11-22 Jody Goldberg + + * doc/Makefile.am : pull in newer magic from gtk. + * configure.in : ditto. + +2002-11-22 Jon K Hellan + + * gsf/gsf-outfile-msole.c (gsf_output_msole_vprintf): New. vprintf + implementation which falls through to the sink's implementation if + possible. + (gsf_outfile_msole_class_init): Initialize vprintf virtual. + + * gsf/gsf-output-stdio.c (gsf_output_stdio_vprintf): New. vprintf + implementation which just falls through to vfprintf. + (gsf_output_stdio_class_init): Initialize vprintf virtual. + +2002-11-22 Jon K Hellan + + * tests/test-msole-printf.c: New test program. Add. + + * tests/Makefile.am (check_PROGRAMS): Add test-msole-printf. + +2002-11-21 Jon K Hellan + + * gsf/gsf-output.c (gsf_output_puts): Remove unused variable. + +2002-11-21 Jon K Hellan + + * gsf/gsf-libxml.c (gsf_libxml_write): Fix inverted + success/failure test. + + * gsf/gsf-output-stdio.c (gsf_output_stdio_new): Set name + +2002-11-21 Jon K Hellan + + * gsf/gsf-output.[ch] (gsf_output_printf): New function. printf + for GsfOutput. + (gsf_output_puts): New function. fputs for GsfOutput. + + * gsf/gsf-output-impl.h (struct GsfOutputClass): Add Vprintf virtual. + + * gsf/gsf-output.c (gsf_output_class_init): Initialize to default + vprintf method. + (gsf_output_vprintf): New function: Default vprintf method. + + * tests/test-out-printf.c: New test program. Add. + + * tests/Makefile.am (check_PROGRAMS): Add test-out-printf. + +2002-10-28 Jody Goldberg + + * gsf/gsf-infile-msole.c (ole_dirent_new) : be more careful about + invalid stream names. + +2002-10-30 J.H.M. Dassen (Ray) + + * debian/changelog, debian/control, debian/rules: updated. + * debian/shlibs.local: dropped. + +2002-10-26 Jody Goldberg + + * configure.in : post release version bump + +2002-10-26 Jody Goldberg + + * Release 1.5.0 + +2002-10-26 Jody Goldberg + + * gsf/gsf-msole-utils.c (gsf_msole_lid_to_codepage) : remove warning. + +2002-10-14 Jody Goldberg + + * gsf/gsf-output-memory.c (gsf_output_memory_finalize) : close != exit. + Chain to the parent, and keep the content around until detruction. + +2002-10-22 Dom Lachowicz + + * gsf/gsf-msole-utils.c + (gsf_msole_iconv_open_codepage_for_export): Fix bug where we used + UTF-8 regardless of the 'from' codepage + +2002-10-21 Dom Lachowicz + + * gsf/gsf-msole-utils.c (*): Large rewrite of the codepage handling + code. More functions, more complete, more flexible, etc... + +2002-10-18 Morten Welinder + + * gsf/gsf-input-textline.c (gsf_input_textline_ascii_gets): Handle + end-of-buffer case without asserting. + +2002-10-08 Morten Welinder + + * gsf/gsf-utils.c (gsf_filename_to_utf8): New function. + + * gsf/gsf-input-stdio.c (gsf_input_stdio_new): Ensure sane + filenames before putting them into error messages. + * gsf/gsf-output-stdio.c (follow_symlinks): Ditto. + (gsf_output_stdio_new): Ditto. + (gsf_output_stdio_close): Ditto. + * gsf/gsf-input-memory.c (gsf_input_mmap_new): Ditto. + +2002-10-01 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xmlSAX_prep_dtd) : support recursive + structures. + +2002-09-30 Jody Goldberg + + * configure.in : post release bump + +2002-09-30 Jody Goldberg + + * Release 1.4.0 + +2002-09-27 Jody Goldberg + + * gsf/gsf-structured-blob.c (gsf_structured_blob_read) : fix. + (gsf_structured_blob_write) : fix. + +2002-09-26 Jon K Hellan + + * gsf/gsf-output-memory.c: Remove debug printouts. + +2002-09-26 Jon K Hellan + + * gsf/gsf-output-memory.[ch] (gsf_output_memory_get_bytes): Take + 1st argument GsfOutputMemory instead of GsfOutput. + + * gsf/gsf-output-memory.c (struct _GsfOutputMemory): Add + 'capacity' member. + (gsf_output_memory_new): Don't duplicate work done in + gsf_output_memory_init. + (gsf_output_memory_expand): Encapsulate expansion and make it more + intelligent. + (gsf_output_memory_write): Use gsf_output_memory_expand. + (gsf_output_memory_init): Initialize capacity. + +2002-09-25 Jody Goldberg + + * gsf/gsf-msole-utils.c (msole_prop_read) : remove some debug spew + that snuck in. + +2002-09-24 Jody Goldberg + + * gsf/gsf-msole-utils.c : support unicode property names and values, + including some ugly heuristics to add the documented padding only + when using unicode (? what where they smoking ?) + +2002-09-23 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xmlSAX_prep_dtd) : typo + and make the errors more verbose. + +2002-09-20 Jody Goldberg + + * gsf/gsf-structured-blob.c (gsf_structured_blob_read) : handle out of + memory. + +2002-09-20 Jody Goldberg + + * gsf/gsf-libxml.c (gsf_xmlSAX_parse) : some initial work on utility + structures and routines to make building a sax parser easy. + + * gsf/gsf-structured-blob.c : new utility to read/write trees of + unparsed data. + +2002-09-19 Jon K Hellan + + * gsf/gsf-outfile-zip.h (enum GsfZipCompressionMethod): Define. + + * gsf/gsf-outfile-zip.[ch] + (gsf_outfile_zip_set_compression_method): New function. Set + compression method. + + * gsf/gsf-outfile-zip.c (struct _GsfOutfileZip): Add + compression_mehod member. + (zip_dirent_new_out): Set compression method. + (zip_header_write): Write current compression method. + (zip_init_write, zip_close_stream, gsf_outfile_zip_write): Handle + noncompressed streams. + (zip_header_write_sizes): New function. Write crc and sizes to + local file header. + (gsf_outfile_zip_init): Initialize compression method to deflated. + (gsf_outfile_zip_set_compression_method): New function. Set + compression method. + + * gsf/gsf-output-stdio.c (gsf_output_stdio_seek): Fix typo. + +2002-09-19 Jon K Hellan + + * gsf/gsf-infile-zip.c (zip_read_dirents): Don't expect a file + header at the start of the archive. It's not required by the + specification, and e.g. self-extracting zips do not have one. + With this change, we can read self-extracting zips. + +2002-09-16 Jody Goldberg + + * gsf/gsf-output.c (gsf_output_close) : always close even if the + implementation failed. + (gsf_output_finalize) : free the error. + (gsf_output_init) : init the error. + (gsf_output_seek) : inver the return flag to be consistent with write. + (gsf_output_error) : new. + (gsf_output_set_error) : new. + + * gsf/gsf-output-stdio.c : borrow the temp file handling from gedit so + that we can handle setgid directories correctly. + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_seek) : + invert the return type. + * gsf/gsf-outfile-zip.c (gsf_outfile_zip_seek) : ditto. + * gsf/gsf-output-memory.c (gsf_output_memory_seek) : ditto. + + * gsf/gsf-msole-utils.c (gsf_msole_metadata_write) : add some error + checking. + +2002-09-15 Jody Goldberg + + * gsf/gsf-msole-utils.c (gsf_msole_iconv_win_codepage) : fix warning. + + * configure.in : reorder the _BSD_SOURCE and _POSIX_SOURCE tests + because POSIX changes things under linux. + Add an lstat test + +2002-09-15 Jon K Hellan + + * tests/test-zip2.c: Add. + +2002-09-14 Rodrigo Moya + + * gsf/gsf-command-context.[ch]: added support for warnings. + (gsf_command_context_has_warnings, gsf_command_context_push_warning, + gsf_command_context_pop_warning): new functions. + +2002-09-14 Rodrigo Moya + + * gsf/gsf-command-context.[ch]: new class for command contexts, + stealing some implementation from GsfIOContext. + + * gsf/gsf-io-context.[ch]: base this class on GsfCommandContext. + +2002-09-14 Jon K Hellan + + * gsf/gsf-infile-zip.c (gsf_infile_zip_read): Fix reading + non compressed streams. + +2002-09-13 Jody Goldberg + + * gsf/gsf-msole-utils.c (msole_prop_read) : tweak boundary case + to match reality + +2002-09-14 Jon K Hellan + + * gsf/gsf-outfile-zip.[ch]: Really add this time. + + * gsf/gsf-infile-zip.c: gsf-zip-utils.h doesn't exist - don't + include it! + + * gsf/gsf-zip-utils.c: Ditto. + +2002-09-14 Jon K Hellan + + * tests/Makefile.am: Add test-cp-zip.c + +2002-09-13 Jon K Hellan + + * tests/test-cp-zip.c: Add a test program for zip export. + +2002-09-13 Jon K Hellan + + * gsf/gsf-zip-util.c: Add. + + * gsf/gsf-infile-zip.c (enum ZipCompressionMethod, struct + ZipDirent, struct ZipDir): Move to gsf-zip-impl.h. + (vdir_new, vdir_free, vdir_compare, vdir_add_child, + zip_dirent_free): Move to gsf-zip-utils.c. + (zip_dirent_new): Rename to zip_dirent_new_in. + (vdir_free, zip_info_unref): Add free_dirent parameter to + vdir_free. + (zip_child_init): Move before first use. + (gsf_infile_zip_finalize): Free zlib stream. + + * gsf/Makefile.am: Add gsf-zip-utils.c, gsf-outfile-zip.[ch] + +2002-09-12 Dom Lachowicz + + * gsf/Makefile.am: add gsf-output-memory + + * gsf/gsf-output-memory.c (_seek): fix seek type, compiles + + * gsf-gnome/Makefile.am: add gsf-output-bonobo + + * gsf-gnome/gsf-output-bonobo.c (): make compile + +2002-09-06 Jon K Hellan + + * gsf/gsf-input-gzip.c (init_zip): Factored out of gsf_input_gzip_new. + (gsf_input_gzip_new): See init_zip. + (gsf_input_gzip_dup): Dup source instead of sharing it, and + initialize zip context. + + * gsf/gsf-infile-zip.c (gsf_infile_zip_dup): Call zip_child_init. + +2002-09-04 Jon K Hellan + + * gsf/gsf-infile-zip.c (struct ZipDirent, struct _GsfInfileZip, + zip_dirent_new, zip_dirent_free, zip_update_stream_in, + gsf_infile_zip_read, zip_child_init, gsf_infile_zip_seek, + gsf_infile_zip_init): Move zlib context to GsfInfile object. It is + per opened stream, not per subfile. + (gsf_infile_zip_init, gsf_infile_zip_new): Initialize all fields + in gsf_infile_zip_init. + +2002-09-03 Jon K Hellan + + * gsf/gsf-input-gzip.c (check_header): Fix typo. + +2002-09-03 Jon K Hellan + + * gsf/gsf-libxml.c (gsf_libxml_read): Don't signal error when + reading len = 0. + + * gsf/gsf-input-gzip.c (check_header): Check signature before + seeking to end. Seeking to end is *expensive* if seek is slow in + underlying stream. + Add check that there's room for payload. + +2002-09-02 Jon K Hellan + + * gsf/gsf-infile-zip.c (struct _GsfInfileZip): Add seek_skipped. + (gsf_infile_zip_seek): Implement. As slow as gzip. + (zip_child_init): Initialize dirent->restlen, + dirent->crestlen. Don't call zip_update_stream_in. + (gsf_infile_zip_new): Initialize seek_skipped. + +2002-09-01 Jody Goldberg + + * tests/test-cat-zip.c : replace the old test with test-msole2.c + with s/msole/zip/ so that we get the end of file right. + +2002-08-31 Jody Goldberg + + * gsf/gsf-infile-zip.c (gsf_infile_zip_num_children) : return -1 for + non directories. + +2002-08-31 Jody Goldberg + + * gsf/gsf-timestamp.c : dummy up a quick implementation. + * gsf/gsf-msole-utils.c (msole_prop_parse) : support FILETIME. + +2002-08-30 Jody Goldberg + + * configure.in : remove -Wconversion because it was pissing me off. + +2002-08-30 Jody Goldberg + + * gsf/gsf-msole-utils.c (msole_prop_parse) : add some basic + implementation. + (msole_prop_id_to_gsf) : new. + +2002-08-29 Jody Goldberg + + * gsf/gsf-msole-utils.c (gsf_msole_prop_read) : conditionalize the + debug spew. + +2002-08-29 Jody Goldberg + + * gsf/gsf-msole-utils.c (gsf_msole_prop_parse) : new. + (gsf_msole_prop_read) : new. + (gsf_msole_metadata_read) : prepare to parse the actual properties. + +2002-08-28 Jody Goldberg + + * gsf/gsf-input-gzip.c (gsf_input_gzip_new) : restore the current file + position when sniffing for gzip fails. + +2002-08-28 Jody Goldberg + + * gsf/gsf-msole-metadata.c (gsf_msole_iconv_open_for_export) : moved + from gnumeric. + (gsf_msole_iconv_open_for_import) : ditto. + (gsf_msole_iconv_win_codepage) : ditto. + * gsf/gsf-utils.c (gsf_iconv_close) : ditto. + (gsf_extension_pointer) : moved from gnumeric, originally from libgnome. + +2002-08-26 Jon K Hellan + + * gsf-gnome/gsf-input-bonobo.[ch], + gsf-gnome/gsf-output-bonobo.[ch], + gsf-gnome/gsf-input-gnomevfs.[ch], + gsf-gnome/gsf-output-gnomevfs.c, gsf/gsf-infile-msvba.c, + gsf/gsf-input-gzip.h, gsf/gsf-input-impl.h, + gsf/gsf-input-memory.h, gsf/gsf-msole-impl.h, + gsf/gsf-output-impl.h, gsf/gsf-output-memory.h, + gsf/gsf-output-stdio.h, gsf/gsf-output.c, gsf/gsf-shared-memory.h, + gsf/gsf-zip-impl.h, gsf/gsf.h: Fix file headers - file name was + wrong. + +2002-08-26 Jon K Hellan + + * gsf/gsf-infile-zip.c (struct ZipVDir): Define struct to + represent a directory entry in a tree of contained files. + (struct ZipInfo): Add vdir. Move dirent_list here from + _GsfInfileZip. + (struct _GsfInfileZip): Add vdir. Remove dirent_list and dirent. + (vdir_new, vdir_free, vdir_child_by_name, vdir_child_by_index, + vdir_compare, vdir_add_child, vdir_insert): New + functions. Operations on file tree directories. + (zip_info_unref): Free dirent_list and vdir. + (zip_read_dirents): Renamed from zip_init_info. dirent_list now in + ZipInfo. + (zip_build_vdirs): New function. Build directory tree of contained + files. + (zip_init_info): New function, old name. Wraps zip_read_dirents + and zip_build_vdirs. + (gsf_infile_zip_dup): Copy vdir, not dirent. + (zip_update_stream_in, + (gsf_infile_zip_read): dirent now in vdir. + (zip_child_init): New function. Contains the parts of + gsf_infile_zip_new_child which operated on the zip file. + (gsf_infile_zip_new_child): Simplify and call zip_child_init. + (gsf_infile_zip_child_by_index, gsf_infile_zip_name_by_index): Use + vdir_child_by_index. + (gsf_infile_zip_child_by_name): Use vdir_child_by_name + (gsf_infile_zip_num_children): Count children in vdir. + (gsf_infile_zip_finalize): dirent_list is no longer freed here. + (gsf_infile_zip_init, gsf_infile_zip_new): Initialize vdir. + + * gsf/gsf-zip-impl.h (ZIP_NAME_SEPARATOR): Define path name + component separator for zip archives. + +2002-08-26 Morten Welinder + + * gsf/gsf.h: Don't include here. + * gsf/gsf-input.h: Do it here. + * gsf/gsf-output.h: And here. + + * configure.in: Take out -Wcast-align until someone fixes the + hundreds of things that violates it. + +2002-08-25 Jody Goldberg + + * configure.in : post release version bump + +2002-08-25 Jody Goldberg + + * Release 1.3.0 + +2002-08-22 Jon K Hellan + + * gsf/gsf-infile-zip.c (zip_find_trailer): Fix case when no match + is found first time round. + +2002-08-21 Jon K Hellan + + * gsf/gsf-infile-zip.c (zip_find_trailer): Don't try to read + beyond EOF. + +2002-08-21 Jon K Hellan + + * gsf/gsf-infile-zip.c (struct _GsfInfileZip): Add buf and + buf_size for inflating. + (zip_init_info, gsf_infile_zip_dup): Use g_error_new rather than + g_set_error. + (gsf_infile_zip_read): Fix segfaulting bug. Make inflate buffer a + private member of the class rather than a static. + (gsf_infile_zip_finalize): Free inflate buffer. + (gsf_infile_zip_new): Initialize inflate buffer. + + * tests/test-cp-msole.c: Revert 2nd arg to + gsf_input_read/write from gsf_off_t to size_t. + +2002-08-21 Mikael Hallendal + + * tests/test-textline.c (test): output argv[0] when printing + Usage. + +2002-08-20 Jody Goldberg + + * gsf-gnome/Makefile.am : depend on libgsf + +2002-08-20 Jon K Hellan + + * gsf-gnome/.cvsignore: Add. + +2002-08-19 Jon K Hellan + + * tests/test-cp-msole.c (clone): Cast 2nd arg to + gsf_input_read/write to gsf_off_t. + +2002-08-19 Jon K Hellan + + * gsf/gsf.h: Remove GsfSeekType. + + * gsf/gsf-input.[ch]: s/GsfSeekType/GSeekType/ in gsf_input_seek + signature. + + * gsf/gsf-output.[ch]: s/GsfSeekType/GSeekType/ in gsf_output_seek + signature. + + * gsf/gsf-input-impl.h (GsfInputClass) s/GsfSeekType/GSeekType/ in + Seek method. + + * gsf/gsf-output-impl.h (GsfOutputClass) Ditto. + + * gsf/gsf-infile-msole.c (gsf_infile_msole_seek): + s/GsfSeekType/GSeekType/ in signature. + + * gsf/gsf-infile-msvba.c (gsf_infile_msvba_seek): Ditto. + + * gsf/gsf-infile-zip.c (gsf_infile_zip_seek): Ditto. + + * gsf/gsf-input-gzip.c (gsf_input_gzip_seek): Ditto. + + * gsf/gsf-input-memory.c (gsf_input_memory_seek): Ditto. + + * gsf/gsf-input-stdio.c (gsf_input_stdio_seek): Ditto. + + * gsf/gsf-input-textline.c (gsf_input_textline_seek): Ditto. + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_seek): Ditto. + + * gsf/gsf-output-stdio.c (gsf_output_stdio_seek): Ditto. + + * gsf-gnome/gsf-input-bonobo.c (gsf_input_bonobo_seek): Ditto. + + * gsf-gnome/gsf-input-gnomevfs.c (gsf_input_gnomevfs_seek): Ditto. + + * gsf-gnome/gsf-output-bonobo.c (gsf_output_bonobo_seek): Ditto. + + * gsf-gnome/gsf-output-gnomevfs.c (gsf_output_gnomevfs_seek): Ditto. + + * gsf/gsf-input.c (gsf_input_seek): Replace GSF_SEEK_SET, CUR, END + with G_SEEK_SET, CUR, END. + + * gsf/gsf-input-gzip.c (gsf_input_gzip_seek): Ditto. + + * gsf/gsf-input-stdio.c (gsf_input_stdio_seek): Ditto. + + * gsf/gsf-output.c (gsf_output_seek): Ditto. + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_seek): Ditto. + + * gsf/gsf-output-stdio.c (gsf_output_stdio_seek): Ditto. + + * gsf-gnome/gsf-input-bonobo.c (gsf_input_bonobo_seek): Ditto. + + * gsf-gnome/gsf-input-gnomevfs.c (gsf_input_gnomevfs_seek): Ditto. + + * gsf-gnome/gsf-output-bonobo.c (gsf_output_bonobo_seek): Ditto. + + * gsf-gnome/gsf-output-gnomevfs.c (gsf_output_gnomevfs_seek): Ditto. + + * gsf/gsf-infile-msole.c (ole_get_block, ole_init_info, + gsf_infile_msole_read, gsf_infile_msole_new_child): + s/GSF_SEEK_SET/G_SEEK_SET/. + + * gsf/gsf-infile-msvba.c (vba_inflate, vba56_dir_read, + gsf_infile_msvba_seek, gsf_infile_msvba_seek): Ditto. + + * gsf/gsf-infile-zip.c (zip_find_trailer, zip_dirent_new) + (zip_init_info, zip_init_info, zip_update_stream_in) + (gsf_infile_zip_new_child): Ditto. + + * gsf/gsf-input-gzip.c (check_header, check_header): Ditto. + + * gsf/gsf-input.c (gsf_input_dup, gsf_input_uncompress): Ditto. + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_seek, + gsf_outfile_msole_close): Ditto. + +2002-08-18 Jon K Hellan + + * configure.in: Revert today's first change to the file, but keep + the second. + +2002-08-18 Jon K Hellan + + * configure.in: See below. Hope it's true this time. + +2002-08-18 Jon K Hellan + + * configure.in: Make --without-gnome work. + +2002-08-18 Jon K Hellan + + * acinclude.m4: Change it to just a comment referring to + python/README-python. + + * acinclude.m4.am15: Added. A copy of the previous version, but no + longer commented out. See python/README-python. + +2002-08-17 Jody Goldberg + + * gsf/Makefile.am : install the xml header + +2002-08-17 Jon K Hellan + + * libgsf-gnome-1.pc.in (Cflags): Fix Libs line. + +2002-08-17 Jon K Hellan + + * Makefile.am (pkgconfig_DATA): Add libgsf-gnome-1.pc when + --with-gnome is selected. + (EXTRA_DIST): Add libgsf-gnome-1.spec, libgsf-gnome-1.spec.in and + libgsf-gnome-1.pc.in + +2002-08-16 Jody Goldberg + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_close) : pad the last bat + and sbat block with unused rather than 0. + (ole_pad_bat_unused) : New. + +2002-08-16 Jody Goldberg + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_close) : clean up the + iteration to calculate the number of bat blocks required to hold the + bat and metabat. Fill in the bat flags for the metabat. + +2002-08-16 Jody Goldberg + + * configure.in : move bonobo and gnome-vfs into a standalone library. + + * gsf/gsf-infile-msole.c (ole_init_info) : add a warning about invalid + state. + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_new) : Fill with 0xff + instead of 0 to be more compatible with MS. + (gsf_outfile_msole_close) : If there is no small block data don't + pretend there is an allocation chain for it. Write BAT entries for + the bat itself. TODO : BAT entries for the metabat. + +2002-08-16 Morten Welinder + + * gsf/gsf-io-context.c (gsf_io_context_update_progress): Don't + zero out memory only to overwrite it. + +2002-08-16 Jon K Hellan + + * configure.in: Require autoconf 2.52 + +2002-08-16 Morten Welinder + + * gsf/gsf-metadata-bag.c (gsf_metadata_bag_new): Fix prototype. + * gsf/gsf-output-memory.c (gsf_output_memory_new): Ditto. + (gsf_output_memory_write): Fix brown-bag. + +2002-08-15 Jon K Hellan + + * configure.in: Test for orbit-python. + +2002-08-15 Jon K Hellan + + * gsf/gsf-input-memory.c (gsf_input_mmap_new): Stop warnings on + Solaris. + +2002-08-15 Jon K Hellan + + * gsf/gsf-shared-memory.c (gsf_shared_memory_finalize): Cast to + gsf_off_t when checing for overflow. + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_close, + gsf_outfile_msole_write): Ditto. + + * gsf/gsf-input-bonobo.c (gsf_input_bonobo_seek): Ditto. + + * gsf/gsf-infile-zip.c (zip_find_trailer): Ditto. + + * gsf/gsf-output-stdio.c (gsf_output_stdio_seek): Use long, not + off_t for offset arg. to fseek. + + * gsf/gsf-input-stdio.c (gsf_input_stdio_seek): Ditto. + + * gsf/gsf-input-memory.c (gsf_input_mmap_new): Add forgotten + argument to g_error_new. + +2002-08-15 Jon K Hellan + + * configure.in: Bump minor verision to 1.3. Add AC_SYS_LARGEFILE. + + * gsf/gsf.h: Rename GsfOff_t enum to GsfSeekType. Define gsf_off_t + type to use instead of off_t. We have to do this because we do not + know what idea the application has of the size of off_t, this can + be defined with #define _FILE_OFFS_BITS xx. + + * gsf/gsf-shared-memory.h (struct _GsfSharedMemory): Change type + of size to gsf_off_t. + + * gsf/gsf-output-stdio.c (gsf_output_stdio_seek): Change type of + offset parameter to gsf_off_t, type of 'whence' parameter to + GsfSeekType. Check for overflow copying from gsf_off_t to off_t. + + * gsf/gsf-output-impl.h (struct _GsfOutput): Change type of + cur_size, cur_offset to gsf_off_t. + (GsfOutputClass): Change type of offset parameter of Seek method + to gsf_off_t, type of 'whence' parameter to GsfSeekType. + + * gsf/gsf-output-gnomevfs.c (gsf_output_gnomevfs_new): Various + fixes. + (gsf_output_gnomevfs_seek): Change type of offset parameter to + gsf_off_t, type of 'whence' parameter to GsfSeekType. Cast + 'whence' argument to gnome_vfs_seek to GnomeVFSFileOffset to shut + up warning. + (gsf_output_gnomevfs_write): Cast 'bytes' argument to + gnome_vfs_write to GnomeVFSFileSize to shut up warning. + + * gsf/gsf-output-bonobo.c (gsf_output_bonobo_seek): Change type of + offset parameter to gsf_off_t, type of 'whence' parameter to + GsfSeekType. + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_seek): Change type of + offset parameter to gsf_off_t, type of 'whence' parameter to + GsfSeekType. Type of offset argument to gsf_input_seek has changed + to gsf_off_t. Use. + (gsf_outfile_msole_close): Return type of gsf_output_tell is + changed to gsf_off_t. Introduce gsf_off_t typed variable data_size + to detect overflow. Type of size argument to gsf_output_set_size + has changed to gsf_off_t. Use. Type of offset argument to + gsf_output_seek has changed to gsf_off_t. Use. + (gsf_outfile_msole_write): Return type of gsf_output_tell is + changed to gsf_off_t. Introduce gsf_off_t typed variables wsize + and start_offset to detect overflow. + + * gsf/gsf-libxml.c (gsf_libxml_read): Return type of + gsf_input_remaining has changed to gsf_off_t. Use. + + * gsf/gsf-io-context.c (GSF_CLASS): G_TYPE_GLIB is the parent + class, not the io-context class itself. + + * gsf/gsf-input.h: (gsf_input_size, gsf_input_remaining, + gsf_input_tell): Change return type to gsf_off_t. + (gsf_input_seek): Change type of offset parameter to gsf_off_t, + type of 'whence' parameter to GsfSeekType. + + * gsf/gsf-input.c (gsf_input_dup): Type of offset argument to + gsf_input_seek has changed to gsf_off_t. Use. + (gsf_input_size, gsf_input_remaining, gsf_input_tell): Change + return type to gsf_off_t. + (gsf_input_seek): Change type of offset parameter to gsf_off_t, + type of 'whence' parameter to GsfSeekType. + (gsf_input_set_size): Change type of size parameter to gsf_off_t. + (gsf_input_seek_emulate): Change type of pos parameter to + gsf_off_t. + (gsf_input_uncompress): Change type of cur_offset variable to + gsf_off_t. Type of offset argument to gsf_input_seek has changed + to gsf_off_t. Use. + + * gsf/gsf-input-textline.c (gsf_input_textline_new): Remove cast + of size argument to gsf_input_set_size. + (gsf_input_textline_seek): Change type of offset parameter to + gsf_off_t, type of 'whence' parameter to GsfSeekType. + (gsf_input_textline_ascii_gets, gsf_input_textline_utf8_gets ): + Add 'remain' variable, and make sure that overflows don't occur. + + * gsf/gsf-input-stdio.c (gsf_input_stdio_new): Change type of size + variable to gsf_off_t. + (gsf_input_stdio_seek): Change type of offset parameter to + gsf_off_t, type of 'whence' parameter to GsfSeekType. Check for + overflow copying from gsf_off_t to off_t. + + * gsf/gsf-input-memory.h: Change type of length parameter to + gsf_off_t. + + * gsf/gsf-input-memory.c (gsf_input_memory_new): Change type of + length parameter to gsf_off_t. + (gsf_input_memory_seek): Change type of offset parameter to + gsf_off_t, type of 'whence' parameter to GsfSeekType. + (gsf_input_mmap_new): Check for overflow copying from st.st_size + to ssize_t. Type of size argument to gsf_shared_memory_mmapped_new + and gsf_input_set_size has changed to gsf_off_t. Use. + + * gsf/gsf-input-impl.h (struct _GsfInput): Change type of size, + cur_offset to gsf_off_t. + (GsfInputClass): Change type of offset parameter of Seek method to + gsf_off_t, type of 'whence' parameter to GsfSeekType. + (gsf_input_set_size): Change type of size parameter to gsf_off_t. + (gsf_input_seek_emulate): Change type of pos parameter to + gsf_off_t. + + * gsf/gsf-input-gzip.c (struct _GsfInputGZip): Change type of + seek_skipped to gsf_off_t. + (check_header): Type of offset argument to gsf_input_seek is + changed to gsf_off_t. Use. Type of size argument to + gsf_input_set_size has changed to gsf_off_t. Use. + (gsf_input_gzip_read): Return type of gsf_input_remaing has + changed to gsf_off_t. Use. + (gsf_input_gzip_seek): Change type of offset parameter to + gsf_off_t, type of 'whence' parameter to GsfSeekType. + + * gsf/gsf-input-gnomevfs.c (gsf_input_gnomevfs_new): Change type + of size variable to gsf_off_t. Cast 'code' argument to g_set_error + to gint to shut up warning. + (gsf_input_gnomevfs_read): Cast 'bytes' argument to gnome_vfs_read + to GnomeVFSFileSize to shut up warning. + (gsf_input_gnomevfs_seek): Change type of offset parameter to + gsf_off_t, type of 'whence' parameter to GsfSeekType. Cast + 'whence' argument to gnome_vfs_seek to GnomeVFSFileOffset to shut + up warning. + + * gsf/gsf-input-bonobo.c (struct _GsfInputBonobo): Change type of + 'pos' to gsf_off_t. + (gib_synch_shared_ptr): Cast to gsf_off_t when assigning pos. + (gsf_input_bonobo_new): Change type of size variable to + CORBA_long. Type of size argument to gsf_input_set_size is + changed to gsf_off_t. Use. + (gsf_input_bonobo_seek): Change type of offset parameter to + gsf_off_t, type of 'whence' parameter to GsfSeekType. Check for + overflow copying from gsf_off_t to CORBA_long. + + * gsf/gsf-infile-zip.c (zip_find_trailer): Change return type to + gsf_off_t. Check for overflow copying from gsf_off_t to size_t. + (zip_dirent_new, gsf_infile_zip_new_child): Change type of offset + parameter to gsf_off_t. Type of size argument to + gsf_input_set_size has changed to gsf_off_t. Use. + (gsf_infile_zip_new): Type of size argument to gsf_input_set_size + has changed to gsf_off_t. Use. + + * gsf/gsf-infile-msvba.c (vba_inflate): Change type of offset + parameter to gsf_off_t. + (vba3_dir_read): Cast 2nd argument to vba_inflate to gsf_off_t. + (gsf_infile_msvba_seek): Change type of offset parameter to + gsf_off_t, type of 'whence' parameter to GsfSeekType. + (gsf_infile_msvba_new): Type of size argument to + gsf_input_set_size has changed to gsf_off_t. Use. + + * gsf/gsf-infile-msole.c (ole_get_block, ole_init_info, + gsf_infile_msole_read, gsf_infile_msole_new_child): Type of offset + argument to gsf_input_seek has changed to gsf_off_t. Use. + (gsf_infile_msole_seek): Change type of offset parameter to + gsf_off_t, type of 'whence' parameter to GsfSeekType. + (gsf_infile_msole_new_child, gsf_infile_msole_new): Type of size + argument to gsf_input_set_size has changed to gsf_off_t. Use. + +2002-08-12 Jody Goldberg + + * Release 1.2.0 + +2002-08-06 Morten Welinder + + * gsf/gsf-utils.c (gsf_le_get_double, gsf_le_set_double): New + functions (from gnumeric). + * gsf/gsf-utils.h: Add macros for signed types. + +2002-08-05 Jody Goldberg + + * tests/test-msole1.c (test) : why did I add that limitation ? + +2002-08-05 Jody Goldberg + + * gsf/gsf-output.c (gsf_output_is_closed) : forgot to implement. + +2002-08-02 Jody Goldberg + + * configure.in : bump version + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_finalize) : add a safety + to close the file before finalizing. + + * gsf/gsf-output.c (gsf_output_finalize) : add a warning when + finalizing an unclosed stream. + (gsf_output_init) : init the new is_closed flag. + +2002-08-02 Rodrigo Moya + + * gsf/gsf-io-context.c: removed progress_min and progress_max, since + they don't seem too useful right now (ie, let's keep it simple). + (gsf_io_context_clear): free progress_ranges list and initialize + progress-related internal values. + (gsf_io_context_update_progress): implemented. + (gsf_io_context_class_init): added "progress" signal to class. + +2002-08-01 J.H.M. Dassen (Ray) + + * doc/Makefile.am (HTML_DIR) : conditionally define. + * doc/gsf-docs.sgml : tidy up. + +2002-07-27 Dom Lachowicz + + * MAINTAINERS : add myself + * gsf-metadata-bag.[ch] : add cardinatliy (size) method + +2002-07-26 Dom Lachowicz + + * gsf-output-bonobo.[ch]: implement output stream (untested) + +2002-07-26 Dom Lachowicz + + * gsf-meta-keys.h: list of default/builtin keys that we will want + to support + + * gsf-metadata-bag.[ch]: add key creation and manipulation + functions, update TODO list + +2002-07-26 Dom Lachowicz + + * gsf-metadata-bag.c: implement (untested) + +2002-07-25 Dom Lachowicz + + * gsf-input-gnomevfs.[ch]: implement (untested) + * gsf-output-gnomevfs.[ch]: implement (untested) + * gsf-output-memory.[ch]: implement (untested) + +2002-07-22 Zbigniew Chyla + + * gsf-input-gnomevfs.c (struct _GsfInputGnomeVFS): + Added missing semicolon at the end of struct. + +2002-07-21 Jody Goldberg + + * Release 1.1.0 + +2002-07-17 Jody Goldberg + + * gsf/gsf-utils.c (gsf_mem_dump) : tweak. + +2002-07-15 Morten Welinder + + * gsf/gsf-infile-msole.c (gsf_infile_msole_dup): Don't ignore err + -- that will crash the caller. + + * gsf/gsf-input-memory.c (gsf_input_mmap_new): Plug file + descriptor leaks. + +2002-07-09 Jody Goldberg + + * gsf/gsf-input.c (gsf_input_dup) : avoid leak if derived dup has + already assigned a name. + +2002-07-08 Jody Goldberg + + * tests/test-cp-msole.c (test) : simplify. + +2002-07-08 Jody Goldberg + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_new) : doh! + fix the header to include the correct small block shift. + +2002-07-08 Jody Goldberg + + * gsf/gsf-outfile-msole.c (ole_name_cmp) : new. + (gsf_outfile_msole_new_child) : order the names correctly. + (gsf_outfile_msole_close) : write meta bats. + + * gsf/gsf-msole-impl.h : add OLE_HEADER_METABAT_SIZE. + * gsf/gsf-infile-msole.c (ole_init_info) : use it here. + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_close) : and here. + +2002-07-07 Jody Goldberg + + * gsf/Makefile.am : Make gsf-impl-utils.h public + +2002-07-06 Jody Goldberg + + * gsf/gsf-msole-impl.h : pull in more information. We may not need it + but it makes for better documentation than 'unknown' + +2002-07-06 Jody Goldberg + + * gsf/gsf-outfile-msole.c : initial implementation. + * gsf/gsf-outfile.c : initial implementation. + * gsf/gsf-output.c : initial implementation. + +2002-07-05 Jody Goldberg + + * gsf/gsf-infile-msole.c (ole_dirent_new) : be more anal in case the + input file has a cycle. + +2002-07-03 Jody Goldberg + + * tests/test-textline.c (test) : make the compiler shut up. + +2002-06-27 Morten Welinder + + * gsf/gsf-input-gzip.c (check_header): Set header_size here. + (gsf_input_gzip_read): When allocating a buffer, allocate at least + 256 bytes so we don't have to realloc all the time. + (gsf_input_gzip_read): Handle truncated streams. + + * gsf/gsf-input.c (gsf_input_seek): Handle seeks that go to same + position here. + (gsf_input_uncompress): Reorganise a bit. + + * gsf/gsf-infile-msole.c (ole_dirent_free): Actually free the + dirent. And the list of children. + +2002-06-27 Morten Welinder + + * gsf/gsf-input-gzip.c (gsf_input_gzip_read): Exit on error. + + * gsf/gsf-infile-msole.c (ole_init_info): Always set error info. + + * configure.in (LIBGSF_LIBS): Include the Bonobo libs. + + * tests/test-msole2.c (test): Plug leak. Uncompress source. + + * gsf/gsf-input.c (gsf_input_uncompress): New function. + + * gsf/gsf-input-gzip.c (gsf_input_gzip_finalize): Plug leak. + +2002-06-27 Jon K Hellan + + * gsf/gsf-input-bonobo.c: Actually check in the stuff mentioned + yesterday. + +2002-06-27 Morten Welinder + + * gsf/gsf-input-gzip.c (gsf_input_gzip_seek): Attempt + implementation. + + * gsf/gsf-input.c (gsf_input_seek): Make pos an off_t. + +2002-06-26 Jon K Hellan + + * gsf/gsf-input-bonobo.c (struct _GsfInputBonobo): Replace stream + attribute with GsfSharedBonoboStream * 'shared'. Add 'pos' + attribute. + (gib_synch_shared_ptr): New helper function. Seek the shared + stream if necessary. + (gsf_input_bonobo_new): Probably better to free the exceptions + *after* retrieving the exception texts. Initialize 'shared'. + (gsf_input_bonobo_finalize): unref 'shared'. + (gsf_input_bonobo_dup): Implement. + (gsf_input_bonobo_read): Use shared stream. Use + gib_synch_shared_ptr to seek first if necessary. + (gsf_input_bonobo_seek): Ditto. + (gsf_input_bonobo_init): Initialize 'shared'. + + * gsf/gsf-shared-bonobo-stream.[ch]: new helper class for bonobo + stream IO. Lets us dup the streams. + * gsf/Makefile.am: added new files. + +2002-06-26 Morten Welinder + + * configure.in: If needed, define __EXTENSIONS__. + +2002-06-26 Jon K Hellan + + * gsf/gsf-input-bonobo.c: Include bonobo-persist-stream.h + (gsf_input_bonobo_read): Silence warning. + +2002-06-25 Jon K Hellan + + * configure.in: New flag --with-bonobo + + * gsf/Makefile.am (INCLUDES): added new files. + + * gsf/gsf-input-bonobo.[ch]: new class for bonobo stream IO. + +2002-06-25 Rodrigo Moya + + * gsf/gsf-io-context.[ch]: new class for managing IO contexts. + + * gsf/Makefile.am: added new files. + +2002-06-24 Jody Goldberg + + * python/Makefile.am : pyexec is not available in automake-1.4. + nor is nodist_. + + * acinclude.m4 : something was still interpretting the AC_REQUIRE even + though ti was commented out. change case and comment for now to + avoid problems. + +2002-06-23 Jon K Hellan + + * acinclude.m4: Comment out everything. + +2002-06-21 Jody Goldberg + + * configure.in : uncomment the AM_CONDITIONAL for WITH_PYTHON + +2002-06-21 Jon K Hellan + + * acinclude.m4: Add it. It provides AM_CHECK_PYTHON_HEADERS. + +2002-06-20 Morten Welinder + + * gsf/gsf-outfile-msole.c (gsf_outfile_msole_new_child): Add + missing arg. + +2002-06-20 Jon K Hellan + + * configure.in: Add support for building Python bindings, but + comment it out because it requires automake1.5. + + * Makefile.am: Build python subdir if WITH_PYTHON is set. + +2002-06-18 Rui M. Seabra + + * libgsf-1.spec.in : set permission correctly + fix common mistake of Copyright flag into License flag. + +2002-06-18 Jody Goldberg + + * configure.in : lower the libxml version req + +2002-06-17 Jody Goldberg + + * gsf/gsf-outfile.c (gsf_outfile_new_child) : adjust signature to + include 'is_dir' + +2002-06-15 Jody Goldberg + + * gsf/gsf-input.c (gsf_input_eof) : fix docs. + + * gsf/gsf-utils.c (gsf_mem_dump) : use size_t. + +2002-06-13 Jody Goldberg + + * gsf/gsf-input-textline.c (gsf_input_textline_ascii_gets) : implement. + (gsf_input_textline_utf8_gets) : pretend to implement. + +2002-06-13 Jody Goldberg + + * Makefile.am : move the tests into a standalone dir because they are + getting irritating to build for every single library rebuild. + +2002-06-13 Morten Welinder + + * gsf/gsf-infile-msvba.c (vba_inflate): Make offset an off_t. + +2002-06-13 Jody Goldberg + + * gsf/gsf-outfile-msole.c : initial stub implementation. + * gsf/gsf-outfile.c : initial stub implementation. + * gsf/gsf-output-stdio.c : initial stub implementation. + * gsf/gsf-output.c : initial stub implementation. + +2002-06-13 Jody Goldberg + + * gsf/gsf-infile-msvba.c (vba_inflate) : cleanup. + +2002-06-13 Jody Goldberg + + * gsf/gsf-infile-msole.h (GSF_OLE_GET_GUINT{8,16,32}) : move to + gsf-utils and rename. + + * gsf/gsf-input-memory.c (gsf_input_memory_dup) : silence warning. + (gsf_input_mmap_new) : fix the no mmap case. + +2002-06-12 Jody Goldberg + + * gsf/gsf-infile-msvba.c (vba_inflate) : store the uncompressed + result. + (vba_dirent_read) : new. We can now lookup the correct offsets for + the compressed source. The question remaining is how to fin the + start of the dir table ... + +2002-06-12 Rodrigo Moya + + * gsf/*: s/IS_GSF/GSF_IS. + +2002-06-12 Jon K Hellan + + * libgsf-1.pc.in (Requires): Add libxml-2.0 + +2002-06-11 Jody Goldberg + + * gsf/gsf-infile-msole.c (gsf_infile_msole_read) : fix reading into an + assigned buffer for small block files. + +2002-06-10 Jody Goldberg + + * gsf/gsf-infile.c (gsf_infile_child_by_name) : typo. + +2002-06-09 J.H.M. Dassen (Ray) + + * gsf/test-msole1.c (read_types): Casts to suppress signedness + warnings. + * gsf/gsf-input-memory.c (gsf_input_memory_read): Changed src type to + guchar. + * gsf/gsf-input-textline.c (gsf_input_textline_ascii_gets): Cast + return value. + * gsf/gsf-infile-msole.c (ole_dirent_new): Signedness fixes. + * debian/*: updated; include pkgconfig file. + +2002-06-09 Jody Goldberg + + * gsf/gsf-infile-msvba.c : new. + * gsf/test-msvba.c : new. + + * gsf/gsf-infile.c (gsf_infile_child_by_vname) : new utility routine. + +2002-06-07 Jody Goldberg + + * gsf/gsf-input.c (gsf_input_dup) : Add an err parameter. + +2002-06-07 Morten Welinder + + * gsf/gsf-input-stdio.c (gsf_input_stdio_new): Plug FILE* leak. + (gsf_input_stdio_dup): Go via filename. + +2002-06-07 Jody Goldberg + + * doc/Makefile.am : fix the type init function for gtk-doc. + * gsf/* : fix docs a bit. + +2002-06-07 Jody Goldberg + + * gsf/gsf-utils.c (gsf_input_dump) : new utility split out of. + * gsf/test-gzip1.c (test) : here. + + * gsf/test-msole2.c (test) : spruce this up a might so that it can be + used as a general utility to dump streams and storages. + + * gsf/gsf-input-stdio.c (gsf_input_stdio_dup) : dup the descriptor + before creating a new file handle. + +2002-06-06 Jody Goldberg + + * configure.in : remove -Wmissing-noreturn + + * gsf/test-msole1.c (test) : remove the --use-memory bit. Just use + mmap. We can test the other input types in another program. + + * gsf/*.c : change the convention for wrappers. They all add their + own references to the source rather than absorbing the ref that + was passed in. + +2002-06-06 Jody Goldberg + + * configure.in : add zlib. + * libgsf-1.pc.in (Cflags) : ditto. + + * gsf/gsf-input-gzip.c : wrapper to uncompress things. + + * gsf/gsf-libxml.c : some convenience routines for dealing with libxml. + + * gsf/test-gzip1.c : add some tests for gzip. + +2002-06-05 Morten Welinder + + * gsf/*.[ch]: switch to using system types. + +2002-06-05 Jon K Hellan + + * gsf/Makefile.am: Fix typo - libgsf_1_includedir didn't get defined. + +2002-06-05 Jody Goldberg + + * gsf/gsf-input-memory.c (gsf_input_mmap_new) : set the filename. + +2002-06-04 Jody Goldberg + + * gsf/gsf-input.c (gsf_input_eof) : do this internally. + * gsf/gsf-input* : remove the _eof methods. + +2002-06-04 Morten Welinder + + * gsf/gsf-input-impl.h (GsfInputClass): Change structure members + from "read" to "Read", etc. This avoids names reserved by the + system libraries. + +2002-06-04 Morten Welinder + + * gsf/test-msole1.c (test): Add --memory option. + + * gsf/gsf-shared-memory.c: New class. + + * gsf/gsf-input-memory.c (gsf_input_memory_new): Use new + GsfSharedMemory class. + (gsf_input_memory_read): Add missing parameter. + +2002-06-01 Jody Goldberg + + * gsf/Makefile.am : Add gsf-input-textline.[ch] + Add gsf-libxml.[ch] + +2002-05-30 Jody Goldberg + + * gsf/gsf-input-stdio.h : fix the name mismatch. + +2002-05-28 Jody Goldberg + + * gsf/gsf-input.c (gsf_input_seek) : doh! + +2002-05-28 Morten Welinder + + * gsf/gsf-infile-msole.c (ole_make_bat): Cast via gconstpointer to + please gcc. + + * gsf/gsf-infile-msole.h (GSF_OLE_GET_GUINT8, GSF_OLE_GET_GUINT16, + GSF_OLE_GET_GUINT32): fix alignment problems. + + * gsf/test-msole1.c (read_types): Fix isspace usage. + +2002-05-27 Jody Goldberg + + * gsf/gsf-infile-msole.c : add some prepoc constants to prep for + export support. + +2002-05-25 Jody Goldberg + + * README : add more details + +2002-05-25 Jody Goldberg + + * gsf/test-msole1.c (get_biff_opcode_name) : suppress warning. + + * gsf/gsf-input-memory.c (gsf_input_mmap_new) : ensure it is a regular + file. + + * configure.in : remove -Wundef to shut it up about glib. + remove -Wcast-qual because we sometimes need to explicitly cast away + const. C does not have const_cast<>(). + +2002-05-25 Jody Goldberg + + * gsf/gsf-impl-utils.h (GSF_CLASS_FULL) : suppress warning. + + * gsf/gsf-infile-msole.c (ole_dirent_new) : disable debug spew. + (ole_init_info) : suppress bogus compile warning. + Use gsf_ole_get_guint32s to convert the data to normal endianness. + (gsf_ole_get_guint32s) : new. + (ole_info_read_metabat) : assume the metabat is already uses native + byte ordering. + + * gsf/gsf-input.c (gsf_input_seek) : suppress warning. + (gsf_input_dup) : ditto. + (gsf_input_init) : ditto. + +2002-05-25 J.H.M. Dassen (Ray) + + * configure.in: + Actually use warning flags from GNOME_COMPILE_WARNINGS, so + "--enable-warnings=maximum" and "--with-iso-c" are honoured. + Test whether defining _BSD_SOURCE is needed for caddr_t. + (e.g. on Debian with -ansi for gcc3.0 and 3.1) + Test whether defining _POSIX_SOURCE is needed for fdopen(). + Enable a lot more warnings. + * debian/rules: minor tweaks. + +2002-05-25 Jody Goldberg + + * gsf/gsf-input.c (gsf_input_seek) : more error checking. + +2002-05-25 Jody Goldberg + + * gsf/test-msole1.c (test) : dump head of odd records. + + * gsf/gsf-input.c (gsf_input_seek) : do more of the work up here. + * gsf/gsf-infile-msole.c (gsf_infile_msole_seek) : adjust here. + * gsf/gsf-input-stdio.c (gsf_input_stdio_seek) : and here. + * gsf/gsf-input-memory.c (gsf_input_memory_seek) : and here. + +2002-05-25 Jody Goldberg + + * gsf/gsf-infile-msole.c (ole_dirent_new) : fix off by 1 error in + handling broken ascii stream names. + +2002-05-25 Jody Goldberg + + * gsf/gsf-infile-msole.c (ole_init_info) : libole2 knew about a smidge + more of the ole header, use the sbat counter. + + * gsf/test-msole1.c (test) : even more sanity checking. + +2002-05-25 Jody Goldberg + + * gsf/test-msole1.c (test) : add more safety checks to automate + validation of imported biff records. + + * gsf/gsf-infile-msole.c (ole_dirent_new) : Based on char-width2.xls + it looks like directory sizes are periodically screwed. + +2002-05-25 Jody Goldberg + + * gsf/gsf-infile-msole.c : fix small block support. + Handle the bogus use of ascii stream names in some case. + +2002-05-24 Jody Goldberg + + * gsf/gsf-input-stdio.c (gsf_input_stdio_new) : merge the size + checking in here and do more error reporting. + (gsf_input_stdio_class_init) : delete gsf_input_stdio_size + (gsf_input_stdio_size) : delete. + + * gsf/gsf-input.c (gsf_input_read) : put the bound check here. + +2002-05-24 Jody Goldberg + + * gsf/gsf-input-stdio.c (gsf_input_stdio_new) : make buf_size unsigned. + (gsf_input_stdio_finalize) : and here. + (gsf_input_stdio_read) : and here. + + * gsf/gsf-input.c (gsf_input_seek) : As morten suggested this is + better as > size rather than >= size. + +2002-05-24 Jody Goldberg + + * gsf/gsf-infile-msole.c (gsf_infile_msole_read) : only seek if we + need to. + +2002-05-24 Jody Goldberg + + * gsf/test-msole1.c (test) : more debug info, and less content spew. + +2002-05-23 Jody Goldberg + + * gsf/gsf-input-stdio.c (gsf_input_stdio_size) : be more careful about + people who open devices. + +2002-05-23 Jody Goldberg + + * gsf/gsf-infile-msole.c (ole_dirent_new) : more error handling. + (ole_info_get_sb_file) : make things more readable and split this out. + (gsf_infile_msole_new_child) : fix reading small blocks. + +2002-05-23 Jody Goldberg + + * gsf/gsf-infile-msole.h (GSF_OLE_GET_GUINT8) : move here. + (GSF_OLE_GET_GUINT16) : ditto. + (GSF_OLE_GET_GUINT32) : ditto. + +2002-05-23 Jody Goldberg + + * gsf/gsf-utils.h : Use the glib type macros instead of defining our + own. + +2002-05-23 J.H.M. Dassen (Ray) + + * doc/Makefile.am: Introduced DOC_DIR so the location can be easily + overridden when building packages. + * debian/*: Preliminary Debian packaging. + +2002-05-23 Jody Goldberg + + * gsf/gsf-infile-msole.c (ole_info_read_xbat) : DOH! + We need to check endianness when reading the bat elements. + (gsf_infile_msole_read) : slow but effective work around for + breaking at block boundaries. I'll work up something faster this + evening. + +2002-05-19 Jody Goldberg + + * Start making this into a real package. diff --git a/HACKING b/HACKING new file mode 100644 index 0000000..d531294 --- /dev/null +++ b/HACKING @@ -0,0 +1,105 @@ +* Don't commit directly, instead send your diff to the authors (use + 'cvs diff -Nu'). + +Working in libgsf +------------------- + + When writing libgsf our priorities are + + 1) Correctness. + 2) Maintainable & Documented + 3) Modular and well designed + and a distant + 4) portable + 5) Fast + + When you submit code to inclusion in libgsf, or when you modify the sources +directly on the Git repository, please keep those things in mind. While +performance is important please note that we do not want to hand tune code +to shave milliseconds at this point. Well designed algorithms and data +strucutures are fertile areas for development, obfuscated code to make a +loop 3% faster is not. Specifically, this means: + + - Clarity of design and function are paramount + - Make sure your code does not generate warnings at all. + - Please follow the formatting style + +Formatting style +---------------- + + The formatting style of libgsf is a mix of various styles, make +yourself familiar with the GNU coding standards (shipped with most +GNU/Linux systems as the standards.info file), then read the Linux +kernel coding standards and ignore Linus' jokes. Then look at the +Gtk+ header files to get acquainted on how to write nice header files +that are almost self documenting. + + Remember: Use 8 space tabs for indentation: that will keep your +code honest as you will be forced to split your routines in more +modular chunks (as detailed by Linus). + + Emacs users can get the default indentation style with this: + (set-c-style "K&R") + (setq c-basic-offset 8) + + On top of that, you will have to: + + - Follow the Gtk+ cleanliness conventions for function + prototypes. + + - Follow the Gtk+ namespace convention for function names. + module_submodule_operation + + - Make sure your code does not have a single warning (with the + default strong warnings that Gnumeric compiles with) before + your code is submitted. (Although we do not advocate -Werror) + + - Every entry point to a public routine should use the + g_return_if_fail and g_return_val_if_fail macros to verify + that the parameters passed are valid. + + - Under no circumstances use magic variables. Use typedef + enum { ... } type; to create enumerations. Do not use + integers to hold references to enumerations, the compiler + can help catch various errors. + + - Use g_warning to mark spots that need to be reviewed or are + not finished to let me fix it eventually. + + - Do not submit code that is just a temporary workaround for a + full fledged feature. i.e. don't submit a quick hack at + "search text" which is not designed to be expanded upon. We + do not want to maintain limited features. It is better submit an + implementation that has been designed to be expanded and enhanced, + even if it is not completely finished. + + - It is more important to be correct than to be fast. + + - Do not optimize unnecessarily. Do profile, do look for the + weak spots before applying "optimization by feeling". This + is not a Ouija-based project. + + - It is more important to keep the code maintainable and + readable than to be fast. If you have a great idea about + optimizing the code, make sure it is implemented cleanly, + that there is a clean and maintainable way to do it: + + - Fast code that is difficult to maintain has no place in + Gnumeric and will be dropped. + + - Follow the libgsf commenting style, which is not the Gtk + style; + /* ie. use this for + * multi-line comments + */ + + All of this is to ensure the libgsf code will be kept within +reasonable margins of maintainability for the future: Remember, in two years +you will probably be far too busy to maintain your own contributions, and they +might become a burden to the program maintainers. + + libgsf is intended to be a foundation for a various document centric +projects. + + Cleaning code in libgsf is more important than trying not to break +existing code. By all means, code clean ups are always welcome. diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..23e5f25 --- /dev/null +++ b/INSTALL @@ -0,0 +1,236 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free +Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + +These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. + +Installation Names +================== + +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + +Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). Here is a another example: + + /bin/bash ./configure CONFIG_SHELL=/bin/bash + +Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent +configuration-related scripts to be executed by `/bin/bash'. + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..e5ca6a9 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,32 @@ +ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libgsf-1.pc + +if WITH_LIBGSF_GNOME + pkgconfig_DATA += libgsf-gnome-1.pc +endif +if WITH_WIN32 + pkgconfig_DATA += libgsf-win32-1.pc +endif + +SUBDIRS = po gsf gsf-gnome gsf-win32 doc tools tests m4 + +if WITH_PYTHON + SUBDIRS += python +endif +if WITH_GCONF + SUBDIRS += thumbnailer +endif + +EXTRA_DIST = BUGS HACKING \ + intltool-extract.in \ + intltool-merge.in \ + intltool-update.in \ + libgsf-1.spec \ + libgsf-gnome-1.spec \ + dumpdef.pl + +DISTCLEANFILES = intltool-extract intltool-merge intltool-update + +DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper --enable-gtk-doc --enable-schemas-install diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..a722134 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,883 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@WITH_LIBGSF_GNOME_TRUE@am__append_1 = libgsf-gnome-1.pc +@WITH_WIN32_TRUE@am__append_2 = libgsf-win32-1.pc +@WITH_PYTHON_TRUE@am__append_3 = python +@WITH_GCONF_TRUE@am__append_4 = thumbnailer +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/gsf-config.h.in \ + $(srcdir)/libgsf-1.pc.in $(srcdir)/libgsf-1.spec.in \ + $(srcdir)/libgsf-gnome-1.pc.in \ + $(srcdir)/libgsf-gnome-1.spec.in \ + $(srcdir)/libgsf-win32-1.pc.in $(srcdir)/libgsf-zip.in \ + $(top_srcdir)/configure AUTHORS COPYING COPYING.LIB ChangeLog \ + INSTALL NEWS TODO config.guess config.sub depcomp install-sh \ + ltmain.sh missing mkinstalldirs py-compile +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = gsf-config.h +CONFIG_CLEAN_FILES = libgsf-1.pc libgsf-1.spec libgsf-gnome-1.pc \ + libgsf-gnome-1.spec libgsf-win32-1.pc libgsf-zip +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgconfigdir)" +DATA = $(pkgconfig_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = po gsf gsf-gnome gsf-win32 doc tools tests m4 python \ + thumbnailer +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)"; }; } +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BONOBO_REQ = @BONOBO_REQ@ +BZ2_LIBS = @BZ2_LIBS@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURRENT_MINUS_AGE = @CURRENT_MINUS_AGE@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ +GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GNOMEVFS_REQ = @GNOMEVFS_REQ@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEXE = @LIBEXE@ +LIBGSF_BONOBO_CFLAGS = @LIBGSF_BONOBO_CFLAGS@ +LIBGSF_BONOBO_LIBS = @LIBGSF_BONOBO_LIBS@ +LIBGSF_CFLAGS = @LIBGSF_CFLAGS@ +LIBGSF_GIO_CFLAGS = @LIBGSF_GIO_CFLAGS@ +LIBGSF_GIO_LIBS = @LIBGSF_GIO_LIBS@ +LIBGSF_GNOME_CFLAGS = @LIBGSF_GNOME_CFLAGS@ +LIBGSF_GNOME_LIBS = @LIBGSF_GNOME_LIBS@ +LIBGSF_LIBS = @LIBGSF_LIBS@ +LIBGSF_MAJOR_VERSION = @LIBGSF_MAJOR_VERSION@ +LIBGSF_MICRO_VERSION = @LIBGSF_MICRO_VERSION@ +LIBGSF_MINOR_VERSION = @LIBGSF_MINOR_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +PYGTK_CFLAGS = @PYGTK_CFLAGS@ +PYGTK_CODEGEN = @PYGTK_CODEGEN@ +PYGTK_LIBS = @PYGTK_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +WARN_CFLAGS = @WARN_CFLAGS@ +WINDRES = @WINDRES@ +XGETTEXT = @XGETTEXT@ +Z_CPPFLAGS = @Z_CPPFLAGS@ +Z_LIBS = @Z_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libgsf-1.pc $(am__append_1) $(am__append_2) +SUBDIRS = po gsf gsf-gnome gsf-win32 doc tools tests m4 \ + $(am__append_3) $(am__append_4) +EXTRA_DIST = BUGS HACKING \ + intltool-extract.in \ + intltool-merge.in \ + intltool-update.in \ + libgsf-1.spec \ + libgsf-gnome-1.spec \ + dumpdef.pl + +DISTCLEANFILES = intltool-extract intltool-merge intltool-update +DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper --enable-gtk-doc --enable-schemas-install +all: gsf-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) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +gsf-config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/gsf-config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status gsf-config.h +$(srcdir)/gsf-config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f gsf-config.h stamp-h1 +libgsf-1.pc: $(top_builddir)/config.status $(srcdir)/libgsf-1.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +libgsf-1.spec: $(top_builddir)/config.status $(srcdir)/libgsf-1.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +libgsf-gnome-1.pc: $(top_builddir)/config.status $(srcdir)/libgsf-gnome-1.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +libgsf-gnome-1.spec: $(top_builddir)/config.status $(srcdir)/libgsf-gnome-1.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +libgsf-win32-1.pc: $(top_builddir)/config.status $(srcdir)/libgsf-win32-1.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +libgsf-zip: $(top_builddir)/config.status $(srcdir)/libgsf-zip.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files + +# 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): + @fail= 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; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= 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; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) gsf-config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) gsf-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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) gsf-config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) gsf-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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(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) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @$(am__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 $(DATA) gsf-config.h +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(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 . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-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 + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-pkgconfigDATA + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-pkgconfigDATA + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ + ctags-recursive install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-generic distclean-hdr \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgconfigDATA install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-pkgconfigDATA + + +# 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/NEWS b/NEWS new file mode 100644 index 0000000..89e1e5b --- /dev/null +++ b/NEWS @@ -0,0 +1,698 @@ +libgsf 1.14.21 + +Andreas: + * Fix crash on encountering user defined meta data of default + type. [649827] + * Write/read the correct attribute name for the value-type of user + defined meta-data. + * Move ODF version to 1.2. + +Gilles Dartiguelongue: + * Implement --without-gconf for explicit dependency control. [#645775] + * Fix python compilation problem. [#645778] + +-------------------------------------------------------------------------- +libgsf 1.14.20 + +Caolan McNamara: + * Fix msole reading crash. + +Morten: + * Improve loading on metadata. [#644217] + +-------------------------------------------------------------------------- +libgsf 1.14.19 + +Andreas: + * Add some more OOo 3.2 and 3.3 namespaces. + +Morten: + * Quiet xml parsing two bits. + +-------------------------------------------------------------------------- +libgsf 1.14.18 + +Morten: + * Fix zip directory record problem. [#614968] + +-------------------------------------------------------------------------- +libgsf 1.14.17 + +Morten: + * Fix xml parser crash. + * Write meta-data values in name order. + * Don't call gnome_vfs_init in python binding. [#599973] + +-------------------------------------------------------------------------- +libgsf 1.14.16 + +Andreas: + * Add variant of OO_NS_FIELD. + +Caolan McNamara: + * Use gdk_pixbug for thumbnailing when available. [#594359] + +Morten: + * Fix problem with errors to stdout. [#592471] + +Vincent Untz: + * Fix gnome-vfs dependency handling. [#593480] + +-------------------------------------------------------------------------- +libgsf 1.14.15 + +Andreas: + * Bump ODF version to 1.1 and add enum to inform users. + +Morten: + * Fix criticals when parsing bogus OLE properties. [#584848] + * Start cleaning up timestamp code. + +-------------------------------------------------------------------------- +libgsf 1.14.14 + +Andreas: + * Added namespaces used by openoffice 3.0, Lotus Symphony, etc. + * Fix gsf_xml_out_start_element to allow child elements mixed + with other content + +-------------------------------------------------------------------------- +libgsf 1.14.13 + +Andreas: + * Fix gsf_opendoc_metadata_subtree [#581530] + +-------------------------------------------------------------------------- +libgsf 1.14.12 + +Andreas: + * Also read user defined OpenDocument metadata + +Christian Persch: + * Fix allocation method problem. [#579155] + +J.H.M. Dassen (Ray): + * Fix incorrect use of g_enum_register_static which broke + documentation generation in some environments. + [http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39015] + +Jody : + * Handle small-block files that are not block aligned. [#572290] + * Deprecate gsf_timestamp_parse and replace it with + gsf_timestamp_from_string. + * Gtk-Doc fixes. + * Fix handling of namespace declared default and prefix. + (Such as in SpreadsheetML-2003) + +Morten: + * Handle malformed xml better. [#568994] + * Drop characters that xml 1.0 cannot represent. [#568919] + * Fix problem loading zero-sized files. [#580228] + +-------------------------------------------------------------------------- +libgsf 1.14.11 + +Jody: + * win32 build fix for glib-2.18 deprecation. + * Extend MS Office Open Pkg handling to accept POI files. + * Add libxml2 wrapper to simplify probing. + +Morten: + * Solaris compilation issue. [#558253] + * Handle non-seekable files in gsf_input_stdio_new. [#154417] + * Auto-detect bonobo. + +Paul: + * Fix various Mac compilation issues. [#565603] [#565605] + +Pedro Fragoso: + * Clean up glib includes. [#564004] + +Richard W.M. Jones: + * MinGW configure fix for libbz2 detection. + +-------------------------------------------------------------------------- +libgsf 1.14.10 + +Jody: + * Patch some coverity issues [189, 250, 251] + +Morten: + * Work around sshfs bug. [#509883] + * Support tar archives. + * Improve gsf support for broken archives. [#553861] + * Avoid a critical for bad ole2. [#554848] + +-------------------------------------------------------------------------- +libgsf 1.14.9 + +Dom: + * Revitalize gio support. + +Jody: + * Add MS OOX support to gsf-vba-dump. + * Extend the utility wrappers for GsfInfile. + * Be more forgiving of corrupt ole2. + * Add additional MS OpenPkg support to facilitate pivots. + * gtk-doc improvements. + * Make the VBA extractor more accessible. + * Extensions for the xml parser to allow modularization. + +Morten: + * Use g_base64_-routines from glib when available. + * When gio is available, do not link in gnomevfs. + * Add self-check for the benefit of __arm__. + +-------------------------------------------------------------------------- +libgsf 1.14.8 + +Jody: + * Add missing ODF presentation namespace. + * Only install win32 header for win32. [#459771] + * Fix XML enum export utils. + +Morten: + * Fix criticals for corrupted file. [#485964] + * Improve sanity checks of ole properties. [#404934] + * Enhance gsf (the program) to list all document properites. + * Fix endless loop with broken ole files. [#513831] + * Fix memory allocation problem due to broken ole files. + +-------------------------------------------------------------------------- +libgsf 1.14.7 + +Jody: + * Fix typo that would break all xml output. + +-------------------------------------------------------------------------- +libgsf 1.14.6 + +Jody: + * Add some safety checks for out of memory conditions. + * Some extensions to simplify OOX export. + * Docs improvements. + +-------------------------------------------------------------------------- +libgsf 1.14.5 + +Jody: + * Revert jump to dynamic types, they aren't threadsafe. [#450722] + * Compilation glitch on windows. [#449807] + * Avoid problems building without gconf macros installed. + * Configure breakage --without-gnome. [#4488842] + +-------------------------------------------------------------------------- + +libgsf 1.14.4 + +Eduardo Lima : + * Make Bonobo support optional. [#442205] + +Federico Mena Quintero : + * Limit resource usage in the thumbnailer. [#446087] + +Jody: + * Have gsf-vba-dump handle .doc files too. + * Implement gsf_init_dynamic + * Tidy up docs and #includes in public headers. + * Move the MS/ECMA Open Package code here from gnumeric. + +Michael Lawrence : + * Provide a libxml2-nanohttp wrapper. [#362373] + +Morten: + * Plug leak. + * Fix potential problem with reading mildly bogus files. [#381588] + * Fix potential oom crash on crazy OLE2 files. [#381600] + * Quote csv fields on initial or terminal white-space. [#359348] + * Fix encoding problem with thumbnailer. + * Fix problem with gsf_output_printf triggering on x64_86. + * Handle nested xml contents. + * Basic life support for python bindings. [#382239] [#382254] + +-------------------------------------------------------------------------- + +libgsf 1.14.3 : Last Release before branching 1.15.x + +Jody: + * Fix crash exporting keyword vector from OLE2 -> ODF. + * Improve debug spew for OLE2 propert import. + +-------------------------------------------------------------------------- +libgsf 1.14.2 + +DannyM: + * Fix export of msole2 double(r8) properties. + +Jody: + * Add more OOo 1.0.x and 2.0.x mime types to thumbnailer. + * Add gsf-vba-dump utility to extra macros from Ms Office files. + * Add metadata property dump function to gsf command + * Accept invalid empty msole2 property files from psiwin. [#352055] + * More checks msole2 files with inconsistent headers. + * Fix python build + * Fix xml-sax wrapper to correctly handle shared subtrees. + +Michal Kowalczuk: + * Improve ms-ole property sanity checking. + +Morten: + * Initial variant of a gsf based tar like utility. + * Handle some broken FrameMaker generated files. [#346118] + * Fix bzip2 problem in gsf_input_uncompress. [#356391] + +-------------------------------------------------------------------------- +libgsf 1.14.1 + +Jody: + * Enable the ODF support in the thumbnailer's schema. + * Fix handling of transparent backgrounds in ODF thumbnails. + * Fix handling of default namespaces in libxml sax wrappers. + * Handle odd OLE2 files from palmcalc. [#336858] + +Morten: + * Make --mandir=... work. [#316107] + * Avoid crash on parsing completely empty xml. [#335152] + * Crudely avoid producing invalid xml by dropping certain control + characters on the floor. [#339335] + +-------------------------------------------------------------------------- +libgsf 1.14.0 aka 1.13.99 + + NOTE : 1.13.99 and 1.14.0 are identical. The former was made as a + convenience to avoid bumping .so versions late in the release cycle. + +Daniel Nylander: + * Initial Swedish PO translation. [Debian #351382] + +Ivan Wong : + * Only export symbols which are in the public headers (Win32). + +Jody: + * Fix parsing xml files with & + * bump to 1.14.0 to indicate a stable release. + * improve header versioning. + * Add ODF thumbnail support to gsf-office-thumbnailer + * Enable ODF meta data import/export. + +Morten: + * Fix GsfOutputIConv. [#323503] + * Plug leak in GsfInfileZip. + +-------------------------------------------------------------------------- +libgsf 1.13.3 + +J.H.M. Dassen (Ray) : + * Improve documentation. + +Jody : + * More work on extension interface to sax import wrapper. + +-------------------------------------------------------------------------- +libgsf 1.13.0 + +Jody: + * API changes SAX wrappers for help OpenDoc and SpreadsheetML. + +Kasal: + * Improve libtool versioning. + * Relax the gconf requirement. + +Luciano Wolf: + * OpenDocument meta stream parser. + +Sven Herzberg: + * Fix for GsfOutputGnomeVFS + +-------------------------------------------------------------------------- +libgsf 1.12.3 + +Jody: + * Make gconf optional again. + +Rambokid: + * Fix excessive memory use problem for writing zip files. + +-------------------------------------------------------------------------- +libgsf 1.12.2 + +Jean Brefort: + * made GSF_CLASS_FULL and GSF_DYNAMIC_CLASS_FULL really full (add + base_init, base_finalize and class_finalize arguments). + +Jody: + * Handle 0x8000 and 0x8001 codepages. + * Fix leak in array properties. + +Jon Kåre: + * Fix VT_FILETIME OLE property export. + +Morten: + * Fix problem with 64-bit OLE properties. + * Fix standard-violation that hit i86_64. + +-------------------------------------------------------------------------- +libgsf 1.12.1 + +Dom: + * Better handling of error conditions when creating a zip. + +Jody: + * Patch a leak in vector properties from OLE2. + * Be more delicate handling truncated gzip files. + * Improve utility macros for dynamic type creation (incompatible). + * Make constructors for output_stdio outfile_stdio more flexible + +Morten: + * Fix gsf_xml_out_add_float to always use "." as separator. + * Fix problem with creating new files in g+s directories. + +-------------------------------------------------------------------------- +libgsf 1.12.0 + +Herzi: + * Allow multiple calls to gsf_xml_out_add_cstr. [#167166] + +Ivan: + * Fix codepage problem. [#162841] + +Jody: + * Support GObject properties in GsfOutfile::new_child + * Cleanup the OLE2 property import + * Re-org the GsfDocMetadata interface + * Cleanup the OLE2 property export + +Manuel Mausz: + * OLE2 property export. + +Morten: + * Attempt to get non-ASCII filenames right on Win32. [#171145] + * Add "raw" properties to GsfInputGzip and GsfOutputGzip to + allow header/trailer-less files. Also allow g_object_new + construction of these classes. + * Add "uncompressed_size" property to GsfInputGzip allowing to + decompress files larger than 4GB. + * Propagate errors from GsfOutputGzip's sink to itself. + * Fix GsfOutputStdio to avoid killing the target file when we + get an error. + * Add new GsfOutputCsv and GsfOutputIconv. + * Fix GsfOutfileZip's handling of compression levels. + * Allow getting the compression level when reading zip files. + * Improve zip file performance. (No longer reopens the underlying + file for each member you read.) + * Clean up zip output for zip files with non-ASCII members. + * Make it possible to use g_object_new to create zip io objects. + +------------------------------------------------------------------------------ +libgsf 1.11.1 + +Morten: + * Fix permissions for new files. [#159331] + * Fix save-to-existing-file on Win32. [#160108] + * Fix stdio when we're not closing the file. + +------------------------------------------------------------------------------ +libgsf 1.11.0 + +Christopher James Lahey: + * GObject property support for input/output (for C# bindings) + * GObject support for doc-meta-data + +Frank Chiulli: + * Have the OLE2 property set parser store the data + +Jody: + * More work on storing OLE2 properties + * Add some hooks to the libxml sax wrappers to facilitate extending + specs + * An extra wrapper to GsfOutputStdio to handle FILE* directly + +Jon Kåre: + * make xml string export more convenient by ignoring NULL + +Kasal: + * More consistent use of G_GNUC_UNUSED. + +Morten: + * Check size and seek in gsf_input_dup. + * Fix a pile of crashes having to do with failed dups. + * Fix crashes having to do with NULL input->name. + * Work around gnome-vfs bug #152844. + * Create input proxy object. + * Make msole reading use a proxy layer instead of dup-ing the source + like crazy. (Dup-ing is expensive for network connections and + slightly expensive for disk files.) + * Doc fixes. + * Escape characters 1..31 when used in xml attributes. [#157850] + +Veerapuram Varadhan: + * sync the ole2 property names with the existing beagle properties + +------------------------------------------------------------------------------ +libgsf 1.10.1 + +Jon Kåre: + * Fix base64 decoding. + +Kasal: + * Lots of code auditing and cleanup. + * Identified the long standing source of the problem with XL corrupting + large files + +------------------------------------------------------------------------------ + +libgsf 1.10.0 + +Jody: + * Patch to read slightly odd planmaker generated OLE2. + * Fix printf implementation in GsfOutfileMSOle + * Make the msole block sizes instance specific + +Morten: + * Attempt fix for ARM. + * Make gsf_input_gnomevfs_new_uri handle missing "seek" methods. + +Stuart Cunningham + * Enable OLE2 export for larger block sizes + +------------------------------------------------------------------------------ +libgsf 1.9.1 + +J.H.M. Dassen (Ray): + * Corrected the location where the documentation gets installed. + * +James Cape : + * Clean up the gtk-doc build + +Jody : + * Support DOCTYPE in the simplified xml generator + * More gtk-doc cleanup + +Morten, Dom: + * Avoid polluting global name space with symbols lacking gsf_ prefix. + This only effects implementation utilites shared by the zip in/out + code so hopefully the abi breakage will not hurt too many people. + +------------------------------------------------------------------------------ +libgsf 1.9.0 + +Dom: + * Fix bzip output to flush if last deflate fills buffer + +Jody Goldberg: + * If the file is not an OLE2 file do not change the filepos. + * Handle broken ole files that specify codepage as signed short + * Fix reading ole files > 13.6 Meg on sparc/alpha (from Xavier Roche) + * Tune validation test for LPSTR properties to handle char width > 1 + * Make the impl headers for the base interfaces public as requested + * Add some directory tree wrappers + * Work around a -fstrict-alias warning for SuSE + * Move to automake-1.7 + * Fix gnome-vfs backend to open files with random access + * Support merging content from nested nodes for sax parsing + * Fix gtk-doc + +Joseph Frazee: + * patch the spec file. + +Morten Welinder: + * Properly chain finalizer. + * Fix gzip output to flush if last deflate fills buffer + +Tor Lillqvist: + * packaging tools for win32. + +------------------------------------------------------------------------------ +libgsf 1.8.2 + +Jody: + * Catch invalid OLE2 files that claim there is data in a directory. + * Better error handling for Infile::child_by_* + * Work harder to restore invalid ole2 files with bad BATs. + * Begin an interface for ole2 export with non-default block sizes. + * Name the root directory 'Root Entry' to keep libole2 happy. + +Stuart Cunningham : + * Support CLSIDs for Storages for the AAF project + * Test and fix bugs reading ole files with non-default block sizes. + +------------------------------------------------------------------------------ +libgsf 1.8.1 + +Morten: + * Plug major gzip output leak. + +------------------------------------------------------------------------------ +libgsf 1.8 + + 2003 Mar 9 + With the approval off all contributors the library has been + relicensed from GPL -> LGPL + +Dom: + * Some extra casts to make Bloodshed DevC++ happy + * IOChannel input work + * BZ2 input & output + * Return the derived types from constructor functions + * Support GObject properties for the inputs and outputs + * Start an AR infile + * Start Win32 COM IStream input/output + +Jody: + * Fix ms ole export bug that would not clip overly long file names. + * Fix ms ole import bug with potentially invalid names + +Rodrigo: + * Added GsfInputIOChannel, a GIOChannel-based input. + +Xavier Roche: + * Patch some gsize == gunit32 assumptions. + +------------------------------------------------------------------------------ +libgsf 1.7 + +Dom: + * Extend gnome-vfs support to handle uris + * Transacted output capability + * Ensure large reads and writes happen + +Jody: + * Start work on some simplified xml export utilities. + * Extend xml import facilities to support namespaces. + * Catch invalid OLE files with cycles. + * Fix exporting OLE files larger than 6.8 Meg + +Jon Kåre: + * Only unset valid GValues when reading msole properties. + +Morten: + * Fix xml save problem. + +Tor Lillqvist: + * Tweaks for the win32 build. + +------------------------------------------------------------------------------ +libgsf 1.6.0 + +Jody: + * Be more anal about invalid stream names.. + * Fix documentation install. + * Fix a subtle leak that Morten found. + * Suppress some warnings in the test suite. + +Jon Kåre: + * Add printf mechanism. + * Fix misc bugs. + * Add gzip output. + +Morten: + * Don't overwrite files we're not supposed to write. + +------------------------------------------------------------------------------ +libgsf 1.5.0 + +Jody: + * Adjust sax routines to support recusive structures. + +Morten: + * Handle file names that are not valid utf8. + +Dom: + * Port over code page utilities from libwv. + +------------------------------------------------------------------------------ +libgsf 1.4.0 + +Jody: + * Move some iconv utility routines here from gnumeric. + * More work on reading ole property sets. + * Minor tweak directory handling for infile-zip. + * Replace test-cat-zip with test-msole2 + * Add error handling mechanism to GsfOutput + * Borrow the temp file handling from gedit + * Add some xml SAX parsing utilities (api is tentative) + * Add some structured blob utilites for easy in/out of blob trees + * Support unicode property values and names in ole files. + +Jon Kåre: + * sync the directory semantics of infile-zip with infile-msole. + * Support seeking within zip streams. + * Make dup work properly for gzip and zip children. + * Implement Zip export. + +------------------------------------------------------------------------------ +libgsf 1.3.0 + +Jody: + * Split gnome-vfs and bonobo into a distinct library + * Polish the OLE export so that libole2 is molified. + * Add a timestamp object for use with metadata + * Some initial work on MS OLE property streams (doc metadata) + * Some initial work on doc meta data (expect changes as ole settles) + +Jon Kåre: + * Work and plan to support big files. + +------------------------------------------------------------------------------ +libgsf 1.2.0 + +Dom: + * Read/Write gnome-vfs (untested) + * Write to mem buf (untested) + +Jody: + * Add some safety and utilty to ensure outputs are closed before + finalizing + * Add some printf style capabilities for outputs. + +Ray: + * improve doc generation + * Update debian support in preparation for packaging. + +Rodrigo: + * more work on io_context. + +Tambet: + * Read zip files + +------------------------------------------------------------------------------ +libgsf 1.1.0 + +Jody: + * Initial pass at an api + * Read & Write OLE + * Read gzip + * Read textlines + * Read & Write stdio wrapper + * Some libxml2 utility wrappers + * some test programs to dump or copy ole streams and file structures + * Uncompress vba streams + * Initial incomplete work on parsing vba3 & vba56 directories + +Morten: + * mmap/buffer wrapper + * testing & purification + +Jon Kåre: + * Some configure cleanup + * Bonobo Stream wrapper diff --git a/README b/README new file mode 100644 index 0000000..4933782 --- /dev/null +++ b/README @@ -0,0 +1,58 @@ +libgsf -- The G Structured File Library +Jody Goldberg + + The project aims to provide an efficient extensible i/o abstraction for +dealing with different structured file formats. + + libgsf is licensed under the terms of the GNU LGPL included in the +file COPYING.LIB. + +To report libgsf bugs, please visit bugzilla.gnome.org. +-- + +This library has taken insight from + +OLE: + - libole : Michael Meeks, Arturo Tena, and Frank Chiulli + - which was based on + Laola : by Martin Schwartz + WINE : Marcus Meissner, Francis Beaudet, Sylvain St-Germain and + Thuy Nguyen + Caolan McNamara's work + + - POIFS : Marc Johnson + +VBA: + - libole : Michael Meeks and Frank Chiulli figuring out quite a bit about + how a vba stream is stored. + - OpenOffice : For confirming many of Michael's hypothesis' and supplying + insight into the project file structure. + - Costin Raiu, Kaspersky Labs + : For commenting that the dir stream had offsets too. That way we can + avoid OpenOffice's trouble parsing pcode. + +gzip: + - zlib : for doing all the heavy lifting, and suppling gzio.c as an + example. + +Requirements +------------ + autoconf 2.5x + automake 1.7 + + glib >= 1.3.10 + zlib >= 1.1.3 + libxml2 >= 2.4.16 (not really, but it is the first to be tested) + +Mailing lists +------------- + + There is NO mailing list used to discuss libgsf specificly as yet. For now +please use the gnumeric list. To subscribe send a mail to: + + gnumeric-list-request@gnome.org +And in the body of the message write "subscribe" + +An archive of the mailing lists is available in: + http://mail.gnome.org/archives/gnumeric-list/ + diff --git a/TODO b/TODO new file mode 100644 index 0000000..d57da06 --- /dev/null +++ b/TODO @@ -0,0 +1,33 @@ +Near: + - Look into Vba storage in .doc and .ppt + - Check the outputs for proper wrap use. eg GsfOutputGzip does not + - Complete MS property set read and write + (complete codepage support for writing) + - work on GsfOutput error handling to propagate errors up the stack. + Maybe something signal based ? + - for the stdio output check that we can actually write to the target file + on open even though we do not want to write to it until later. + - Add 'cancel' flag to GsfOutputStdio to support not overwriting the target + file even if things succeed. + - sync ODF document-statistic with OLE2's document-parts and various counts + - deprecate gsf_base64_* in favour of glib versions (requires 2.12) + +Longer: + - Add encrypt and decrypt wrappers + - precede with some randomness due to static nature of xml header + - be absolutely clear about how we handle seek (only encrypt data on + first pass) + - Can we do we put a mechanism for signing and authenticating ? + +Future: + - parse vba p-code directly to produce some other language. + - move biff utils here from gnumeric + +------------------------------------------------------------------------------------ +potential 2.0 api changes + +- Infile::get_child* To take a GError to handle failure +- Convert Input, Infile, Output, Outfile into interfaces +- Split Input/Output into base and seekable +- Remove/Alleviate requirement that we know the size of a stream on open +- input::seek and output::seek use the opposite conventions diff --git a/acinclude.m4 b/acinclude.m4 new file mode 100644 index 0000000..d06436f --- /dev/null +++ b/acinclude.m4 @@ -0,0 +1,4 @@ +# +# This is a dummy file. Copy acinclude.m4.am15 over this if you want +# to build with python bindings. See python/README-python . +# diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..1fbb19f --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,2043 @@ +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +dnl AM_GCONF_SOURCE_2 +dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas +dnl (i.e. pass to gconftool-2 +dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where +dnl you should install foo.schemas files +dnl + +AC_DEFUN([AM_GCONF_SOURCE_2], +[ + if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then + GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source` + else + GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE + fi + + AC_ARG_WITH([gconf-source], + AC_HELP_STRING([--with-gconf-source=sourceaddress], + [Config database for installing schema files.]), + [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],) + + AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE) + AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation]) + + if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then + GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas' + fi + + AC_ARG_WITH([gconf-schema-file-dir], + AC_HELP_STRING([--with-gconf-schema-file-dir=dir], + [Directory for installing schema files.]), + [GCONF_SCHEMA_FILE_DIR="$withval"],) + + AC_SUBST(GCONF_SCHEMA_FILE_DIR) + AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files]) + + AC_ARG_ENABLE(schemas-install, + AC_HELP_STRING([--disable-schemas-install], + [Disable the schemas installation]), + [case ${enableval} in + yes|no) ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-install]) ;; + esac]) + AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no]) +]) + +# Copyright (C) 1995-2002 Free Software Foundation, Inc. +# Copyright (C) 2001-2003,2004 Red Hat, Inc. +# +# This file is free software, distributed under the terms of the GNU +# General Public License. As a special exception to the GNU General +# Public License, this file may be distributed as part of a program +# that contains a configuration script generated by Autoconf, under +# the same distribution terms as the rest of that program. +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# +# Macro to add for using GNU gettext. +# Ulrich Drepper , 1995, 1996 +# +# Modified to never use included libintl. +# Owen Taylor , 12/15/1998 +# +# Major rework to remove unused code +# Owen Taylor , 12/11/2002 +# +# Added better handling of ALL_LINGUAS from GNU gettext version +# written by Bruno Haible, Owen Taylor 5/30/3002 +# +# Modified to require ngettext +# Matthias Clasen 08/06/2004 +# +# We need this here as well, since someone might use autoconf-2.5x +# to configure GLib then an older version to configure a package +# using AM_GLIB_GNU_GETTEXT +AC_PREREQ(2.53) + +dnl +dnl We go to great lengths to make sure that aclocal won't +dnl try to pull in the installed version of these macros +dnl when running aclocal in the glib directory. +dnl +m4_copy([AC_DEFUN],[glib_DEFUN]) +m4_copy([AC_REQUIRE],[glib_REQUIRE]) +dnl +dnl At the end, if we're not within glib, we'll define the public +dnl definitions in terms of our private definitions. +dnl + +# GLIB_LC_MESSAGES +#-------------------- +glib_DEFUN([GLIB_LC_MESSAGES], + [AC_CHECK_HEADERS([locale.h]) + if test $ac_cv_header_locale_h = yes; then + AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, + [AC_TRY_LINK([#include ], [return LC_MESSAGES], + am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) + if test $am_cv_val_LC_MESSAGES = yes; then + AC_DEFINE(HAVE_LC_MESSAGES, 1, + [Define if your file defines LC_MESSAGES.]) + fi + fi]) + +# GLIB_PATH_PROG_WITH_TEST +#---------------------------- +dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], +[# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL(ac_cv_path_$1, +[case "[$]$1" in + /*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in ifelse([$5], , $PATH, [$5]); do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then + AC_MSG_RESULT([$]$1) +else + AC_MSG_RESULT(no) +fi +AC_SUBST($1)dnl +]) + +# GLIB_WITH_NLS +#----------------- +glib_DEFUN([GLIB_WITH_NLS], + dnl NLS is obligatory + [USE_NLS=yes + AC_SUBST(USE_NLS) + + gt_cv_have_gettext=no + + CATOBJEXT=NONE + XGETTEXT=: + INTLLIBS= + + AC_CHECK_HEADER(libintl.h, + [gt_cv_func_dgettext_libintl="no" + libintl_extra_libs="" + + # + # First check in libc + # + AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, + [AC_TRY_LINK([ +#include +], + [return !ngettext ("","", 1)], + gt_cv_func_ngettext_libc=yes, + gt_cv_func_ngettext_libc=no) + ]) + + if test "$gt_cv_func_ngettext_libc" = "yes" ; then + AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, + [AC_TRY_LINK([ +#include +], + [return !dgettext ("","")], + gt_cv_func_dgettext_libc=yes, + gt_cv_func_dgettext_libc=no) + ]) + fi + + if test "$gt_cv_func_ngettext_libc" = "yes" ; then + AC_CHECK_FUNCS(bind_textdomain_codeset) + fi + + # + # If we don't have everything we want, check in libintl + # + if test "$gt_cv_func_dgettext_libc" != "yes" \ + || test "$gt_cv_func_ngettext_libc" != "yes" \ + || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then + + AC_CHECK_LIB(intl, bindtextdomain, + [AC_CHECK_LIB(intl, ngettext, + [AC_CHECK_LIB(intl, dgettext, + gt_cv_func_dgettext_libintl=yes)])]) + + if test "$gt_cv_func_dgettext_libintl" != "yes" ; then + AC_MSG_CHECKING([if -liconv is needed to use gettext]) + AC_MSG_RESULT([]) + AC_CHECK_LIB(intl, ngettext, + [AC_CHECK_LIB(intl, dcgettext, + [gt_cv_func_dgettext_libintl=yes + libintl_extra_libs=-liconv], + :,-liconv)], + :,-liconv) + fi + + # + # If we found libintl, then check in it for bind_textdomain_codeset(); + # we'll prefer libc if neither have bind_textdomain_codeset(), + # and both have dgettext and ngettext + # + if test "$gt_cv_func_dgettext_libintl" = "yes" ; then + glib_save_LIBS="$LIBS" + LIBS="$LIBS -lintl $libintl_extra_libs" + unset ac_cv_func_bind_textdomain_codeset + AC_CHECK_FUNCS(bind_textdomain_codeset) + LIBS="$glib_save_LIBS" + + if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then + gt_cv_func_dgettext_libc=no + else + if test "$gt_cv_func_dgettext_libc" = "yes" \ + && test "$gt_cv_func_ngettext_libc" = "yes"; then + gt_cv_func_dgettext_libintl=no + fi + fi + fi + fi + + if test "$gt_cv_func_dgettext_libc" = "yes" \ + || test "$gt_cv_func_dgettext_libintl" = "yes"; then + gt_cv_have_gettext=yes + fi + + if test "$gt_cv_func_dgettext_libintl" = "yes"; then + INTLLIBS="-lintl $libintl_extra_libs" + fi + + if test "$gt_cv_have_gettext" = "yes"; then + AC_DEFINE(HAVE_GETTEXT,1, + [Define if the GNU gettext() function is already present or preinstalled.]) + GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl + if test "$MSGFMT" != "no"; then + glib_save_LIBS="$LIBS" + LIBS="$LIBS $INTLLIBS" + AC_CHECK_FUNCS(dcgettext) + MSGFMT_OPTS= + AC_MSG_CHECKING([if msgfmt accepts -c]) + GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: test 1.0\n" +"PO-Revision-Date: 2007-02-15 12:01+0100\n" +"Last-Translator: test \n" +"Language-Team: C \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) + AC_SUBST(MSGFMT_OPTS) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr], + [CATOBJEXT=.gmo + DATADIRNAME=share], + [case $host in + *-*-solaris*) + dnl On Solaris, if bind_textdomain_codeset is in libc, + dnl GNU format message catalog is always supported, + dnl since both are added to the libc all together. + dnl Hence, we'd like to go with DATADIRNAME=share and + dnl and CATOBJEXT=.gmo in this case. + AC_CHECK_FUNC(bind_textdomain_codeset, + [CATOBJEXT=.gmo + DATADIRNAME=share], + [CATOBJEXT=.mo + DATADIRNAME=lib]) + ;; + *) + CATOBJEXT=.mo + DATADIRNAME=lib + ;; + esac]) + LIBS="$glib_save_LIBS" + INSTOBJEXT=.mo + else + gt_cv_have_gettext=no + fi + fi + ]) + + if test "$gt_cv_have_gettext" = "yes" ; then + AC_DEFINE(ENABLE_NLS, 1, + [always defined to indicate that i18n is enabled]) + fi + + dnl Test whether we really found GNU xgettext. + if test "$XGETTEXT" != ":"; then + dnl If it is not GNU xgettext we define it as : so that the + dnl Makefiles still can work. + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then + : ; + else + AC_MSG_RESULT( + [found xgettext program is not GNU xgettext; ignore it]) + XGETTEXT=":" + fi + fi + + # We need to process the po/ directory. + POSUB=po + + AC_OUTPUT_COMMANDS( + [case "$CONFIG_FILES" in *po/Makefile.in*) + sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile + esac]) + + dnl These rules are solely for the distribution goal. While doing this + dnl we only have to keep exactly one list of the available catalogs + dnl in configure.ac. + for lang in $ALL_LINGUAS; do + GMOFILES="$GMOFILES $lang.gmo" + POFILES="$POFILES $lang.po" + done + + dnl Make all variables we use known to autoconf. + AC_SUBST(CATALOGS) + AC_SUBST(CATOBJEXT) + AC_SUBST(DATADIRNAME) + AC_SUBST(GMOFILES) + AC_SUBST(INSTOBJEXT) + AC_SUBST(INTLLIBS) + AC_SUBST(PO_IN_DATADIR_TRUE) + AC_SUBST(PO_IN_DATADIR_FALSE) + AC_SUBST(POFILES) + AC_SUBST(POSUB) + ]) + +# AM_GLIB_GNU_GETTEXT +# ------------------- +# Do checks necessary for use of gettext. If a suitable implementation +# of gettext is found in either in libintl or in the C library, +# it will set INTLLIBS to the libraries needed for use of gettext +# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable +# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() +# on various variables needed by the Makefile.in.in installed by +# glib-gettextize. +dnl +glib_DEFUN([GLIB_GNU_GETTEXT], + [AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_HEADER_STDC])dnl + + GLIB_LC_MESSAGES + GLIB_WITH_NLS + + if test "$gt_cv_have_gettext" = "yes"; then + if test "x$ALL_LINGUAS" = "x"; then + LINGUAS= + else + AC_MSG_CHECKING(for catalogs to be installed) + NEW_LINGUAS= + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + NEW_LINGUAS="$NEW_LINGUAS $presentlang" + fi + done + LINGUAS=$NEW_LINGUAS + AC_MSG_RESULT($LINGUAS) + fi + + dnl Construct list of names of catalog files to be constructed. + if test -n "$LINGUAS"; then + for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done + fi + fi + + dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly + dnl find the mkinstalldirs script in another subdir but ($top_srcdir). + dnl Try to locate is. + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + AC_SUBST(MKINSTALLDIRS) + + dnl Generate list of files to be processed by xgettext which will + dnl be included in po/Makefile. + test -d po || mkdir po + if test "x$srcdir" != "x."; then + if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then + posrcprefix="$srcdir/" + else + posrcprefix="../$srcdir/" + fi + else + posrcprefix="../" + fi + rm -f po/POTFILES + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ + < $srcdir/po/POTFILES.in > po/POTFILES + ]) + +# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) +# ------------------------------- +# Define VARIABLE to the location where catalog files will +# be installed by po/Makefile. +glib_DEFUN([GLIB_DEFINE_LOCALEDIR], +[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl +glib_save_prefix="$prefix" +glib_save_exec_prefix="$exec_prefix" +glib_save_datarootdir="$datarootdir" +test "x$prefix" = xNONE && prefix=$ac_default_prefix +test "x$exec_prefix" = xNONE && exec_prefix=$prefix +datarootdir=`eval echo "${datarootdir}"` +if test "x$CATOBJEXT" = "x.mo" ; then + localedir=`eval echo "${libdir}/locale"` +else + localedir=`eval echo "${datadir}/locale"` +fi +prefix="$glib_save_prefix" +exec_prefix="$glib_save_exec_prefix" +datarootdir="$glib_save_datarootdir" +AC_DEFINE_UNQUOTED($1, "$localedir", + [Define the location where the catalogs will be installed]) +]) + +dnl +dnl Now the definitions that aclocal will find +dnl +ifdef(glib_configure_ac,[],[ +AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) +AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) +])dnl + +# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) +# +# Create a temporary file with TEST-FILE as its contents and pass the +# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with +# 0 and perform ACTION-IF-FAIL for any other exit status. +AC_DEFUN([GLIB_RUN_PROG], +[cat >conftest.foo <<_ACEOF +$2 +_ACEOF +if AC_RUN_LOG([$1 conftest.foo]); then + m4_ifval([$3], [$3], [:]) +m4_ifvaln([$4], [else $4])dnl +echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD +sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD +fi]) + + +dnl GNOME_COMPILE_WARNINGS +dnl Turn on many useful compiler warnings +dnl For now, only works on GCC +AC_DEFUN([GNOME_COMPILE_WARNINGS],[ + dnl ****************************** + dnl More compiler warnings + dnl ****************************** + + AC_ARG_ENABLE(compile-warnings, + AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@], + [Turn on compiler warnings]),, + [enable_compile_warnings="m4_default([$1],[yes])"]) + + warnCFLAGS= + if test "x$GCC" != xyes; then + enable_compile_warnings=no + fi + + warning_flags= + realsave_CFLAGS="$CFLAGS" + + case "$enable_compile_warnings" in + no) + warning_flags= + ;; + minimum) + warning_flags="-Wall" + ;; + yes) + warning_flags="-Wall -Wmissing-prototypes" + ;; + maximum|error) + warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith" + CFLAGS="$warning_flags $CFLAGS" + for option in -Wno-sign-compare; do + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $option" + AC_MSG_CHECKING([whether gcc understands $option]) + AC_TRY_COMPILE([], [], + has_option=yes, + has_option=no,) + CFLAGS="$SAVE_CFLAGS" + AC_MSG_RESULT($has_option) + if test $has_option = yes; then + warning_flags="$warning_flags $option" + fi + unset has_option + unset SAVE_CFLAGS + done + unset option + if test "$enable_compile_warnings" = "error" ; then + warning_flags="$warning_flags -Werror" + fi + ;; + *) + AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings) + ;; + esac + CFLAGS="$realsave_CFLAGS" + AC_MSG_CHECKING(what warning flags to pass to the C compiler) + AC_MSG_RESULT($warning_flags) + + AC_ARG_ENABLE(iso-c, + AC_HELP_STRING([--enable-iso-c], + [Try to warn if code is not ISO C ]),, + [enable_iso_c=no]) + + AC_MSG_CHECKING(what language compliance flags to pass to the C compiler) + complCFLAGS= + if test "x$enable_iso_c" != "xno"; then + if test "x$GCC" = "xyes"; then + case " $CFLAGS " in + *[\ \ ]-ansi[\ \ ]*) ;; + *) complCFLAGS="$complCFLAGS -ansi" ;; + esac + case " $CFLAGS " in + *[\ \ ]-pedantic[\ \ ]*) ;; + *) complCFLAGS="$complCFLAGS -pedantic" ;; + esac + fi + fi + AC_MSG_RESULT($complCFLAGS) + + WARN_CFLAGS="$warning_flags $complCFLAGS" + AC_SUBST(WARN_CFLAGS) +]) + +dnl For C++, do basically the same thing. + +AC_DEFUN([GNOME_CXX_WARNINGS],[ + AC_ARG_ENABLE(cxx-warnings, + AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@] + [Turn on compiler warnings.]),, + [enable_cxx_warnings="m4_default([$1],[minimum])"]) + + AC_MSG_CHECKING(what warning flags to pass to the C++ compiler) + warnCXXFLAGS= + if test "x$GXX" != xyes; then + enable_cxx_warnings=no + fi + if test "x$enable_cxx_warnings" != "xno"; then + if test "x$GXX" = "xyes"; then + case " $CXXFLAGS " in + *[\ \ ]-Wall[\ \ ]*) ;; + *) warnCXXFLAGS="-Wall -Wno-unused" ;; + esac + + ## -W is not all that useful. And it cannot be controlled + ## with individual -Wno-xxx flags, unlike -Wall + if test "x$enable_cxx_warnings" = "xyes"; then + warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual" + fi + fi + fi + AC_MSG_RESULT($warnCXXFLAGS) + + AC_ARG_ENABLE(iso-cxx, + AC_HELP_STRING([--enable-iso-cxx], + [Try to warn if code is not ISO C++ ]),, + [enable_iso_cxx=no]) + + AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler) + complCXXFLAGS= + if test "x$enable_iso_cxx" != "xno"; then + if test "x$GXX" = "xyes"; then + case " $CXXFLAGS " in + *[\ \ ]-ansi[\ \ ]*) ;; + *) complCXXFLAGS="$complCXXFLAGS -ansi" ;; + esac + + case " $CXXFLAGS " in + *[\ \ ]-pedantic[\ \ ]*) ;; + *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;; + esac + fi + fi + AC_MSG_RESULT($complCXXFLAGS) + + WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS" + AC_SUBST(WARN_CXXFLAGS) +]) + +# nls.m4 serial 5 (gettext-0.18) +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation, +dnl Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ([2.50]) + +AC_DEFUN([AM_NLS], +[ + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE([nls], + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT([$USE_NLS]) + AC_SUBST([USE_NLS]) +]) + +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) +# +# Copyright © 2004 Scott James Remnant . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_default([$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + m4_default([$4], [AC_MSG_ERROR( +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT])[]dnl + ]) +elif test $pkg_failed = untried; then + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see .])[]dnl + ]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + $3 +fi[]dnl +])# PKG_CHECK_MODULES + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.11.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 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, 2006, 2008 +# 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 9 + +# 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])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 +# 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 10 + +# 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], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --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])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# 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 5 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # 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, 2006, 2008, 2009 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 16 + +# 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.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([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 +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 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, 2008 +# 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 5 + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless `enable' is passed literally. +# For symmetry, `disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], +[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2009 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_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# 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 6 + +# 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 +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --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, 2006 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 for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008 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_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# --------------------------------------------------------------------------- +# Adds support for distributing Python modules and packages. To +# install modules, copy them to $(pythondir), using the python_PYTHON +# automake variable. To install a package with the same name as the +# automake package, install to $(pkgpythondir), or use the +# pkgpython_PYTHON automake variable. +# +# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as +# locations to install python extension modules (shared libraries). +# Another macro is required to find the appropriate flags to compile +# extension modules. +# +# If your package is configured with a different prefix to python, +# users will have to add the install directory to the PYTHONPATH +# environment variable, or create a .pth file (see the python +# documentation for details). +# +# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will +# cause an error if the version of python installed on the system +# doesn't meet the requirement. MINIMUM-VERSION should consist of +# numbers and dots only. +AC_DEFUN([AM_PATH_PYTHON], + [ + dnl Find a Python interpreter. Python versions prior to 2.0 are not + dnl supported. (2.0 was released on October 16, 2000). + m4_define_default([_AM_PYTHON_INTERPRETER_LIST], + [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl +python2.1 python2.0]) + + m4_if([$1],[],[ + dnl No version check is needed. + # Find any Python interpreter. + if test -z "$PYTHON"; then + AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) + fi + am_display_PYTHON=python + ], [ + dnl A version check is needed. + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. + AC_MSG_CHECKING([whether $PYTHON version >= $1]) + AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], + [AC_MSG_RESULT(yes)], + [AC_MSG_ERROR(too old)]) + am_display_PYTHON=$PYTHON + else + # Otherwise, try each interpreter until we find one that satisfies + # VERSION. + AC_CACHE_CHECK([for a Python interpreter with version >= $1], + [am_cv_pathless_PYTHON],[ + for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do + test "$am_cv_pathless_PYTHON" = none && break + AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) + done]) + # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. + if test "$am_cv_pathless_PYTHON" = none; then + PYTHON=: + else + AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) + fi + am_display_PYTHON=$am_cv_pathless_PYTHON + fi + ]) + + if test "$PYTHON" = :; then + dnl Run any user-specified action, or abort. + m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) + else + + dnl Query Python for its version number. Getting [:3] seems to be + dnl the best way to do this; it's what "site.py" does in the standard + dnl library. + + AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], + [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) + AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) + + dnl Use the values of $prefix and $exec_prefix for the corresponding + dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made + dnl distinct variables so they can be overridden if need be. However, + dnl general consensus is that you shouldn't need this ability. + + AC_SUBST([PYTHON_PREFIX], ['${prefix}']) + AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) + + dnl At times (like when building shared libraries) you may want + dnl to know which OS platform Python thinks this is. + + AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], + [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) + AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) + + + dnl Set up 4 directories: + + dnl pythondir -- where to install python scripts. This is the + dnl site-packages directory, not the python standard library + dnl directory like in previous automake betas. This behavior + dnl is more consistent with lispdir.m4 for example. + dnl Query distutils for this directory. distutils does not exist in + dnl Python 1.5, so we fall back to the hardcoded directory if it + dnl doesn't work. + AC_CACHE_CHECK([for $am_display_PYTHON script directory], + [am_cv_python_pythondir], + [if test "x$prefix" = xNONE + then + am_py_prefix=$ac_default_prefix + else + am_py_prefix=$prefix + fi + am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || + echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + ]) + AC_SUBST([pythondir], [$am_cv_python_pythondir]) + + dnl pkgpythondir -- $PACKAGE directory under pythondir. Was + dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is + dnl more consistent with the rest of automake. + + AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) + + dnl pyexecdir -- directory for installing python extension modules + dnl (shared libraries) + dnl Query distutils for this directory. distutils does not exist in + dnl Python 1.5, so we fall back to the hardcoded directory if it + dnl doesn't work. + AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], + [am_cv_python_pyexecdir], + [if test "x$exec_prefix" = xNONE + then + am_py_exec_prefix=$am_py_prefix + else + am_py_exec_prefix=$exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || + echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + ]) + AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) + + dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) + + AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) + + dnl Run any user-specified action. + $2 + fi + +]) + + +# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) +# --------------------------------------------------------------------------- +# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. +# Run ACTION-IF-FALSE otherwise. +# This test uses sys.hexversion instead of the string equivalent (first +# word of sys.version), in order to cope with versions such as 2.2c1. +# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). +AC_DEFUN([AM_PYTHON_CHECK_VERSION], + [prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] +sys.exit(sys.hexversion < minverhex)" + AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# 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 5 + +# 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 +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + 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) 2009 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 1 + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# (`yes' being less verbose, `no' or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], +[ --enable-silent-rules less verbose build output (undo: `make V=1') + --disable-silent-rules verbose build output (undo: `make V=0')]) +case $enable_silent_rules in +yes) AM_DEFAULT_VERBOSITY=0;; +no) AM_DEFAULT_VERBOSITY=1;; +*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# 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="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006, 2008 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_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 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 /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/gtk-doc.m4]) +m4_include([m4/intltool.m4]) +m4_include([m4/libtool.m4]) +m4_include([m4/ltoptions.m4]) +m4_include([m4/ltsugar.m4]) +m4_include([m4/ltversion.m4]) +m4_include([m4/lt~obsolete.m4]) +m4_include([m4/python.m4]) +m4_include([acinclude.m4]) diff --git a/config.guess b/config.guess new file mode 100755 index 0000000..666c5ad --- /dev/null +++ b/config.guess @@ -0,0 +1,1511 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# Free Software Foundation, Inc. + +timestamp='2009-11-20' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "${UNAME_MACHINE}" in + i?86) + test -z "$VENDOR" && VENDOR=pc + ;; + *) + test -z "$VENDOR" && VENDOR=unknown + ;; +esac +test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-${VENDOR}-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-${VENDOR}-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-${VENDOR}-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-${VENDOR}-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-${VENDOR}-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[456]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-${VENDOR}-osf1mk + else + echo ${UNAME_MACHINE}-${VENDOR}-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-${VENDOR}-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-${VENDOR}-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-${VENDOR}-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-${VENDOR}-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-${VENDOR}-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-${VENDOR}-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-${VENDOR}-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-${VENDOR}-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + else + echo ${UNAME_MACHINE}-${VENDOR}-linux-gnueabi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-${VENDOR}-linux-gnu + exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}" + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-${VENDOR}-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-${VENDOR}-linux-gnu + exit ;; + padre:Linux:*:*) + echo sparc-${VENDOR}-linux-gnu + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-${VENDOR}-linux-gnu + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-${VENDOR}-linux-gnu ;; + PA8*) echo hppa2.0-${VENDOR}-linux-gnu ;; + *) echo hppa-${VENDOR}-linux-gnu ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-${VENDOR}-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-${VENDOR}-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-${VENDOR}-linux-gnu + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-${VENDOR}-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-${VENDOR}-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-${VENDOR}-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-${VENDOR}-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-${VENDOR}-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-${VENDOR}-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-${VENDOR}-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-${VENDOR}-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-${VENDOR}-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-${VENDOR}-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-${VENDOR}-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-${VENDOR}-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-${VENDOR}-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-${VENDOR}-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.sub b/config.sub new file mode 100755 index 0000000..2a55a50 --- /dev/null +++ b/config.sub @@ -0,0 +1,1705 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# Free Software Foundation, Inc. + +timestamp='2009-11-20' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted GNU ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | picochip) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze) + basic_machine=microblaze-xilinx + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tile*) + basic_machine=tile-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/configure b/configure new file mode 100755 index 0000000..d20baae --- /dev/null +++ b/configure @@ -0,0 +1,17622 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.68 for libgsf 1.14.21. +# +# Report bugs to . +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: http://bugzilla.gnome.org/enter_bug.cgi?product=libgsf +$0: about your system, including any error possibly output +$0: before this message. Then install a modern shell, or +$0: manually run the script under such a shell if you do +$0: have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# 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'" + + + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$lt_ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +ECHO=${lt_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 <<_LT_EOF +$* +_LT_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 "$lt_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 && + { 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. +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='libgsf' +PACKAGE_TARNAME='libgsf' +PACKAGE_VERSION='1.14.21' +PACKAGE_STRING='libgsf 1.14.21' +PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=libgsf' +PACKAGE_URL='' + +ac_unique_file="gsf/gsf.h" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_header_list= +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +LIBOBJS +WITH_GCONF_FALSE +WITH_GCONF_TRUE +GCONF_SCHEMAS_INSTALL_FALSE +GCONF_SCHEMAS_INSTALL_TRUE +GCONF_SCHEMA_FILE_DIR +GCONF_SCHEMA_CONFIG_SOURCE +GCONFTOOL +WITH_LIBGSF_BONOBO_FALSE +WITH_LIBGSF_BONOBO_TRUE +WITH_LIBGSF_GNOMEVFS_FALSE +WITH_LIBGSF_GNOMEVFS_TRUE +WITH_LIBGSF_GNOME_FALSE +WITH_LIBGSF_GNOME_TRUE +LIBGSF_GNOME_LIBS +LIBGSF_GNOME_CFLAGS +GDK_PIXBUF_LIBS +GDK_PIXBUF_CFLAGS +BONOBO_REQ +LIBGSF_BONOBO_LIBS +LIBGSF_BONOBO_CFLAGS +GNOMEVFS_REQ +WITH_GIO_FALSE +WITH_GIO_TRUE +LIBGSF_GIO_LIBS +LIBGSF_GIO_CFLAGS +BZ2_LIBS +WITH_PYTHON_FALSE +WITH_PYTHON_TRUE +PYGTK_CODEGEN +PYGTK_LIBS +PYGTK_CFLAGS +PYTHON_INCLUDES +pkgpyexecdir +pyexecdir +pkgpythondir +pythondir +PYTHON_PLATFORM +PYTHON_EXEC_PREFIX +PYTHON_PREFIX +PYTHON_VERSION +PYTHON +Z_LIBS +Z_CPPFLAGS +GTK_DOC_INSTALLED_FALSE +GTK_DOC_INSTALLED_TRUE +GTK_DOC_USE_REBASE_FALSE +GTK_DOC_USE_REBASE_TRUE +GTK_DOC_USE_LIBTOOL_FALSE +GTK_DOC_USE_LIBTOOL_TRUE +GTK_DOC_BUILD_PDF_FALSE +GTK_DOC_BUILD_PDF_TRUE +GTK_DOC_BUILD_HTML_FALSE +GTK_DOC_BUILD_HTML_TRUE +ENABLE_GTK_DOC_FALSE +ENABLE_GTK_DOC_TRUE +HTML_DIR +GTKDOC_MKPDF +GTKDOC_REBASE +GTKDOC_CHECK +CROSS_COMPILING_FALSE +CROSS_COMPILING_TRUE +HAVE_LIBEXE_FALSE +HAVE_LIBEXE_TRUE +WITH_WIN32_FALSE +WITH_WIN32_TRUE +LIBEXE +WINDRES +WARN_CFLAGS +LIBGSF_LIBS +LIBGSF_CFLAGS +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +GETTEXT_PACKAGE +MKINSTALLDIRS +POSUB +POFILES +PO_IN_DATADIR_FALSE +PO_IN_DATADIR_TRUE +INTLLIBS +INSTOBJEXT +GMOFILES +CATOBJEXT +CATALOGS +MSGFMT_OPTS +DATADIRNAME +ALL_LINGUAS +INTLTOOL_PERL +GMSGFMT +MSGFMT +MSGMERGE +XGETTEXT +INTLTOOL_POLICY_RULE +INTLTOOL_SERVICE_RULE +INTLTOOL_THEME_RULE +INTLTOOL_SCHEMAS_RULE +INTLTOOL_CAVES_RULE +INTLTOOL_XML_NOMERGE_RULE +INTLTOOL_XML_RULE +INTLTOOL_KBD_RULE +INTLTOOL_XAM_RULE +INTLTOOL_UI_RULE +INTLTOOL_SOUNDLIST_RULE +INTLTOOL_SHEET_RULE +INTLTOOL_SERVER_RULE +INTLTOOL_PONG_RULE +INTLTOOL_OAF_RULE +INTLTOOL_PROP_RULE +INTLTOOL_KEYS_RULE +INTLTOOL_DIRECTORY_RULE +INTLTOOL_DESKTOP_RULE +INTLTOOL_EXTRACT +INTLTOOL_MERGE +INTLTOOL_UPDATE +USE_NLS +PKG_CONFIG +CPP +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +lt_ECHO +RANLIB +AR +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +EGREP +GREP +SED +LIBTOOL +OBJDUMP +DLLTOOL +AS +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +CURRENT_MINUS_AGE +VERSION_INFO +LIBGSF_MICRO_VERSION +LIBGSF_MINOR_VERSION +LIBGSF_MAJOR_VERSION +ACLOCAL_AMFLAGS +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_maintainer_mode +enable_silent_rules +enable_dependency_tracking +enable_shared +enable_static +with_pic +enable_fast_install +with_gnu_ld +enable_libtool_lock +enable_largefile +enable_nls +enable_compile_warnings +enable_iso_c +with_html_dir +enable_gtk_doc +enable_gtk_doc_html +enable_gtk_doc_pdf +with_zlib +with_python +with_bz2 +with_gio +with_gnome_vfs +with_bonobo +with_gdk_pixbuf +with_gconf +with_gconf_source +with_gconf_schema_file_dir +enable_schemas_install +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR +LIBGSF_CFLAGS +LIBGSF_LIBS +WINDRES +LIBEXE +PYGTK_CFLAGS +PYGTK_LIBS +LIBGSF_GIO_CFLAGS +LIBGSF_GIO_LIBS +LIBGSF_BONOBO_CFLAGS +LIBGSF_BONOBO_LIBS +GDK_PIXBUF_CFLAGS +GDK_PIXBUF_LIBS +LIBGSF_GNOME_CFLAGS +LIBGSF_GNOME_LIBS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_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 + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures libgsf 1.14.21 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/libgsf] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of libgsf 1.14.21:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --enable-silent-rules less verbose build output (undo: `make V=1') + --disable-silent-rules verbose build output (undo: `make V=0') + --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) + --disable-largefile omit support for large files + --disable-nls do not use Native Language Support + --enable-compile-warnings=[no/minimum/yes/maximum/error] + Turn on compiler warnings + --enable-iso-c Try to warn if code is not ISO C + --enable-gtk-doc use gtk-doc to build documentation [[default=no]] + --enable-gtk-doc-html build documentation in html format [[default=yes]] + --enable-gtk-doc-pdf build documentation in pdf format [[default=no]] + --disable-schemas-install + Disable the schemas installation + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-html-dir=PATH path to installed docs + --with-zlib=DIR use libz in DIR +--{with,without}-python Build with the python support +--{with,without}-bz2 Build additional wrappers for BZ2 +--{with,without}-gio Build additional wrappers for GIO +--{with,without}-gnome-vfs Build wrappers for GNOME-VFS + --without-bonobo disable the use of bonobo + --without-gdk-pixbuf disable the use of gdk-pixbuf + --without-gconf disable the use of gconf (default: auto) + --with-gconf-source=sourceaddress + Config database for installing schema files. + --with-gconf-schema-file-dir=dir + Directory for installing schema files. + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path + LIBGSF_CFLAGS + C compiler flags for LIBGSF, overriding pkg-config + LIBGSF_LIBS linker flags for LIBGSF, overriding pkg-config + WINDRES The windres executable (used by win32 builds only). + LIBEXE The lib.exe executable (used by win32 builds only). + PYGTK_CFLAGS + C compiler flags for PYGTK, overriding pkg-config + PYGTK_LIBS linker flags for PYGTK, overriding pkg-config + LIBGSF_GIO_CFLAGS + C compiler flags for LIBGSF_GIO, overriding pkg-config + LIBGSF_GIO_LIBS + linker flags for LIBGSF_GIO, overriding pkg-config + LIBGSF_BONOBO_CFLAGS + C compiler flags for LIBGSF_BONOBO, overriding pkg-config + LIBGSF_BONOBO_LIBS + linker flags for LIBGSF_BONOBO, overriding pkg-config + GDK_PIXBUF_CFLAGS + C compiler flags for GDK_PIXBUF, overriding pkg-config + GDK_PIXBUF_LIBS + linker flags for GDK_PIXBUF, overriding pkg-config + LIBGSF_GNOME_CFLAGS + C compiler flags for LIBGSF_GNOME, overriding pkg-config + LIBGSF_GNOME_LIBS + linker flags for LIBGSF_GNOME, overriding pkg-config + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +libgsf configure 1.14.21 +generated by GNU Autoconf 2.68 + +Copyright (C) 2010 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## --------------------------------------------------------------------- ## +## Report this to http://bugzilla.gnome.org/enter_bug.cgi?product=libgsf ## +## --------------------------------------------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_decl + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type + +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if eval \${$4+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_member +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by libgsf $as_me 1.14.21, which was +generated by GNU Autoconf 2.68. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +as_fn_append ac_header_list " stdlib.h" +as_fn_append ac_header_list " unistd.h" +as_fn_append ac_header_list " sys/param.h" +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +ACLOCAL_AMFLAGS="$ACLOCAL_FLAGS -I m4" + + +LIBGSF_MAJOR_VERSION=1 + +LIBGSF_MINOR_VERSION=14 + +LIBGSF_MICRO_VERSION=21 + + + + +VERSION_INFO=114:21:0 + +CURRENT_MINUS_AGE=114 + + +am__api_version='1.11' + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + 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". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='libgsf' + VERSION='1.14.21' + + +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"} + +# 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_config_headers="$ac_config_headers gsf-config.h" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in +yes) AM_DEFAULT_VERBOSITY=0;; +no) AM_DEFAULT_VERBOSITY=1;; +*) AM_DEFAULT_VERBOSITY=0;; +esac +AM_BACKSLASH='\' + + +ACLOCAL_AMFLAGS=$ACLOCAL_FLAGS + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) + 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AS+:} false; then : + $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AS="${ac_tool_prefix}as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AS+:} false; then : + $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AS="as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + + ;; +esac + +test -z "$AS" && AS=as + + + + + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.2.6b' +macro_revision='1.3018' + + + + + + + + + + + + + +ltmain="$ac_aux_dir/ltmain.sh" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$ac_tool_prefix"; then + for ac_prog in "dumpbin -symbols" "link -dump -symbols" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in "dumpbin -symbols" "link -dump -symbols" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:5257: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:5260: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:5263: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +# find the maximum length of command line arguments +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + 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 + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +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 + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + 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=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_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 -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +fi + + + + + + + + + + + + + + + + + + + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 6466 "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + 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-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF + +fi + +done + + + +# Set options + + + + enable_dlopen=no + + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; pic_mode="$withval" +else + pic_mode=default +fi + + +test -z "$pic_mode" && pic_mode=default + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + + + + + + + + + + + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7993: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7997: \$? = $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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + 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' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +$as_echo "$lt_prog_compiler_pic" >&6; } + + + + + + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8332: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:8336: \$? = $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_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "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_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8437: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:8441: \$? = $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 .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8492: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:8496: \$? = $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 .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + 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>&1` 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 + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.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. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + 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 + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $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' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' + archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + 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 <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $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 + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $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 + ;; + + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + 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].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$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 "X${wl}${allow_undefined_flag}" | $Xsed; 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$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*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + 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 "X$deplibs" | $Xsed -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*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + 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* | 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_flag_spec_ld='+b $libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -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 -fPIC ${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_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (void) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + 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* + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 +$as_echo "$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_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. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$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' + ;; + esac + ;; + +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* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw* | cegcc*) + # 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}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + 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 + ;; + +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 + ;; + *) # from 4.6 on, and DragonFly + 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' + ;; + +interix[3-9]*) + 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* | k*bsd*-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' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/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' + ;; + +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=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + 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 + 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 + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 10860 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +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 ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 10956 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +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 ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report which library types will actually be built + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 +$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } +if ${ac_cv_sys_largefile_source+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include /* for off_t */ + #include +int +main () +{ +int (*fp) (FILE *, off_t, int) = fseeko; + return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_sys_largefile_source=no; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGEFILE_SOURCE 1 +#include /* for off_t */ + #include +int +main () +{ +int (*fp) (FILE *, off_t, int) = fseeko; + return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_sys_largefile_source=1; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_cv_sys_largefile_source=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 +$as_echo "$ac_cv_sys_largefile_source" >&6; } +case $ac_cv_sys_largefile_source in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source +_ACEOF +;; +esac +rm -rf conftest* + +# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug +# in glibc 2.1.3, but that breaks too many other things. +# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. +if test $ac_cv_sys_largefile_source != unknown; then + +$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h + +fi + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if ${ac_cv_sys_largefile_CC+:} false; then : + $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* 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 + if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if ${ac_cv_sys_file_offset_bits+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* 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 +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* 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 +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if ${ac_cv_sys_large_files+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* 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 +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* 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 +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi +fi + +# Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 +$as_echo_n "checking whether NLS is requested... " >&6; } + # Check whether --enable-nls was given. +if test "${enable_nls+set}" = set; then : + enableval=$enable_nls; USE_NLS=$enableval +else + USE_NLS=yes +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } + + + + +case "$am__api_version" in + 1.01234) + as_fn_error $? "Automake 1.5 or newer is required to use intltool" "$LINENO" 5 + ;; + *) + ;; +esac + +if test -n "0.35.0"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= 0.35.0" >&5 +$as_echo_n "checking for intltool >= 0.35.0... " >&6; } + + INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.35.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` + INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` + INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5 +$as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; } + test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || + as_fn_error $? "Your intltool is too old. You need intltool 0.35.0 or later." "$LINENO" 5 +fi + +# Extract the first word of "intltool-update", so it can be a program name with args. +set dummy intltool-update; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_INTLTOOL_UPDATE+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $INTLTOOL_UPDATE in + [\\/]* | ?:[\\/]*) + ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE +if test -n "$INTLTOOL_UPDATE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_UPDATE" >&5 +$as_echo "$INTLTOOL_UPDATE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "intltool-merge", so it can be a program name with args. +set dummy intltool-merge; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_INTLTOOL_MERGE+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $INTLTOOL_MERGE in + [\\/]* | ?:[\\/]*) + ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE +if test -n "$INTLTOOL_MERGE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_MERGE" >&5 +$as_echo "$INTLTOOL_MERGE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "intltool-extract", so it can be a program name with args. +set dummy intltool-extract; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_INTLTOOL_EXTRACT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $INTLTOOL_EXTRACT in + [\\/]* | ?:[\\/]*) + ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT +if test -n "$INTLTOOL_EXTRACT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_EXTRACT" >&5 +$as_echo "$INTLTOOL_EXTRACT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then + as_fn_error $? "The intltool scripts were not found. Please install intltool." "$LINENO" 5 +fi + + INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' +INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@' + INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' +INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@' + INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# Check the gettext tools to make sure they are GNU +# Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_XGETTEXT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $XGETTEXT in + [\\/]* | ?:[\\/]*) + ac_cv_path_XGETTEXT="$XGETTEXT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +XGETTEXT=$ac_cv_path_XGETTEXT +if test -n "$XGETTEXT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 +$as_echo "$XGETTEXT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "msgmerge", so it can be a program name with args. +set dummy msgmerge; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_MSGMERGE+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MSGMERGE in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGMERGE="$MSGMERGE" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +MSGMERGE=$ac_cv_path_MSGMERGE +if test -n "$MSGMERGE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 +$as_echo "$MSGMERGE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_MSGFMT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGFMT="$MSGFMT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +MSGFMT=$ac_cv_path_MSGFMT +if test -n "$MSGFMT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +$as_echo "$MSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GMSGFMT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GMSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT=$ac_cv_path_GMSGFMT +if test -n "$GMSGFMT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 +$as_echo "$GMSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then + as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5 +fi +xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" +mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" +mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" +if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then + as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5 +fi + +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_INTLTOOL_PERL+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $INTLTOOL_PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_INTLTOOL_PERL="$INTLTOOL_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL +if test -n "$INTLTOOL_PERL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_PERL" >&5 +$as_echo "$INTLTOOL_PERL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test -z "$INTLTOOL_PERL"; then + as_fn_error $? "perl not found" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl >= 5.8.1" >&5 +$as_echo_n "checking for perl >= 5.8.1... " >&6; } +$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 +if test $? -ne 0; then + as_fn_error $? "perl 5.8.1 is required for intltool" "$LINENO" 5 +else + IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IT_PERL_VERSION" >&5 +$as_echo "$IT_PERL_VERSION" >&6; } +fi +if test "x" != "xno-xml"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML::Parser" >&5 +$as_echo_n "checking for XML::Parser... " >&6; } + if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + else + as_fn_error $? "XML::Parser perl module is required for intltool" "$LINENO" 5 + fi +fi + +# Substitute ALL_LINGUAS so we can use it in po/Makefile + + +# Set DATADIRNAME correctly if it is not set yet +# (copied from glib-gettext.m4) +if test -z "$DATADIRNAME"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + DATADIRNAME=share +else + case $host in + *-*-solaris*) + ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" +if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : + DATADIRNAME=share +else + DATADIRNAME=lib +fi + + ;; + *) + DATADIRNAME=lib + ;; + esac +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + + + + + + for ac_header in locale.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" +if test "x$ac_cv_header_locale_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LOCALE_H 1 +_ACEOF + +fi + +done + + if test $ac_cv_header_locale_h = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 +$as_echo_n "checking for LC_MESSAGES... " >&6; } +if ${am_cv_val_LC_MESSAGES+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +return LC_MESSAGES + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + am_cv_val_LC_MESSAGES=yes +else + am_cv_val_LC_MESSAGES=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 +$as_echo "$am_cv_val_LC_MESSAGES" >&6; } + if test $am_cv_val_LC_MESSAGES = yes; then + +$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h + + fi + fi + USE_NLS=yes + + + gt_cv_have_gettext=no + + CATOBJEXT=NONE + XGETTEXT=: + INTLLIBS= + + ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" +if test "x$ac_cv_header_libintl_h" = xyes; then : + gt_cv_func_dgettext_libintl="no" + libintl_extra_libs="" + + # + # First check in libc + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5 +$as_echo_n "checking for ngettext in libc... " >&6; } +if ${gt_cv_func_ngettext_libc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +int +main () +{ +return !ngettext ("","", 1) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_ngettext_libc=yes +else + gt_cv_func_ngettext_libc=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5 +$as_echo "$gt_cv_func_ngettext_libc" >&6; } + + if test "$gt_cv_func_ngettext_libc" = "yes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5 +$as_echo_n "checking for dgettext in libc... " >&6; } +if ${gt_cv_func_dgettext_libc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +int +main () +{ +return !dgettext ("","") + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_dgettext_libc=yes +else + gt_cv_func_dgettext_libc=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5 +$as_echo "$gt_cv_func_dgettext_libc" >&6; } + fi + + if test "$gt_cv_func_ngettext_libc" = "yes" ; then + for ac_func in bind_textdomain_codeset +do : + ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" +if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_BIND_TEXTDOMAIN_CODESET 1 +_ACEOF + +fi +done + + fi + + # + # If we don't have everything we want, check in libintl + # + if test "$gt_cv_func_dgettext_libc" != "yes" \ + || test "$gt_cv_func_ngettext_libc" != "yes" \ + || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5 +$as_echo_n "checking for bindtextdomain in -lintl... " >&6; } +if ${ac_cv_lib_intl_bindtextdomain+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lintl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char bindtextdomain (); +int +main () +{ +return bindtextdomain (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_intl_bindtextdomain=yes +else + ac_cv_lib_intl_bindtextdomain=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5 +$as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; } +if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 +$as_echo_n "checking for ngettext in -lintl... " >&6; } +if ${ac_cv_lib_intl_ngettext+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lintl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ngettext (); +int +main () +{ +return ngettext (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_intl_ngettext=yes +else + ac_cv_lib_intl_ngettext=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 +$as_echo "$ac_cv_lib_intl_ngettext" >&6; } +if test "x$ac_cv_lib_intl_ngettext" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 +$as_echo_n "checking for dgettext in -lintl... " >&6; } +if ${ac_cv_lib_intl_dgettext+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lintl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dgettext (); +int +main () +{ +return dgettext (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_intl_dgettext=yes +else + ac_cv_lib_intl_dgettext=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 +$as_echo "$ac_cv_lib_intl_dgettext" >&6; } +if test "x$ac_cv_lib_intl_dgettext" = xyes; then : + gt_cv_func_dgettext_libintl=yes +fi + +fi + +fi + + + if test "$gt_cv_func_dgettext_libintl" != "yes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5 +$as_echo_n "checking if -liconv is needed to use gettext... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 +$as_echo "" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 +$as_echo_n "checking for ngettext in -lintl... " >&6; } +if ${ac_cv_lib_intl_ngettext+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lintl -liconv $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ngettext (); +int +main () +{ +return ngettext (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_intl_ngettext=yes +else + ac_cv_lib_intl_ngettext=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 +$as_echo "$ac_cv_lib_intl_ngettext" >&6; } +if test "x$ac_cv_lib_intl_ngettext" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5 +$as_echo_n "checking for dcgettext in -lintl... " >&6; } +if ${ac_cv_lib_intl_dcgettext+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lintl -liconv $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dcgettext (); +int +main () +{ +return dcgettext (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_intl_dcgettext=yes +else + ac_cv_lib_intl_dcgettext=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5 +$as_echo "$ac_cv_lib_intl_dcgettext" >&6; } +if test "x$ac_cv_lib_intl_dcgettext" = xyes; then : + gt_cv_func_dgettext_libintl=yes + libintl_extra_libs=-liconv +else + : +fi + +else + : +fi + + fi + + # + # If we found libintl, then check in it for bind_textdomain_codeset(); + # we'll prefer libc if neither have bind_textdomain_codeset(), + # and both have dgettext and ngettext + # + if test "$gt_cv_func_dgettext_libintl" = "yes" ; then + glib_save_LIBS="$LIBS" + LIBS="$LIBS -lintl $libintl_extra_libs" + unset ac_cv_func_bind_textdomain_codeset + for ac_func in bind_textdomain_codeset +do : + ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" +if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_BIND_TEXTDOMAIN_CODESET 1 +_ACEOF + +fi +done + + LIBS="$glib_save_LIBS" + + if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then + gt_cv_func_dgettext_libc=no + else + if test "$gt_cv_func_dgettext_libc" = "yes" \ + && test "$gt_cv_func_ngettext_libc" = "yes"; then + gt_cv_func_dgettext_libintl=no + fi + fi + fi + fi + + if test "$gt_cv_func_dgettext_libc" = "yes" \ + || test "$gt_cv_func_dgettext_libintl" = "yes"; then + gt_cv_have_gettext=yes + fi + + if test "$gt_cv_func_dgettext_libintl" = "yes"; then + INTLLIBS="-lintl $libintl_extra_libs" + fi + + if test "$gt_cv_have_gettext" = "yes"; then + +$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h + + # Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_MSGFMT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$MSGFMT" in + /*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then + ac_cv_path_MSGFMT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test "$MSGFMT" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +$as_echo "$MSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + if test "$MSGFMT" != "no"; then + glib_save_LIBS="$LIBS" + LIBS="$LIBS $INTLLIBS" + for ac_func in dcgettext +do : + ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext" +if test "x$ac_cv_func_dcgettext" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DCGETTEXT 1 +_ACEOF + +fi +done + + MSGFMT_OPTS= + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5 +$as_echo_n "checking if msgfmt accepts -c... " >&6; } + cat >conftest.foo <<_ACEOF + +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: test 1.0\n" +"PO-Revision-Date: 2007-02-15 12:01+0100\n" +"Last-Translator: test \n" +"Language-Team: C \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" + +_ACEOF +if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5 + ($MSGFMT -c -o /dev/null conftest.foo) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +echo "$as_me: failed input was:" >&5 +sed 's/^/| /' conftest.foo >&5 +fi + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GMSGFMT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GMSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT=$ac_cv_path_GMSGFMT +if test -n "$GMSGFMT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 +$as_echo "$GMSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + # Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_XGETTEXT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$XGETTEXT" in + /*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test "$XGETTEXT" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 +$as_echo "$XGETTEXT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + CATOBJEXT=.gmo + DATADIRNAME=share +else + case $host in + *-*-solaris*) + ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" +if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : + CATOBJEXT=.gmo + DATADIRNAME=share +else + CATOBJEXT=.mo + DATADIRNAME=lib +fi + + ;; + *) + CATOBJEXT=.mo + DATADIRNAME=lib + ;; + esac +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$glib_save_LIBS" + INSTOBJEXT=.mo + else + gt_cv_have_gettext=no + fi + fi + +fi + + + + if test "$gt_cv_have_gettext" = "yes" ; then + +$as_echo "#define ENABLE_NLS 1" >>confdefs.h + + fi + + if test "$XGETTEXT" != ":"; then + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then + : ; + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5 +$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; } + XGETTEXT=":" + fi + fi + + # We need to process the po/ directory. + POSUB=po + + ac_config_commands="$ac_config_commands default-1" + + + for lang in $ALL_LINGUAS; do + GMOFILES="$GMOFILES $lang.gmo" + POFILES="$POFILES $lang.po" + done + + + + + + + + + + + + + + if test "$gt_cv_have_gettext" = "yes"; then + if test "x$ALL_LINGUAS" = "x"; then + LINGUAS= + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 +$as_echo_n "checking for catalogs to be installed... " >&6; } + NEW_LINGUAS= + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + NEW_LINGUAS="$NEW_LINGUAS $presentlang" + fi + done + LINGUAS=$NEW_LINGUAS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 +$as_echo "$LINGUAS" >&6; } + fi + + if test -n "$LINGUAS"; then + for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done + fi + fi + + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + + + test -d po || mkdir po + if test "x$srcdir" != "x."; then + if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then + posrcprefix="$srcdir/" + else + posrcprefix="../$srcdir/" + fi + else + posrcprefix="../" + fi + rm -f po/POTFILES + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ + < $srcdir/po/POTFILES.in > po/POTFILES + + +GETTEXT_PACKAGE=libgsf + + +cat >>confdefs.h <<_ACEOF +#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" +_ACEOF + + + +common_reqs=" + gobject-2.0 >= 2.6.0 + glib-2.0 >= 2.8.0 +" +libgsf_reqs=" + $common_reqs + libxml-2.0 >= 2.4.16 +" +libgsf_gnome_reqs=" + $common_reqs +" + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBGSF" >&5 +$as_echo_n "checking for LIBGSF... " >&6; } + +if test -n "$LIBGSF_CFLAGS"; then + pkg_cv_LIBGSF_CFLAGS="$LIBGSF_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$libgsf_reqs\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$libgsf_reqs") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBGSF_CFLAGS=`$PKG_CONFIG --cflags "$libgsf_reqs" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBGSF_LIBS"; then + pkg_cv_LIBGSF_LIBS="$LIBGSF_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$libgsf_reqs\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$libgsf_reqs") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBGSF_LIBS=`$PKG_CONFIG --libs "$libgsf_reqs" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBGSF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$libgsf_reqs" 2>&1` + else + LIBGSF_PKG_ERRORS=`$PKG_CONFIG --print-errors "$libgsf_reqs" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBGSF_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements ($libgsf_reqs) were not met: + +$LIBGSF_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables LIBGSF_CFLAGS +and LIBGSF_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables LIBGSF_CFLAGS +and LIBGSF_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } +else + LIBGSF_CFLAGS=$pkg_cv_LIBGSF_CFLAGS + LIBGSF_LIBS=$pkg_cv_LIBGSF_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + +## this should come after `AC_PROG_CC' + + + # Check whether --enable-compile-warnings was given. +if test "${enable_compile_warnings+set}" = set; then : + enableval=$enable_compile_warnings; +else + enable_compile_warnings="yes" +fi + + + warnCFLAGS= + if test "x$GCC" != xyes; then + enable_compile_warnings=no + fi + + warning_flags= + realsave_CFLAGS="$CFLAGS" + + case "$enable_compile_warnings" in + no) + warning_flags= + ;; + minimum) + warning_flags="-Wall" + ;; + yes) + warning_flags="-Wall -Wmissing-prototypes" + ;; + maximum|error) + warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith" + CFLAGS="$warning_flags $CFLAGS" + for option in -Wno-sign-compare; do + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands $option" >&5 +$as_echo_n "checking whether gcc understands $option... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + has_option=yes +else + has_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$SAVE_CFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 +$as_echo "$has_option" >&6; } + if test $has_option = yes; then + warning_flags="$warning_flags $option" + fi + unset has_option + unset SAVE_CFLAGS + done + unset option + if test "$enable_compile_warnings" = "error" ; then + warning_flags="$warning_flags -Werror" + fi + ;; + *) + as_fn_error $? "Unknown argument '$enable_compile_warnings' to --enable-compile-warnings" "$LINENO" 5 + ;; + esac + CFLAGS="$realsave_CFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking what warning flags to pass to the C compiler" >&5 +$as_echo_n "checking what warning flags to pass to the C compiler... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $warning_flags" >&5 +$as_echo "$warning_flags" >&6; } + + # Check whether --enable-iso-c was given. +if test "${enable_iso_c+set}" = set; then : + enableval=$enable_iso_c; +else + enable_iso_c=no +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking what language compliance flags to pass to the C compiler" >&5 +$as_echo_n "checking what language compliance flags to pass to the C compiler... " >&6; } + complCFLAGS= + if test "x$enable_iso_c" != "xno"; then + if test "x$GCC" = "xyes"; then + case " $CFLAGS " in + *\ \ -ansi\ \ *) ;; + *) complCFLAGS="$complCFLAGS -ansi" ;; + esac + case " $CFLAGS " in + *\ \ -pedantic\ \ *) ;; + *) complCFLAGS="$complCFLAGS -pedantic" ;; + esac + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $complCFLAGS" >&5 +$as_echo "$complCFLAGS" >&6; } + + WARN_CFLAGS="$warning_flags $complCFLAGS" + + +CFLAGS="$CFLAGS $WARN_CFLAGS -DG_DISABLE_DEPRECATED" +if test "$GCC" = "yes"; then + for option in -Wno-system-headers -Wfloat-equal -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -Wnested-externs -Winline -Wdeclaration-after-statement -Wundef -W -Wmissing-noreturn -Wmissing-format-attribute -Wno-pointer-sign \ + -Wbitwise -Wcast-to-as -Wdefault-bitfield-sign -Wdo-while -Wparen-string -Wptr-subtraction-blows -Wreturn-void -Wtypesign ; do + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands $option" >&5 +$as_echo_n "checking whether gcc understands $option... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + has_option=yes +else + has_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $has_option = no; then + CFLAGS="$SAVE_CFLAGS" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 +$as_echo "$has_option" >&6; } + unset has_option + unset SAVE_CFLAGS + done + unset option +fi + +ac_fn_c_check_decl "$LINENO" "fdopen" "ac_cv_have_decl_fdopen" "$ac_includes_default" +if test "x$ac_cv_have_decl_fdopen" = xyes; then : + fdopen_works=yes +else + fdopen_works=no +fi + +if test $fdopen_works = no ; then + unset ac_cv_have_decl_fdopen + CFLAGS="$CFLAGS -D_POSIX_SOURCE" + { $as_echo "$as_me:${as_lineno-$LINENO}: adding -D_POSIX_SOURCE to CFLAGS" >&5 +$as_echo "$as_me: adding -D_POSIX_SOURCE to CFLAGS" >&6;} + ac_fn_c_check_decl "$LINENO" "fdopen" "ac_cv_have_decl_fdopen" "$ac_includes_default" +if test "x$ac_cv_have_decl_fdopen" = xyes; then : + fdopen_works=yes +else + fdopen_works=no +fi + + if test $fdopen_works = no ; then + as_fn_error $? "fdopen is not available" "$LINENO" 5 + fi +fi + +# Unfortunately, -D_POSIX_SOURCE turns off struct timeval on Solaris +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct timeval is available" >&5 +$as_echo_n "checking whether struct timeval is available... " >&6; } +for try in 1 2; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +struct timeval tv; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + struct_timeval_works=yes +else + struct_timeval_works=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test $struct_timeval_works = yes && break + # Try this for the second attempt: + test $try = 1 && CFLAGS="$CFLAGS -D__EXTENSIONS__" +done +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $struct_timeval_works" >&5 +$as_echo "$struct_timeval_works" >&6; } +if test $struct_timeval_works = no ; then + as_fn_error $? "struct timeval is not available" "$LINENO" 5 +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -D_BSD_SOURCE is needed for caddr_t" >&5 +$as_echo_n "checking whether -D_BSD_SOURCE is needed for caddr_t... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +caddr_t ca + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + need_bsd1=no +else + need_bsd1=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $need_bsd1" >&5 +$as_echo "$need_bsd1" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -D_BSD_SOURCE is needed for lstat" >&5 +$as_echo_n "checking whether -D_BSD_SOURCE is needed for lstat... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +int +main () +{ +void *ptr = &lstat + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + need_bsd2=no +else + need_bsd2=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $need_bsd2" >&5 +$as_echo "$need_bsd2" >&6; } +if test $need_bsd1 = yes -o $need_bsd2 = yes; then + CFLAGS="$CFLAGS -D_BSD_SOURCE" +fi + +ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" +if test "x$ac_cv_type_mode_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define mode_t int +_ACEOF + +fi + +for ac_header in fcntl.h malloc.h unistd.h io.h sys/statfs.h sys/param.h sys/mount.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + for ac_header in $ac_header_list +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + +for ac_func in getpagesize +do : + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETPAGESIZE 1 +_ACEOF + +fi +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 +$as_echo_n "checking for working mmap... " >&6; } +if ${ac_cv_func_mmap_fixed_mapped+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_mmap_fixed_mapped=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ + +#include +#include + +#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H +char *malloc (); +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +int +main () +{ + char *data, *data2, *data3; + const char *cdata2; + int i, pagesize; + int fd, fd2; + + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + return 1; + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + return 2; + if (write (fd, data, pagesize) != pagesize) + return 3; + close (fd); + + /* Next, check that the tail of a page is zero-filled. File must have + non-zero length, otherwise we risk SIGBUS for entire page. */ + fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd2 < 0) + return 4; + cdata2 = ""; + if (write (fd2, cdata2, 1) != 1) + return 5; + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + if (data2 == MAP_FAILED) + return 6; + for (i = 0; i < pagesize; ++i) + if (*(data2 + i)) + return 7; + close (fd2); + if (munmap (data2, pagesize)) + return 8; + + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + return 9; + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + return 10; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + return 11; + + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + return 12; + if (read (fd, data3, pagesize) != pagesize) + return 13; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + return 14; + close (fd); + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_mmap_fixed_mapped=yes +else + ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 +$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +$as_echo "#define HAVE_MMAP 1" >>confdefs.h + +fi +rm -f conftest.mmap conftest.txt + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking form of statfs" >&5 +$as_echo_n "checking form of statfs... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef HAVE_SYS_STATFS_H +#include +#endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_MOUNT_H +#include +#endif +int +main () +{ +struct statfs buf; (void)(2*statfs("xyz",&buf)); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2-arg, linux-style" >&5 +$as_echo "2-arg, linux-style" >&6; } + +$as_echo "#define HAVE_2ARG_STATFS 1" >>confdefs.h + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none, or unknown" >&5 +$as_echo "none, or unknown" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +for ac_func in chown setrlimit +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +for ac_func in gmtime_r +do : + ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r" +if test "x$ac_cv_func_gmtime_r" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GMTIME_R 1 +_ACEOF + +else + for ac_func in gmtime +do : + ac_fn_c_check_func "$LINENO" "gmtime" "ac_cv_func_gmtime" +if test "x$ac_cv_func_gmtime" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GMTIME 1 +_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Please note that gmtime_r() is missing and I will use gmtime() which is not thread safe ***" >&5 +$as_echo "$as_me: WARNING: *** Please note that gmtime_r() is missing and I will use gmtime() which is not thread safe ***" >&2;} +else + as_fn_error $? "Neither gmtime_r or gmtime is available" "$LINENO" 5 +fi +done + +fi +done + + +ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include +" +if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_TM_TM_GMTOFF 1 +_ACEOF + + +fi + + +SAVE_CFLAGS=$CFLAGS +SAVE_LIBS=$LIBS +CFLAGS="$CFLAGS $LIBGSF_CFLAGS" +LIBS="$LIBGSF_LIBS $LIBS" +for ac_func in g_base64_encode +do : + ac_fn_c_check_func "$LINENO" "g_base64_encode" "ac_cv_func_g_base64_encode" +if test "x$ac_cv_func_g_base64_encode" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_G_BASE64_ENCODE 1 +_ACEOF + +fi +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for g_chmod" >&5 +$as_echo_n "checking for g_chmod... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +(void)g_chmod("/xxx",0777); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +$as_echo "#define HAVE_G_CHMOD 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for g_access" >&5 +$as_echo_n "checking for g_access... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +(void)g_access("/xxx",0777); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +$as_echo "#define HAVE_G_ACCESS 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +CFLAGS=$SAVE_CFLAGS +LIBS=$SAVE_LIBS + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether macro S_ISREG is available" >&5 +$as_echo_n "checking whether macro S_ISREG is available... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ +S_ISREG(S_IFMT); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + macro_s_isreg=yes +else + + $as_echo "#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)" >>confdefs.h + + macro_s_isreg=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $macro_s_isreg" >&5 +$as_echo "$macro_s_isreg" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Win32 platform" >&5 +$as_echo_n "checking for Win32 platform... " >&6; } +with_win32=no +case $host_os in + mingw* | pw32* | cygwin*) + with_win32=yes + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. +set dummy ${ac_tool_prefix}windres; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_WINDRES+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$WINDRES"; then + ac_cv_prog_WINDRES="$WINDRES" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_WINDRES="${ac_tool_prefix}windres" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +WINDRES=$ac_cv_prog_WINDRES +if test -n "$WINDRES"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 +$as_echo "$WINDRES" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_WINDRES"; then + ac_ct_WINDRES=$WINDRES + # Extract the first word of "windres", so it can be a program name with args. +set dummy windres; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_WINDRES+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_WINDRES"; then + ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_WINDRES="windres" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES +if test -n "$ac_ct_WINDRES"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 +$as_echo "$ac_ct_WINDRES" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_WINDRES" = x; then + WINDRES="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + WINDRES=$ac_ct_WINDRES + fi +else + WINDRES="$ac_cv_prog_WINDRES" +fi + + + # Extract the first word of "lib.exe", so it can be a program name with args. +set dummy lib.exe; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIBEXE+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIBEXE"; then + ac_cv_prog_LIBEXE="$LIBEXE" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LIBEXE="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_LIBEXE" && ac_cv_prog_LIBEXE="no" +fi +fi +LIBEXE=$ac_cv_prog_LIBEXE +if test -n "$LIBEXE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXE" >&5 +$as_echo "$LIBEXE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_win32" >&5 +$as_echo "$with_win32" >&6; } + if test $with_win32 = yes; then + WITH_WIN32_TRUE= + WITH_WIN32_FALSE='#' +else + WITH_WIN32_TRUE='#' + WITH_WIN32_FALSE= +fi + + if test x$LIBEXE = xyes; then + HAVE_LIBEXE_TRUE= + HAVE_LIBEXE_FALSE='#' +else + HAVE_LIBEXE_TRUE='#' + HAVE_LIBEXE_FALSE= +fi + + if test x"$cross_compiling" != "xno"; then + CROSS_COMPILING_TRUE= + CROSS_COMPILING_FALSE='#' +else + CROSS_COMPILING_TRUE='#' + CROSS_COMPILING_FALSE= +fi + + +################################################## +# Checks for gtk-doc and docbook-tools +################################################## +gtk_doc_installed=true +#ifdef([GTK_DOC_CHECK],[GTK_DOC_CHECK([1.0])],[gtk_doc_installed=false]) +# I would have liked to conditionalize this, but +# that appears to break other things http://bugzilla.gnome.org/show_bug.cgi?id=156399 + + + # Extract the first word of "gtkdoc-check", so it can be a program name with args. +set dummy gtkdoc-check; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GTKDOC_CHECK+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GTKDOC_CHECK in + [\\/]* | ?:[\\/]*) + ac_cv_path_GTKDOC_CHECK="$GTKDOC_CHECK" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +GTKDOC_CHECK=$ac_cv_path_GTKDOC_CHECK +if test -n "$GTKDOC_CHECK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5 +$as_echo "$GTKDOC_CHECK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + for ac_prog in gtkdoc-rebase +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GTKDOC_REBASE+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GTKDOC_REBASE in + [\\/]* | ?:[\\/]*) + ac_cv_path_GTKDOC_REBASE="$GTKDOC_REBASE" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GTKDOC_REBASE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +GTKDOC_REBASE=$ac_cv_path_GTKDOC_REBASE +if test -n "$GTKDOC_REBASE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_REBASE" >&5 +$as_echo "$GTKDOC_REBASE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$GTKDOC_REBASE" && break +done +test -n "$GTKDOC_REBASE" || GTKDOC_REBASE="true" + + # Extract the first word of "gtkdoc-mkpdf", so it can be a program name with args. +set dummy gtkdoc-mkpdf; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GTKDOC_MKPDF+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GTKDOC_MKPDF in + [\\/]* | ?:[\\/]*) + ac_cv_path_GTKDOC_MKPDF="$GTKDOC_MKPDF" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GTKDOC_MKPDF="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +GTKDOC_MKPDF=$ac_cv_path_GTKDOC_MKPDF +if test -n "$GTKDOC_MKPDF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_MKPDF" >&5 +$as_echo "$GTKDOC_MKPDF" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + +# Check whether --with-html-dir was given. +if test "${with_html_dir+set}" = set; then : + withval=$with_html_dir; +else + with_html_dir='${datadir}/gtk-doc/html' +fi + + HTML_DIR="$with_html_dir" + + + # Check whether --enable-gtk-doc was given. +if test "${enable_gtk_doc+set}" = set; then : + enableval=$enable_gtk_doc; +else + enable_gtk_doc=no +fi + + + if test x$enable_gtk_doc = xyes; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + : +else + as_fn_error $? "You need to have gtk-doc >= 1.0 installed to build $PACKAGE_NAME" "$LINENO" 5 +fi + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 +$as_echo_n "checking whether to build gtk-doc documentation... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5 +$as_echo "$enable_gtk_doc" >&6; } + + # Check whether --enable-gtk-doc-html was given. +if test "${enable_gtk_doc_html+set}" = set; then : + enableval=$enable_gtk_doc_html; +else + enable_gtk_doc_html=yes +fi + + # Check whether --enable-gtk-doc-pdf was given. +if test "${enable_gtk_doc_pdf+set}" = set; then : + enableval=$enable_gtk_doc_pdf; +else + enable_gtk_doc_pdf=no +fi + + + if test -z "$GTKDOC_MKPDF"; then + enable_gtk_doc_pdf=no + fi + + + if test x$enable_gtk_doc = xyes; then + ENABLE_GTK_DOC_TRUE= + ENABLE_GTK_DOC_FALSE='#' +else + ENABLE_GTK_DOC_TRUE='#' + ENABLE_GTK_DOC_FALSE= +fi + + if test x$enable_gtk_doc_html = xyes; then + GTK_DOC_BUILD_HTML_TRUE= + GTK_DOC_BUILD_HTML_FALSE='#' +else + GTK_DOC_BUILD_HTML_TRUE='#' + GTK_DOC_BUILD_HTML_FALSE= +fi + + if test x$enable_gtk_doc_pdf = xyes; then + GTK_DOC_BUILD_PDF_TRUE= + GTK_DOC_BUILD_PDF_FALSE='#' +else + GTK_DOC_BUILD_PDF_TRUE='#' + GTK_DOC_BUILD_PDF_FALSE= +fi + + if test -n "$LIBTOOL"; then + GTK_DOC_USE_LIBTOOL_TRUE= + GTK_DOC_USE_LIBTOOL_FALSE='#' +else + GTK_DOC_USE_LIBTOOL_TRUE='#' + GTK_DOC_USE_LIBTOOL_FALSE= +fi + + if test -n "$GTKDOC_REBASE"; then + GTK_DOC_USE_REBASE_TRUE= + GTK_DOC_USE_REBASE_FALSE='#' +else + GTK_DOC_USE_REBASE_TRUE='#' + GTK_DOC_USE_REBASE_FALSE= +fi + + + if $gtk_doc_installed; then + GTK_DOC_INSTALLED_TRUE= + GTK_DOC_INSTALLED_FALSE='#' +else + GTK_DOC_INSTALLED_TRUE='#' + GTK_DOC_INSTALLED_FALSE= +fi + + +# Check for zlib. +_cppflags=$CPPFLAGS +_ldflags=$LDFLAGS + +Z_DIR= Z_LIBS= Z_CPPFLAGS= + + +# Check whether --with-zlib was given. +if test "${with_zlib+set}" = set; then : + withval=$with_zlib; case $withval in + yes|no) ;; + *) Z_DIR=$withval + CPPFLAGS="${CPPFLAGS} -I$withval/include" + LDFLAGS="${LDFLAGS} -L$withval/lib" + ;; + esac +fi + + +if test "x$with_zlib" != xno; then + with_zlib=no + ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" +if test "x$ac_cv_header_zlib_h" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5 +$as_echo_n "checking for gzread in -lz... " >&6; } +if ${ac_cv_lib_z_gzread+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gzread (); +int +main () +{ +return gzread (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_z_gzread=yes +else + ac_cv_lib_z_gzread=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5 +$as_echo "$ac_cv_lib_z_gzread" >&6; } +if test "x$ac_cv_lib_z_gzread" = xyes; then : + with_zlib=yes +fi + +fi + + +fi +if test "$with_zlib" = no; then + as_fn_error $? "*** zlib is required" "$LINENO" 5 +fi +if test "x$Z_DIR" != "x"; then + Z_CPPFLAGS="-I$Z_DIR/include" + case $host in + *-*-solaris*) Z_LIBS="-L$Z_DIR/lib -R$Z_DIR/lib -lz" ;; + *) Z_LIBS="-L$Z_DIR/lib -lz" ;; + esac +else + Z_LIBS="-lz" +fi + + + +CPPFLAGS=${_cppflags} +LDFLAGS=${_ldflags} + + +test_python=true + +# Check whether --with-python was given. +if test "${with_python+set}" = set; then : + withval=$with_python; if test "x$withval" = xno; then + test_python=false + fi + +fi + + +if test "x$test_python" = xtrue ; then + pygobject_msg=test + + + + + # Find any Python interpreter. + if test -z "$PYTHON"; then + for ac_prog in python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PYTHON" && break +done +test -n "$PYTHON" || PYTHON=":" + + fi + am_display_PYTHON=python + + + if test "$PYTHON" = :; then + as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5 + else + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 +$as_echo_n "checking for $am_display_PYTHON version... " >&6; } +if ${am_cv_python_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 +$as_echo "$am_cv_python_version" >&6; } + PYTHON_VERSION=$am_cv_python_version + + + + PYTHON_PREFIX='${prefix}' + + PYTHON_EXEC_PREFIX='${exec_prefix}' + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 +$as_echo_n "checking for $am_display_PYTHON platform... " >&6; } +if ${am_cv_python_platform+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 +$as_echo "$am_cv_python_platform" >&6; } + PYTHON_PLATFORM=$am_cv_python_platform + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 +$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } +if ${am_cv_python_pythondir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$prefix" = xNONE + then + am_py_prefix=$ac_default_prefix + else + am_py_prefix=$prefix + fi + am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || + echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 +$as_echo "$am_cv_python_pythondir" >&6; } + pythondir=$am_cv_python_pythondir + + + + pkgpythondir=\${pythondir}/$PACKAGE + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 +$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } +if ${am_cv_python_pyexecdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$exec_prefix" = xNONE + then + am_py_exec_prefix=$am_py_prefix + else + am_py_exec_prefix=$exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || + echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 +$as_echo "$am_cv_python_pyexecdir" >&6; } + pyexecdir=$am_cv_python_pyexecdir + + + + pkgpyexecdir=\${pyexecdir}/$PACKAGE + + + + fi + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for headers required to compile python extensions" >&5 +$as_echo_n "checking for headers required to compile python extensions... " >&6; } +py_prefix=`$PYTHON -c "import sys; print sys.prefix"` +py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` +PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" +if test "$py_prefix" != "$py_exec_prefix"; then + PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" +fi + +save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } +pygobject_msg="NO. Missing python headers" +fi +rm -f conftest.err conftest.i conftest.$ac_ext +CPPFLAGS="$save_CPPFLAGS" + + + if test "$pygobject_msg" = test; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYGTK" >&5 +$as_echo_n "checking for PYGTK... " >&6; } + +if test -n "$PYGTK_CFLAGS"; then + pkg_cv_PYGTK_CFLAGS="$PYGTK_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pygobject-2.0 >= 2.10.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "pygobject-2.0 >= 2.10.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PYGTK_CFLAGS=`$PKG_CONFIG --cflags "pygobject-2.0 >= 2.10.0" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$PYGTK_LIBS"; then + pkg_cv_PYGTK_LIBS="$PYGTK_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pygobject-2.0 >= 2.10.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "pygobject-2.0 >= 2.10.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PYGTK_LIBS=`$PKG_CONFIG --libs "pygobject-2.0 >= 2.10.0" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + PYGTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "pygobject-2.0 >= 2.10.0" 2>&1` + else + PYGTK_PKG_ERRORS=`$PKG_CONFIG --print-errors "pygobject-2.0 >= 2.10.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$PYGTK_PKG_ERRORS" >&5 + + pygobject_msg="NO. pygtk problem" +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + pygobject_msg="NO. pygtk problem" +else + PYGTK_CFLAGS=$pkg_cv_PYGTK_CFLAGS + PYGTK_LIBS=$pkg_cv_PYGTK_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + fi + if test "$pygobject_msg" = test; then + # Extract the first word of "pygtk-codegen-2.0", so it can be a program name with args. +set dummy pygtk-codegen-2.0; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYGTK_CODEGEN+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYGTK_CODEGEN in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYGTK_CODEGEN="$PYGTK_CODEGEN" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PYGTK_CODEGEN="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PYGTK_CODEGEN" && ac_cv_path_PYGTK_CODEGEN="no" + ;; +esac +fi +PYGTK_CODEGEN=$ac_cv_path_PYGTK_CODEGEN +if test -n "$PYGTK_CODEGEN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYGTK_CODEGEN" >&5 +$as_echo "$PYGTK_CODEGEN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "$PYGTK_CODEGEN" = no; then + pygobject_msg="NO. Missing pygtk-codegen-2.0" + fi + fi + + if test "$pygobject_msg" = test; then + pygobject_msg=yes + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pygobject_msg" >&5 +$as_echo "$pygobject_msg" >&6; } +else + pygobject_msg=no +fi + + if test "$pygobject_msg" = yes; then + WITH_PYTHON_TRUE= + WITH_PYTHON_FALSE='#' +else + WITH_PYTHON_TRUE='#' + WITH_PYTHON_FALSE= +fi + + + +BZ2_LIBS= +test_bz2=true + +# Check whether --with-bz2 was given. +if test "${with_bz2+set}" = set; then : + withval=$with_bz2; if test "x$withval" = xno; then + test_bz2=false + fi + +fi + + +with_bz2=false +if test "x$test_bz2" = xtrue ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking usable libbz2" >&5 +$as_echo_n "checking usable libbz2... " >&6; } + + + old_LIBS="$LIBS" + LIBS="-lbz2 $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #undef PACKAGE + #undef VERSION + #undef HAVE_STDLIB_H + #include + main () + { + return BZ2_bzDecompressInit (NULL, 0, 0); + } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + bz2_ok=yes +else + bz2_ok=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$old_LIBS" + + if test "$bz2_ok" = yes; then + +$as_echo "#define HAVE_BZ2 1" >>confdefs.h + + BZ2_LIBS="-lbz2" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bz2_ok" >&5 +$as_echo "$bz2_ok" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** BZ2 support disabled (BZ2 header or library not found) ***" >&5 +$as_echo "$as_me: WARNING: *** BZ2 support disabled (BZ2 header or library not found) ***" >&2;} + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: BZ2 support disabled, as requested (Use --with-bz2 to enable)" >&5 +$as_echo "$as_me: WARNING: BZ2 support disabled, as requested (Use --with-bz2 to enable)" >&2;} +fi + + + + +want_gio=auto + +# Check whether --with-gio was given. +if test "${with_gio+set}" = set; then : + withval=$with_gio; case $withval in + yes) want_gio=yes;; + no) want_gio=no;; + esac +fi + + +have_gio=no +if test $want_gio = no ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GIO support disabled, as requested (Use --with-gio to enable)" >&5 +$as_echo "$as_me: WARNING: GIO support disabled, as requested (Use --with-gio to enable)" >&2;} +else + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBGSF_GIO" >&5 +$as_echo_n "checking for LIBGSF_GIO... " >&6; } + +if test -n "$LIBGSF_GIO_CFLAGS"; then + pkg_cv_LIBGSF_GIO_CFLAGS="$LIBGSF_GIO_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gio-2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBGSF_GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBGSF_GIO_LIBS"; then + pkg_cv_LIBGSF_GIO_LIBS="$LIBGSF_GIO_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gio-2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBGSF_GIO_LIBS=`$PKG_CONFIG --libs "gio-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBGSF_GIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gio-2.0" 2>&1` + else + LIBGSF_GIO_PKG_ERRORS=`$PKG_CONFIG --print-errors "gio-2.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBGSF_GIO_PKG_ERRORS" >&5 + + if test $want_gio = yes; then + as_fn_error $? "GIO support requested, but not available." "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GIO support disabled, unable to find required version of GIO" >&5 +$as_echo "$as_me: WARNING: GIO support disabled, unable to find required version of GIO" >&2;} + fi +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + if test $want_gio = yes; then + as_fn_error $? "GIO support requested, but not available." "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GIO support disabled, unable to find required version of GIO" >&5 +$as_echo "$as_me: WARNING: GIO support disabled, unable to find required version of GIO" >&2;} + fi +else + LIBGSF_GIO_CFLAGS=$pkg_cv_LIBGSF_GIO_CFLAGS + LIBGSF_GIO_LIBS=$pkg_cv_LIBGSF_GIO_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_gio=yes +fi +fi + if test $have_gio = yes; then + WITH_GIO_TRUE= + WITH_GIO_FALSE='#' +else + WITH_GIO_TRUE='#' + WITH_GIO_FALSE= +fi + +want_gio=$have_gio + + + +want_gnome=no + +want_gnome_vfs=auto + +# Check whether --with-gnome_vfs was given. +if test "${with_gnome_vfs+set}" = set; then : + withval=$with_gnome_vfs; case $withval in + yes) want_gnome_vfs=yes;; + no) want_gnome_vfs=no;; + esac +fi + +if test $want_gnome_vfs = auto -a "$want_gio" = yes; then + want_gnome_vfs=yes +fi +GNOMEVFS_REQ= +if test $want_gnome_vfs = yes; then + if test "$want_gio" = yes; then + CFLAGS="$CFLAGS -DLIBGSF_GNOMEVFS_VIA_GIO" + else + GNOMEVFS_REQ="gnome-vfs-2.0 >= 2.2.0 gnome-vfs-module-2.0 >= 2.2.0" + libgsf_gnome_reqs="$libgsf_gnome_reqs $GNOMEVFS_REQ" + want_gnome=yes + fi +fi + + +want_bonobo=no + +# Check whether --with-bonobo was given. +if test "${with_bonobo+set}" = set; then : + withval=$with_bonobo; case "${withval}" in + yes) want_bonobo=yes ;; + no) want_bonobo=no ;; + *) as_fn_error $? "bad value ${withval} for --with-bonobo" "$LINENO" 5 ;; + esac +else + want_bonobo=auto +fi + +BONOBO_REQ="libbonobo-2.0 >= 2.0.0" +have_bonobo=no +if test $want_bonobo = no ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Bonobo support disabled, as requested (Use --with-bonobo to enable)" >&5 +$as_echo "$as_me: WARNING: Bonobo support disabled, as requested (Use --with-bonobo to enable)" >&2;} +else + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBGSF_BONOBO" >&5 +$as_echo_n "checking for LIBGSF_BONOBO... " >&6; } + +if test -n "$LIBGSF_BONOBO_CFLAGS"; then + pkg_cv_LIBGSF_BONOBO_CFLAGS="$LIBGSF_BONOBO_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$BONOBO_REQ\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$BONOBO_REQ") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBGSF_BONOBO_CFLAGS=`$PKG_CONFIG --cflags "$BONOBO_REQ" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBGSF_BONOBO_LIBS"; then + pkg_cv_LIBGSF_BONOBO_LIBS="$LIBGSF_BONOBO_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$BONOBO_REQ\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$BONOBO_REQ") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBGSF_BONOBO_LIBS=`$PKG_CONFIG --libs "$BONOBO_REQ" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBGSF_BONOBO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$BONOBO_REQ" 2>&1` + else + LIBGSF_BONOBO_PKG_ERRORS=`$PKG_CONFIG --print-errors "$BONOBO_REQ" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBGSF_BONOBO_PKG_ERRORS" >&5 + + if test $want_bonobo = yes; then + as_fn_error $? "Bonobo support requested, but not available." "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Bonobo support disabled, unable to find required version" >&5 +$as_echo "$as_me: WARNING: Bonobo support disabled, unable to find required version" >&2;} + fi +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + if test $want_bonobo = yes; then + as_fn_error $? "Bonobo support requested, but not available." "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Bonobo support disabled, unable to find required version" >&5 +$as_echo "$as_me: WARNING: Bonobo support disabled, unable to find required version" >&2;} + fi +else + LIBGSF_BONOBO_CFLAGS=$pkg_cv_LIBGSF_BONOBO_CFLAGS + LIBGSF_BONOBO_LIBS=$pkg_cv_LIBGSF_BONOBO_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_bonobo=yes +fi +fi + +if test $have_bonobo = yes; then + libgsf_gnome_reqs="$libgsf_gnome_reqs $BONOBO_REQ" + want_gnome=yes +else + BONOBO_REQ= +fi + + +want_gdk_pixbuf=no + +# Check whether --with-gdk_pixbuf was given. +if test "${with_gdk_pixbuf+set}" = set; then : + withval=$with_gdk_pixbuf; case "${withval}" in + yes) want_gdk_pixbuf=yes ;; + no) want_gdk_pixbuf=no ;; + *) as_fn_error $? "bad value ${withval} for --with-gdk-pixbuf" "$LINENO" 5 ;; + esac +else + want_gdk_pixbuf=auto +fi + +if test $want_gdk_pixbuf = no ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdk-pixbuf support disabled, as requested (Use --with-gdk-pixbuf to enable)" >&5 +$as_echo "$as_me: WARNING: gdk-pixbuf support disabled, as requested (Use --with-gdk-pixbuf to enable)" >&2;} +else + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK_PIXBUF" >&5 +$as_echo_n "checking for GDK_PIXBUF... " >&6; } + +if test -n "$GDK_PIXBUF_CFLAGS"; then + pkg_cv_GDK_PIXBUF_CFLAGS="$GDK_PIXBUF_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-pixbuf-2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gdk-pixbuf-2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GDK_PIXBUF_CFLAGS=`$PKG_CONFIG --cflags "gdk-pixbuf-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$GDK_PIXBUF_LIBS"; then + pkg_cv_GDK_PIXBUF_LIBS="$GDK_PIXBUF_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gdk-pixbuf-2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gdk-pixbuf-2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GDK_PIXBUF_LIBS=`$PKG_CONFIG --libs "gdk-pixbuf-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GDK_PIXBUF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gdk-pixbuf-2.0" 2>&1` + else + GDK_PIXBUF_PKG_ERRORS=`$PKG_CONFIG --print-errors "gdk-pixbuf-2.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$GDK_PIXBUF_PKG_ERRORS" >&5 + + if test $want_gdk_pixbuf = yes; then + as_fn_error $? "gdk-pixbuf support requested, but not available." "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdk-pixbuf support disabled, unable to find required version" >&5 +$as_echo "$as_me: WARNING: gdk-pixbuf support disabled, unable to find required version" >&2;} + fi +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + if test $want_gdk_pixbuf = yes; then + as_fn_error $? "gdk-pixbuf support requested, but not available." "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdk-pixbuf support disabled, unable to find required version" >&5 +$as_echo "$as_me: WARNING: gdk-pixbuf support disabled, unable to find required version" >&2;} + fi +else + GDK_PIXBUF_CFLAGS=$pkg_cv_GDK_PIXBUF_CFLAGS + GDK_PIXBUF_LIBS=$pkg_cv_GDK_PIXBUF_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_GDK_PIXBUF 1" >>confdefs.h + +fi +fi + +have_gnome=no +if test $want_gnome = no ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNOME support disabled, as requested (Use --with-gnome-vfs and/or --with-bonobo to enable)" >&5 +$as_echo "$as_me: WARNING: GNOME support disabled, as requested (Use --with-gnome-vfs and/or --with-bonobo to enable)" >&2;} +else + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBGSF_GNOME" >&5 +$as_echo_n "checking for LIBGSF_GNOME... " >&6; } + +if test -n "$LIBGSF_GNOME_CFLAGS"; then + pkg_cv_LIBGSF_GNOME_CFLAGS="$LIBGSF_GNOME_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$libgsf_gnome_reqs\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$libgsf_gnome_reqs") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBGSF_GNOME_CFLAGS=`$PKG_CONFIG --cflags "$libgsf_gnome_reqs" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBGSF_GNOME_LIBS"; then + pkg_cv_LIBGSF_GNOME_LIBS="$LIBGSF_GNOME_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$libgsf_gnome_reqs\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$libgsf_gnome_reqs") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBGSF_GNOME_LIBS=`$PKG_CONFIG --libs "$libgsf_gnome_reqs" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBGSF_GNOME_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$libgsf_gnome_reqs" 2>&1` + else + LIBGSF_GNOME_PKG_ERRORS=`$PKG_CONFIG --print-errors "$libgsf_gnome_reqs" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBGSF_GNOME_PKG_ERRORS" >&5 + + as_fn_error $? "GNOME support requested, but not available." "$LINENO" 5 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "GNOME support requested, but not available." "$LINENO" 5 +else + LIBGSF_GNOME_CFLAGS=$pkg_cv_LIBGSF_GNOME_CFLAGS + LIBGSF_GNOME_LIBS=$pkg_cv_LIBGSF_GNOME_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_gnome=yes +fi +fi + if test $have_gnome = yes; then + WITH_LIBGSF_GNOME_TRUE= + WITH_LIBGSF_GNOME_FALSE='#' +else + WITH_LIBGSF_GNOME_TRUE='#' + WITH_LIBGSF_GNOME_FALSE= +fi + + if test $want_gnome_vfs = yes; then + WITH_LIBGSF_GNOMEVFS_TRUE= + WITH_LIBGSF_GNOMEVFS_FALSE='#' +else + WITH_LIBGSF_GNOMEVFS_TRUE='#' + WITH_LIBGSF_GNOMEVFS_FALSE= +fi + + if test $have_bonobo = yes; then + WITH_LIBGSF_BONOBO_TRUE= + WITH_LIBGSF_BONOBO_FALSE='#' +else + WITH_LIBGSF_BONOBO_TRUE='#' + WITH_LIBGSF_BONOBO_FALSE= +fi + + +# =================== +# GConf configuration + +# Check whether --with-gconf was given. +if test "${with_gconf+set}" = set; then : + withval=$with_gconf; +else + with_gconf=auto +fi + + +if test "$with_gconf" != "no"; then : + + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gconf-2.0 >= 2.24.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gconf-2.0 >= 2.24.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + + # Extract the first word of "gconftool-2", so it can be a program name with args. +set dummy gconftool-2; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GCONFTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GCONFTOOL"; then + ac_cv_prog_GCONFTOOL="$GCONFTOOL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_GCONFTOOL="gconftool-2" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_GCONFTOOL" && ac_cv_prog_GCONFTOOL="no" +fi +fi +GCONFTOOL=$ac_cv_prog_GCONFTOOL +if test -n "$GCONFTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONFTOOL" >&5 +$as_echo "$GCONFTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "$GCONFTOOL" = "no"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thumbnailer will not be built, unable to find gconftool-2" >&5 +$as_echo "$as_me: WARNING: thumbnailer will not be built, unable to find gconftool-2" >&2;} + have_gconf=no + +else + + have_gconf=yes + +fi + +else + have_gconf=no +fi + +else + have_gconf=no +fi + +if test "$have_gconf" = "yes"; then : + +else + + if test "$with_gconf" = "yes"; then : + as_fn_error $? "gconf support requested, but not available." "$LINENO" 5 +fi + +fi + + + if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then + GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source` + else + GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE + fi + + +# Check whether --with-gconf-source was given. +if test "${with_gconf_source+set}" = set; then : + withval=$with_gconf_source; GCONF_SCHEMA_CONFIG_SOURCE="$withval" +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation" >&5 +$as_echo "Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation" >&6; } + + if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then + GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas' + fi + + +# Check whether --with-gconf-schema-file-dir was given. +if test "${with_gconf_schema_file_dir+set}" = set; then : + withval=$with_gconf_schema_file_dir; GCONF_SCHEMA_FILE_DIR="$withval" +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files" >&5 +$as_echo "Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files" >&6; } + + # Check whether --enable-schemas-install was given. +if test "${enable_schemas_install+set}" = set; then : + enableval=$enable_schemas_install; case ${enableval} in + yes|no) ;; + *) as_fn_error $? "bad value ${enableval} for --enable-schemas-install" "$LINENO" 5 ;; + esac +fi + + if test "$enable_schemas_install" != no; then + GCONF_SCHEMAS_INSTALL_TRUE= + GCONF_SCHEMAS_INSTALL_FALSE='#' +else + GCONF_SCHEMAS_INSTALL_TRUE='#' + GCONF_SCHEMAS_INSTALL_FALSE= +fi + + + if test "$have_gconf" = "yes"; then + WITH_GCONF_TRUE= + WITH_GCONF_FALSE='#' +else + WITH_GCONF_TRUE='#' + WITH_GCONF_FALSE= +fi + + +# =================== + +LDFLAGS="-no-undefined $LDFLAGS" + +ac_config_files="$ac_config_files Makefile m4/Makefile doc/Makefile gsf/Makefile gsf-gnome/Makefile gsf-win32/Makefile tests/Makefile tools/Makefile python/Makefile thumbnailer/Makefile po/Makefile.in gsf/version.c doc/version.xml libgsf-1.pc libgsf-1.spec libgsf-gnome-1.pc libgsf-gnome-1.spec libgsf-win32-1.pc libgsf-zip" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + + ac_config_commands="$ac_config_commands po/stamp-it" + + +if test -z "${WITH_WIN32_TRUE}" && test -z "${WITH_WIN32_FALSE}"; then + as_fn_error $? "conditional \"WITH_WIN32\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_LIBEXE_TRUE}" && test -z "${HAVE_LIBEXE_FALSE}"; then + as_fn_error $? "conditional \"HAVE_LIBEXE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then + as_fn_error $? "conditional \"CROSS_COMPILING\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_GTK_DOC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GTK_DOC_BUILD_HTML_TRUE}" && test -z "${GTK_DOC_BUILD_HTML_FALSE}"; then + as_fn_error $? "conditional \"GTK_DOC_BUILD_HTML\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GTK_DOC_BUILD_PDF_TRUE}" && test -z "${GTK_DOC_BUILD_PDF_FALSE}"; then + as_fn_error $? "conditional \"GTK_DOC_BUILD_PDF\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GTK_DOC_USE_LIBTOOL_TRUE}" && test -z "${GTK_DOC_USE_LIBTOOL_FALSE}"; then + as_fn_error $? "conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GTK_DOC_USE_REBASE_TRUE}" && test -z "${GTK_DOC_USE_REBASE_FALSE}"; then + as_fn_error $? "conditional \"GTK_DOC_USE_REBASE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GTK_DOC_INSTALLED_TRUE}" && test -z "${GTK_DOC_INSTALLED_FALSE}"; then + as_fn_error $? "conditional \"GTK_DOC_INSTALLED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_PYTHON_TRUE}" && test -z "${WITH_PYTHON_FALSE}"; then + as_fn_error $? "conditional \"WITH_PYTHON\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_GIO_TRUE}" && test -z "${WITH_GIO_FALSE}"; then + as_fn_error $? "conditional \"WITH_GIO\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_LIBGSF_GNOME_TRUE}" && test -z "${WITH_LIBGSF_GNOME_FALSE}"; then + as_fn_error $? "conditional \"WITH_LIBGSF_GNOME\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_LIBGSF_GNOMEVFS_TRUE}" && test -z "${WITH_LIBGSF_GNOMEVFS_FALSE}"; then + as_fn_error $? "conditional \"WITH_LIBGSF_GNOMEVFS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_LIBGSF_BONOBO_TRUE}" && test -z "${WITH_LIBGSF_BONOBO_FALSE}"; then + as_fn_error $? "conditional \"WITH_LIBGSF_BONOBO\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GCONF_SCHEMAS_INSTALL_TRUE}" && test -z "${GCONF_SCHEMAS_INSTALL_FALSE}"; then + as_fn_error $? "conditional \"GCONF_SCHEMAS_INSTALL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_GCONF_TRUE}" && test -z "${WITH_GCONF_FALSE}"; then + as_fn_error $? "conditional \"WITH_GCONF\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by libgsf $as_me 1.14.21, which was +generated by GNU Autoconf 2.68. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +libgsf config.status 1.14.21 +configured by $0, generated by GNU Autoconf 2.68, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2010 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' +macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' +macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' +enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' +pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' +host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' +host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' +host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' +build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' +build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' +build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' +SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' +Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' +GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' +EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' +FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' +LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' +NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' +LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' +ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' +exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' +lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' +reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' +AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' +STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' +RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' +compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' +GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' +SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' +ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' +need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' +LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' +libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' +fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' +version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' +runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' +libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' +soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' +old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' +striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +deplibs_check_method \ +file_magic_cmd \ +AR \ +AR_FLAGS \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +SHELL \ +ECHO \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_wl \ +lt_prog_compiler_pic \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_flag_spec_ld \ +hardcode_libdir_separator \ +fix_srcfile_path \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +finish_eval \ +old_striplib \ +striplib; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` + ;; +esac + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' + + + + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "gsf-config.h") CONFIG_HEADERS="$CONFIG_HEADERS gsf-config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "gsf/Makefile") CONFIG_FILES="$CONFIG_FILES gsf/Makefile" ;; + "gsf-gnome/Makefile") CONFIG_FILES="$CONFIG_FILES gsf-gnome/Makefile" ;; + "gsf-win32/Makefile") CONFIG_FILES="$CONFIG_FILES gsf-win32/Makefile" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; + "python/Makefile") CONFIG_FILES="$CONFIG_FILES python/Makefile" ;; + "thumbnailer/Makefile") CONFIG_FILES="$CONFIG_FILES thumbnailer/Makefile" ;; + "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; + "gsf/version.c") CONFIG_FILES="$CONFIG_FILES gsf/version.c" ;; + "doc/version.xml") CONFIG_FILES="$CONFIG_FILES doc/version.xml" ;; + "libgsf-1.pc") CONFIG_FILES="$CONFIG_FILES libgsf-1.pc" ;; + "libgsf-1.spec") CONFIG_FILES="$CONFIG_FILES libgsf-1.spec" ;; + "libgsf-gnome-1.pc") CONFIG_FILES="$CONFIG_FILES libgsf-gnome-1.pc" ;; + "libgsf-gnome-1.spec") CONFIG_FILES="$CONFIG_FILES libgsf-gnome-1.spec" ;; + "libgsf-win32-1.pc") CONFIG_FILES="$CONFIG_FILES libgsf-win32-1.pc" ;; + "libgsf-zip") CONFIG_FILES="$CONFIG_FILES libgsf-zip" ;; + "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # 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_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="" + +# ### BEGIN LIBTOOL CONFIG + +# Assembler program. +AS=$AS + +# DLL creation program. +DLLTOOL=$DLLTOOL + +# Object dumper program. +OBJDUMP=$OBJDUMP + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# 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 + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that does not interpret backslashes. +ECHO=$lt_ECHO + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# 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 DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_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 + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $* )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} + +# sed scripts: +my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[^=]*=//' + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$@"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1+=\$2" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1=\$$1\$2" +} + +_LT_EOF + ;; + esac + + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + ;; + "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*) + sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile + esac ;; + "po/stamp-it":C) + if ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then + as_fn_error $? "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5 + fi + rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp" + >"po/stamp-it.tmp" + sed '/^#/d + s/^[[].*] *// + /^[ ]*$/d + '"s|^| $ac_top_srcdir/|" \ + "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES" + + sed '/^POTFILES =/,/[^\\]$/ { + /^POTFILES =/!d + r po/POTFILES + } + ' "po/Makefile.in" >"po/Makefile" + rm -f "po/Makefile.tmp" + mv "po/stamp-it.tmp" "po/stamp-it" + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Configured $PACKAGE $VERSION" >&5 +$as_echo "Configured $PACKAGE $VERSION" >&6; } diff --git a/configure.in b/configure.in new file mode 100644 index 0000000..db64cca --- /dev/null +++ b/configure.in @@ -0,0 +1,556 @@ +-*- mode: m4 -*- +dnl We require Automake 1.7.1, which requires Autoconf 2.54. +AC_PREREQ(2.54) + +m4_define([libgsf_version_major], [1]) +m4_define([libgsf_version_minor], [14]) +m4_define([libgsf_version_micro], [21]) +m4_define([libgsf_version_extra], []) +m4_define([libgsf_full_version], + [libgsf_version_major.libgsf_version_minor.libgsf_version_micro[]libgsf_version_extra]) + +AC_INIT(libgsf, [libgsf_full_version], + [http://bugzilla.gnome.org/enter_bug.cgi?product=libgsf]) +AC_CONFIG_SRCDIR(gsf/gsf.h) +AC_CONFIG_MACRO_DIR([m4]) +AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS -I m4") + +AC_SUBST(LIBGSF_MAJOR_VERSION, libgsf_version_major) +AC_SUBST(LIBGSF_MINOR_VERSION, libgsf_version_minor) +AC_SUBST(LIBGSF_MICRO_VERSION, libgsf_version_micro) + +dnl Version info for libraries = CURRENT:REVISION:AGE +dnl +dnl Within each x.y.*, ABI is maintained backward compatible. +dnl We strive for forward compatibility too, except that we sometimes +dnl add new functions. +dnl +m4_define([version_iface], + m4_eval(100 * libgsf_version_major + libgsf_version_minor)) + +AC_SUBST([VERSION_INFO], [version_iface:libgsf_version_micro:0]) +AC_SUBST([CURRENT_MINUS_AGE], m4_eval(version_iface - 0)) + +AM_INIT_AUTOMAKE(dist-bzip2) + +AC_CONFIG_HEADERS(gsf-config.h) +AM_MAINTAINER_MODE + +m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) + +dnl Propagate Gnome-specific variable ACLOCAL_FLAGS to Makefile. +AC_SUBST(ACLOCAL_AMFLAGS, $ACLOCAL_FLAGS) + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_MAKE_SET +AC_LIBTOOL_WIN32_DLL +AM_PROG_LIBTOOL + +AC_FUNC_FSEEKO +AC_SYS_LARGEFILE +AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + +dnl Gettext/i18n stuff + +IT_PROG_INTLTOOL([0.35.0]) + +AM_GLIB_GNU_GETTEXT + +GETTEXT_PACKAGE=AC_PACKAGE_NAME +AC_SUBST(GETTEXT_PACKAGE) +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.]) + +dnl Checks for libraries. +ifelse([ + If we defined the module lists on the M4 level, we could have problems + with PKG_CHECK_MODULES from pkgconfig 0.16.0, which double quotes its + second argument (the module list). + As a handy workaround, we use shell variables. +]) +dnl Modules common to libgsf and libgsf-gnome +common_reqs=" + gobject-2.0 >= 2.6.0 + glib-2.0 >= 2.8.0 +" +dnl Modules required for libgsf +libgsf_reqs=" + $common_reqs + libxml-2.0 >= 2.4.16 +" +dnl Modules required for libgsf-gnome +libgsf_gnome_reqs=" + $common_reqs +" +PKG_CHECK_MODULES(LIBGSF, $libgsf_reqs) + +## this should come after `AC_PROG_CC' +ifdef([GNOME_COMPILE_WARNINGS],[GNOME_COMPILE_WARNINGS],) +CFLAGS="$CFLAGS $WARN_CFLAGS -DG_DISABLE_DEPRECATED" +if test "$GCC" = "yes"; then + for option in -Wno-system-headers -Wfloat-equal -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -Wnested-externs -Winline -Wdeclaration-after-statement -Wundef -W -Wmissing-noreturn -Wmissing-format-attribute -Wno-pointer-sign \ + -Wbitwise -Wcast-to-as -Wdefault-bitfield-sign -Wdo-while -Wparen-string -Wptr-subtraction-blows -Wreturn-void -Wtypesign ; do + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $option" + AC_MSG_CHECKING([whether gcc understands $option]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], + has_option=yes, + has_option=no) + if test $has_option = no; then + CFLAGS="$SAVE_CFLAGS" + fi + AC_MSG_RESULT($has_option) + unset has_option + unset SAVE_CFLAGS + done + unset option +fi + +AC_CHECK_DECL(fdopen, fdopen_works=yes, fdopen_works=no) +if test $fdopen_works = no ; then + unset ac_cv_have_decl_fdopen + CFLAGS="$CFLAGS -D_POSIX_SOURCE" + AC_MSG_NOTICE([adding -D_POSIX_SOURCE to CFLAGS]) + AC_CHECK_DECL(fdopen, fdopen_works=yes, fdopen_works=no) + if test $fdopen_works = no ; then + AC_MSG_ERROR([fdopen is not available]) + fi +fi + +# Unfortunately, -D_POSIX_SOURCE turns off struct timeval on Solaris +AC_MSG_CHECKING([whether struct timeval is available]) +for try in 1 2; do + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[struct timeval tv;]])], + struct_timeval_works=yes, + struct_timeval_works=no) + test $struct_timeval_works = yes && break + # Try this for the second attempt: + test $try = 1 && CFLAGS="$CFLAGS -D__EXTENSIONS__" +done +AC_MSG_RESULT($struct_timeval_works) +if test $struct_timeval_works = no ; then + AC_MSG_ERROR([struct timeval is not available]) +fi + +AC_MSG_CHECKING([whether -D_BSD_SOURCE is needed for caddr_t]) +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include ]], [[caddr_t ca]])], + need_bsd1=no, + need_bsd1=yes) +AC_MSG_RESULT($need_bsd1) + +AC_MSG_CHECKING([whether -D_BSD_SOURCE is needed for lstat]) +AC_LINK_IFELSE([AC_LANG_PROGRAM( +[[#include +#include +#include ]], +[[void *ptr = &lstat]])], +need_bsd2=no, need_bsd2=yes) +AC_MSG_RESULT($need_bsd2) +if test $need_bsd1 = yes -o $need_bsd2 = yes; then + CFLAGS="$CFLAGS -D_BSD_SOURCE" +fi + +AC_TYPE_MODE_T +AC_CHECK_HEADERS(fcntl.h malloc.h unistd.h io.h sys/statfs.h sys/param.h sys/mount.h) +AC_FUNC_MMAP + +AC_MSG_CHECKING([form of statfs]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[#ifdef HAVE_SYS_STATFS_H +#include +#endif +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_MOUNT_H +#include +#endif]], +[[struct statfs buf; (void)(2*statfs("xyz",&buf));]])], + [AC_MSG_RESULT([2-arg, linux-style]) +AC_DEFINE(HAVE_2ARG_STATFS, 1, [Define is you have two-argument statfs like linux])], + [AC_MSG_RESULT([none, or unknown])]) + +AC_CHECK_FUNCS(chown setrlimit) + +AC_CHECK_FUNCS(gmtime_r, [], + [AC_CHECK_FUNCS(gmtime, + [AC_MSG_WARN(*** Please note that gmtime_r() is missing and I will use gmtime() which is not thread safe ***)], + [AC_MSG_ERROR([Neither gmtime_r or gmtime is available])])]) + +AC_CHECK_MEMBERS(struct tm.tm_gmtoff,,, +[#include ]) + +SAVE_CFLAGS=$CFLAGS +SAVE_LIBS=$LIBS +CFLAGS="$CFLAGS $LIBGSF_CFLAGS" +LIBS="$LIBGSF_LIBS $LIBS" +AC_CHECK_FUNCS(g_base64_encode) +AC_MSG_CHECKING([for g_chmod]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[(void)g_chmod("/xxx",0777);]])], + [AC_DEFINE(HAVE_G_CHMOD, 1, [Define if g_chmod is available as macro or function]) + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)]) +AC_MSG_CHECKING([for g_access]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[(void)g_access("/xxx",0777);]])], + [AC_DEFINE(HAVE_G_ACCESS, 1, [Define if g_access is available as macro or function]) + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)]) +CFLAGS=$SAVE_CFLAGS +LIBS=$SAVE_LIBS + +AC_MSG_CHECKING([whether macro S_ISREG is available]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[#include +#include ]], +[[S_ISREG(S_IFMT);]])], + [macro_s_isreg=yes], + [AH_TEMPLATE([S_ISREG], [Define S_ISREG if stat.h doesn't]) + AC_DEFINE([S_ISREG(m)], [(((m) & S_IFMT) == S_IFREG)]) + macro_s_isreg=no]) +AC_MSG_RESULT($macro_s_isreg) + +AC_MSG_CHECKING([for Win32 platform]) +with_win32=no +case $host_os in + mingw* | pw32* | cygwin*) + with_win32=yes + AC_ARG_VAR(WINDRES, [The windres executable (used by win32 builds only).]) + AC_CHECK_TOOL(WINDRES, windres) + AC_ARG_VAR(LIBEXE, [The lib.exe executable (used by win32 builds only).]) + AC_CHECK_PROG(LIBEXE, lib.exe, yes, no) + ;; +esac +AC_MSG_RESULT($with_win32) +AM_CONDITIONAL(WITH_WIN32, test $with_win32 = yes) +AM_CONDITIONAL(HAVE_LIBEXE, test x$LIBEXE = xyes) +AM_CONDITIONAL(CROSS_COMPILING, test x"$cross_compiling" != "xno") + +################################################## +# Checks for gtk-doc and docbook-tools +################################################## +gtk_doc_installed=true +#ifdef([GTK_DOC_CHECK],[GTK_DOC_CHECK([1.0])],[gtk_doc_installed=false]) +# I would have liked to conditionalize this, but +# that appears to break other things http://bugzilla.gnome.org/show_bug.cgi?id=156399 +GTK_DOC_CHECK([1.0]) +AM_CONDITIONAL(GTK_DOC_INSTALLED, $gtk_doc_installed) + +dnl *********************************************************************************** +# Check for zlib. +_cppflags=$CPPFLAGS +_ldflags=$LDFLAGS + +Z_DIR= Z_LIBS= Z_CPPFLAGS= + +AC_ARG_WITH(zlib, + [[ --with-zlib=DIR use libz in DIR]], + [case $withval in + yes|no) ;; + *) Z_DIR=$withval + CPPFLAGS="${CPPFLAGS} -I$withval/include" + LDFLAGS="${LDFLAGS} -L$withval/lib" + ;; + esac]) + +if test "x$with_zlib" != xno; then + with_zlib=no + AC_CHECK_HEADER(zlib.h, [AC_CHECK_LIB(z, gzread, [with_zlib=yes])]) +fi +if test "$with_zlib" = no; then + AC_MSG_ERROR([*** zlib is required]) +fi +if test "x$Z_DIR" != "x"; then + Z_CPPFLAGS="-I$Z_DIR/include" + case $host in + *-*-solaris*) Z_LIBS="-L$Z_DIR/lib -R$Z_DIR/lib -lz" ;; + *) Z_LIBS="-L$Z_DIR/lib -lz" ;; + esac +else + Z_LIBS="-lz" +fi +AC_SUBST(Z_CPPFLAGS) +AC_SUBST(Z_LIBS) + +CPPFLAGS=${_cppflags} +LDFLAGS=${_ldflags} + +dnl *********************************************************************************** + +test_python=true +AC_ARG_WITH(python, + [--{with,without}-python Build with the python support], + if test "x$withval" = xno; then + test_python=false + fi +) + +if test "x$test_python" = xtrue ; then + pygobject_msg=test + AM_PATH_PYTHON + + AM_CHECK_PYTHON_HEADERS(,[pygobject_msg="NO. Missing python headers"]) + + dnl check for pygtk + if test "$pygobject_msg" = test; then + PKG_CHECK_MODULES(PYGTK, pygobject-2.0 >= 2.10.0, + [], + [pygobject_msg="NO. pygtk problem"]) + AC_SUBST(PYGTK_CFLAGS) + fi + if test "$pygobject_msg" = test; then + AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no) + if test "$PYGTK_CODEGEN" = no; then + pygobject_msg="NO. Missing pygtk-codegen-2.0" + fi + fi + + if test "$pygobject_msg" = test; then + pygobject_msg=yes + fi + AC_MSG_RESULT($pygobject_msg) +else + pygobject_msg=no +fi + +AM_CONDITIONAL(WITH_PYTHON, [test "$pygobject_msg" = yes]) + +dnl *********************************************************************************** + +dnl bz2 +dnl +BZ2_LIBS= +test_bz2=true +AC_ARG_WITH(bz2, + [--{with,without}-bz2 Build additional wrappers for BZ2], + if test "x$withval" = xno; then + test_bz2=false + fi +) + +with_bz2=false +if test "x$test_bz2" = xtrue ; then + AC_MSG_CHECKING([usable libbz2]) + + dnl AC_CHECK_LIB doesn't work with the Windows port of libbz2 because + dnl it uses the __stdcall calling convention where the callee cleans + dnl up the stack. You have to include in order to get the + dnl right calling convention, and the link fails if not. Since we + dnl require both -lbz2 and , just test if a program which + dnl uses both can be compiled. + + old_LIBS="$LIBS" + LIBS="-lbz2 $LIBS" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [[#include + #undef PACKAGE + #undef VERSION + #undef HAVE_STDLIB_H + #include + main () + { + return BZ2_bzDecompressInit (NULL, 0, 0); + } + ]])], + bz2_ok=yes, + bz2_ok=no) + LIBS="$old_LIBS" + + if test "$bz2_ok" = yes; then + AC_DEFINE(HAVE_BZ2, 1, [Is bzip2 available and enabled]) + BZ2_LIBS="-lbz2" + AC_MSG_RESULT($bz2_ok) + else + AC_MSG_WARN(*** BZ2 support disabled (BZ2 header or library not found) ***) + fi +else + AC_MSG_WARN([BZ2 support disabled, as requested (Use --with-bz2 to enable)]) +fi + +AC_SUBST(BZ2_LIBS) + +dnl **************************************************************************** + +dnl gio +dnl +want_gio=auto +AC_ARG_WITH(gio, + [--{with,without}-gio Build additional wrappers for GIO], + [case $withval in + yes) want_gio=yes;; + no) want_gio=no;; + esac[]dnl +]) + +have_gio=no +if test $want_gio = no ; then + AC_MSG_WARN([GIO support disabled, as requested (Use --with-gio to enable)]) +else + PKG_CHECK_MODULES(LIBGSF_GIO, gio-2.0, + [have_gio=yes], + [if test $want_gio = yes; then + AC_MSG_ERROR([GIO support requested, but not available.]) + else + AC_MSG_WARN([GIO support disabled, unable to find required version of GIO]) + fi]) +fi +AM_CONDITIONAL(WITH_GIO, test $have_gio = yes) +want_gio=$have_gio + +dnl **************************************************************************** + +dnl gnome +dnl + +want_gnome=no + +want_gnome_vfs=auto +AC_ARG_WITH(gnome_vfs, + [--{with,without}-gnome-vfs Build wrappers for GNOME-VFS], + [case $withval in + yes) want_gnome_vfs=yes;; + no) want_gnome_vfs=no;; + esac[]dnl +]) +if test $want_gnome_vfs = auto -a "$want_gio" = yes; then + want_gnome_vfs=yes +fi +GNOMEVFS_REQ= +if test $want_gnome_vfs = yes; then + if test "$want_gio" = yes; then + CFLAGS="$CFLAGS -DLIBGSF_GNOMEVFS_VIA_GIO" + else + GNOMEVFS_REQ="gnome-vfs-2.0 >= 2.2.0 gnome-vfs-module-2.0 >= 2.2.0" + libgsf_gnome_reqs="$libgsf_gnome_reqs $GNOMEVFS_REQ" + want_gnome=yes + fi +fi +AC_SUBST(GNOMEVFS_REQ) + +want_bonobo=no +dnl check for bonobo +AC_ARG_WITH(bonobo, + AC_HELP_STRING([--without-bonobo],[disable the use of bonobo]), + [case "${withval}" in + yes) want_bonobo=yes ;; + no) want_bonobo=no ;; + *) AC_MSG_ERROR(bad value ${withval} for --with-bonobo) ;; + esac], + [want_bonobo=auto]) dnl Default value + +BONOBO_REQ="libbonobo-2.0 >= 2.0.0" +have_bonobo=no +if test $want_bonobo = no ; then + AC_MSG_WARN([Bonobo support disabled, as requested (Use --with-bonobo to enable)]) +else + PKG_CHECK_MODULES(LIBGSF_BONOBO, $BONOBO_REQ, + [have_bonobo=yes], + [if test $want_bonobo = yes; then + AC_MSG_ERROR([Bonobo support requested, but not available.]) + else + AC_MSG_WARN([Bonobo support disabled, unable to find required version]) + fi]) +fi + +if test $have_bonobo = yes; then + libgsf_gnome_reqs="$libgsf_gnome_reqs $BONOBO_REQ" + want_gnome=yes +else + BONOBO_REQ= +fi +AC_SUBST(BONOBO_REQ) + +want_gdk_pixbuf=no +dnl check for gdk_pixbuf +AC_ARG_WITH(gdk_pixbuf, + AC_HELP_STRING([--without-gdk-pixbuf],[disable the use of gdk-pixbuf]), + [case "${withval}" in + yes) want_gdk_pixbuf=yes ;; + no) want_gdk_pixbuf=no ;; + *) AC_MSG_ERROR(bad value ${withval} for --with-gdk-pixbuf) ;; + esac], + [want_gdk_pixbuf=auto]) dnl Default value + +if test $want_gdk_pixbuf = no ; then + AC_MSG_WARN([gdk-pixbuf support disabled, as requested (Use --with-gdk-pixbuf to enable)]) +else + PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0, + [AC_DEFINE(HAVE_GDK_PIXBUF, 1, [Define if gdk-pixbuf is available])], + [if test $want_gdk_pixbuf = yes; then + AC_MSG_ERROR([gdk-pixbuf support requested, but not available.]) + else + AC_MSG_WARN([gdk-pixbuf support disabled, unable to find required version]) + fi]) +fi + +have_gnome=no +if test $want_gnome = no ; then + AC_MSG_WARN([GNOME support disabled, as requested (Use --with-gnome-vfs and/or --with-bonobo to enable)]) +else + PKG_CHECK_MODULES(LIBGSF_GNOME, $libgsf_gnome_reqs, + [have_gnome=yes], + [AC_MSG_ERROR([GNOME support requested, but not available.])]) +fi +AM_CONDITIONAL(WITH_LIBGSF_GNOME, test $have_gnome = yes) +AM_CONDITIONAL(WITH_LIBGSF_GNOMEVFS, test $want_gnome_vfs = yes) +AM_CONDITIONAL(WITH_LIBGSF_BONOBO, test $have_bonobo = yes) + +# =================== +# GConf configuration +AC_ARG_WITH([gconf], + AC_HELP_STRING([--without-gconf],[disable the use of gconf (default: auto)]), + [], + [with_gconf=auto]) + +AS_IF([test "$with_gconf" != "no"], [ + PKG_CHECK_EXISTS([gconf-2.0 >= 2.24.0],[ + AC_CHECK_PROG([GCONFTOOL], [gconftool-2], [gconftool-2], [no]) + AS_IF([test "$GCONFTOOL" = "no"], [ + AC_MSG_WARN([thumbnailer will not be built, unable to find gconftool-2]) + have_gconf=no + ], [ + have_gconf=yes + ]) + ],[have_gconf=no]) + ], [have_gconf=no]) + +AS_IF([test "$have_gconf" = "yes"], [], [ + AS_IF([test "$with_gconf" = "yes"], + [AC_MSG_ERROR([gconf support requested, but not available.])]) + ]) + +AM_GCONF_SOURCE_2 +AM_CONDITIONAL(WITH_GCONF, test "$have_gconf" = "yes") + +# =================== + +LDFLAGS="-no-undefined $LDFLAGS" + +AC_CONFIG_FILES([ +Makefile +m4/Makefile +doc/Makefile +gsf/Makefile +gsf-gnome/Makefile +gsf-win32/Makefile +tests/Makefile +tools/Makefile +python/Makefile +thumbnailer/Makefile +po/Makefile.in +gsf/version.c +doc/version.xml +libgsf-1.pc +libgsf-1.spec +libgsf-gnome-1.pc +libgsf-gnome-1.spec +libgsf-win32-1.pc +libgsf-zip +]) +AC_OUTPUT + +AC_MSG_RESULT([Configured $PACKAGE $VERSION]) diff --git a/depcomp b/depcomp new file mode 100755 index 0000000..df8eea7 --- /dev/null +++ b/depcomp @@ -0,0 +1,630 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2009-04-28.21; # UTC + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free +# Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u="sed s,\\\\\\\\,/,g" + depmode=msvisualcpp +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> "$depfile" + echo >> "$depfile" + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..9a7ddd1 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,65 @@ +## Process this file with automake to produce Makefile.in + +# The name of the module. +DOC_MODULE=gsf + +# The top-level SGML file. +DOC_MAIN_SGML_FILE=gsf-docs.sgml + +# The directory containing the source code. Relative to $(srcdir) +DOC_SOURCE_DIR=../gsf + +# Extra options to pass to gtkdoc-scangobj +SCANGOBJ_OPTIONS= --nogtkinit --type-init-func="gsf_init ()" + +# Extra options to supply to gtkdoc-scan +SCAN_OPTIONS= + +# Extra options to supply to gtkdoc-mkdb +MKDB_OPTIONS=--sgml-mode --output-format=xml + +# Extra options to supply to gtkdoc-fixref +FIXXREF_OPTIONS= + +# Used for dependencies +HFILE_GLOB=$(top_srcdir)/gsf/*.h +CFILE_GLOB=$(top_srcdir)/gsf/*.c + +# Header files to ignore when scanning +IGNORE_HFILES= \ + biff-types.h \ + gsf-command-context.h \ + gsf-infile-msvba.h \ + gsf-io-context.h \ + gsf-output-transaction.h \ + gsf-infile-ar.h + +EXTRA_HFILES = ../gsf-gnome/*.h + +# Images to copy into HTML directory +HTML_IMAGES = + +# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE) +content_files = + +# Other files to distribute +extra_files = + +# CFLAGS and LDFLAGS for compiling scan program. Only needed +# if $(DOC_MODULE).types is non-empty. +GTKDOC_CFLAGS = -I$(top_srcdir) $(LIBGSF_CFLAGS) +GTKDOC_LIBS = $(top_builddir)/gsf/libgsf-1.la $(LIBGSF_LIBS) + +manpagedir = $(mandir)/man1 +manpage_DATA = gsf-office-thumbnailer.1 gsf-vba-dump.1 gsf.1 + +if GTK_DOC_INSTALLED +include $(top_srcdir)/gtk-doc.make +CLEANFILES += gsf-scan.* +.PHONY : dist-hook-local +EXTRA_DIST += $(manpage_DATA) +else +EXTRA_DIST = $(manpage_DATA) +endif + +EXTRA_DIST += developer/blocksize.html diff --git a/doc/Makefile.in b/doc/Makefile.in new file mode 100644 index 0000000..1223a50 --- /dev/null +++ b/doc/Makefile.in @@ -0,0 +1,764 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ + +# -*- mode: makefile -*- + +#################################### +# Everything below here is generic # +#################################### + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/version.xml.in $(top_srcdir)/gtk-doc.make +subdir = doc +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/gsf-config.h +CONFIG_CLEAN_FILES = version.xml +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_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 = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(manpagedir)" +DATA = $(manpage_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BONOBO_REQ = @BONOBO_REQ@ +BZ2_LIBS = @BZ2_LIBS@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURRENT_MINUS_AGE = @CURRENT_MINUS_AGE@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ +GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GNOMEVFS_REQ = @GNOMEVFS_REQ@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEXE = @LIBEXE@ +LIBGSF_BONOBO_CFLAGS = @LIBGSF_BONOBO_CFLAGS@ +LIBGSF_BONOBO_LIBS = @LIBGSF_BONOBO_LIBS@ +LIBGSF_CFLAGS = @LIBGSF_CFLAGS@ +LIBGSF_GIO_CFLAGS = @LIBGSF_GIO_CFLAGS@ +LIBGSF_GIO_LIBS = @LIBGSF_GIO_LIBS@ +LIBGSF_GNOME_CFLAGS = @LIBGSF_GNOME_CFLAGS@ +LIBGSF_GNOME_LIBS = @LIBGSF_GNOME_LIBS@ +LIBGSF_LIBS = @LIBGSF_LIBS@ +LIBGSF_MAJOR_VERSION = @LIBGSF_MAJOR_VERSION@ +LIBGSF_MICRO_VERSION = @LIBGSF_MICRO_VERSION@ +LIBGSF_MINOR_VERSION = @LIBGSF_MINOR_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +PYGTK_CFLAGS = @PYGTK_CFLAGS@ +PYGTK_CODEGEN = @PYGTK_CODEGEN@ +PYGTK_LIBS = @PYGTK_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +WARN_CFLAGS = @WARN_CFLAGS@ +WINDRES = @WINDRES@ +XGETTEXT = @XGETTEXT@ +Z_CPPFLAGS = @Z_CPPFLAGS@ +Z_LIBS = @Z_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# The name of the module. +DOC_MODULE = gsf + +# The top-level SGML file. +DOC_MAIN_SGML_FILE = gsf-docs.sgml + +# The directory containing the source code. Relative to $(srcdir) +DOC_SOURCE_DIR = ../gsf + +# Extra options to pass to gtkdoc-scangobj +SCANGOBJ_OPTIONS = --nogtkinit --type-init-func="gsf_init ()" + +# Extra options to supply to gtkdoc-scan +SCAN_OPTIONS = + +# Extra options to supply to gtkdoc-mkdb +MKDB_OPTIONS = --sgml-mode --output-format=xml + +# Extra options to supply to gtkdoc-fixref +FIXXREF_OPTIONS = + +# Used for dependencies +HFILE_GLOB = $(top_srcdir)/gsf/*.h +CFILE_GLOB = $(top_srcdir)/gsf/*.c + +# Header files to ignore when scanning +IGNORE_HFILES = \ + biff-types.h \ + gsf-command-context.h \ + gsf-infile-msvba.h \ + gsf-io-context.h \ + gsf-output-transaction.h \ + gsf-infile-ar.h + +EXTRA_HFILES = ../gsf-gnome/*.h + +# Images to copy into HTML directory +HTML_IMAGES = + +# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE) +content_files = + +# Other files to distribute +extra_files = + +# CFLAGS and LDFLAGS for compiling scan program. Only needed +# if $(DOC_MODULE).types is non-empty. +GTKDOC_CFLAGS = -I$(top_srcdir) $(LIBGSF_CFLAGS) +GTKDOC_LIBS = $(top_builddir)/gsf/libgsf-1.la $(LIBGSF_LIBS) +manpagedir = $(mandir)/man1 +manpage_DATA = gsf-office-thumbnailer.1 gsf-vba-dump.1 gsf.1 +@GTK_DOC_INSTALLED_TRUE@@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +@GTK_DOC_INSTALLED_TRUE@@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +@GTK_DOC_INSTALLED_TRUE@@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +@GTK_DOC_INSTALLED_TRUE@@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +@GTK_DOC_INSTALLED_TRUE@@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = +@GTK_DOC_INSTALLED_TRUE@@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute + +# We set GPATH here; this gives us semantics for GNU make +# which are more like other make's VPATH, when it comes to +# whether a source that is a target of one rule is then +# searched for in VPATH/GPATH. +# +@GTK_DOC_INSTALLED_TRUE@GPATH = $(srcdir) +@GTK_DOC_INSTALLED_TRUE@TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) +@GTK_DOC_INSTALLED_FALSE@EXTRA_DIST = $(manpage_DATA) \ +@GTK_DOC_INSTALLED_FALSE@ developer/blocksize.html +@GTK_DOC_INSTALLED_TRUE@EXTRA_DIST = $(content_files) $(HTML_IMAGES) \ +@GTK_DOC_INSTALLED_TRUE@ $(DOC_MAIN_SGML_FILE) \ +@GTK_DOC_INSTALLED_TRUE@ $(DOC_MODULE)-sections.txt \ +@GTK_DOC_INSTALLED_TRUE@ $(DOC_MODULE)-overrides.txt \ +@GTK_DOC_INSTALLED_TRUE@ $(manpage_DATA) \ +@GTK_DOC_INSTALLED_TRUE@ developer/blocksize.html +@GTK_DOC_INSTALLED_TRUE@DOC_STAMPS = scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ +@GTK_DOC_INSTALLED_TRUE@ pdf-build.stamp \ +@GTK_DOC_INSTALLED_TRUE@ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp \ +@GTK_DOC_INSTALLED_TRUE@ $(srcdir)/pdf.stamp + +@GTK_DOC_INSTALLED_TRUE@SCANOBJ_FILES = \ +@GTK_DOC_INSTALLED_TRUE@ $(DOC_MODULE).args \ +@GTK_DOC_INSTALLED_TRUE@ $(DOC_MODULE).hierarchy \ +@GTK_DOC_INSTALLED_TRUE@ $(DOC_MODULE).interfaces \ +@GTK_DOC_INSTALLED_TRUE@ $(DOC_MODULE).prerequisites \ +@GTK_DOC_INSTALLED_TRUE@ $(DOC_MODULE).signals + +@GTK_DOC_INSTALLED_TRUE@REPORT_FILES = \ +@GTK_DOC_INSTALLED_TRUE@ $(DOC_MODULE)-undocumented.txt \ +@GTK_DOC_INSTALLED_TRUE@ $(DOC_MODULE)-undeclared.txt \ +@GTK_DOC_INSTALLED_TRUE@ $(DOC_MODULE)-unused.txt + +@GTK_DOC_INSTALLED_TRUE@CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) \ +@GTK_DOC_INSTALLED_TRUE@ $(DOC_STAMPS) gsf-scan.* +@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_FALSE@@GTK_DOC_INSTALLED_TRUE@HTML_BUILD_STAMP = +@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_TRUE@@GTK_DOC_INSTALLED_TRUE@HTML_BUILD_STAMP = html-build.stamp +@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_FALSE@@GTK_DOC_INSTALLED_TRUE@PDF_BUILD_STAMP = +@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_TRUE@@GTK_DOC_INSTALLED_TRUE@PDF_BUILD_STAMP = pdf-build.stamp +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu doc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +version.xml: $(top_builddir)/config.status $(srcdir)/version.xml.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-manpageDATA: $(manpage_DATA) + @$(NORMAL_INSTALL) + test -z "$(manpagedir)" || $(MKDIR_P) "$(DESTDIR)$(manpagedir)" + @list='$(manpage_DATA)'; test -n "$(manpagedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(manpagedir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(manpagedir)" || exit $$?; \ + done + +uninstall-manpageDATA: + @$(NORMAL_UNINSTALL) + @list='$(manpage_DATA)'; test -n "$(manpagedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(manpagedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(manpagedir)" && rm -f $$files +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + +@GTK_DOC_INSTALLED_FALSE@dist-hook: + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook +check-am: all-am +check: check-am +@GTK_DOC_INSTALLED_FALSE@all-local: +all-am: Makefile $(DATA) all-local +installdirs: + for dir in "$(DESTDIR)$(manpagedir)"; 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) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +@GTK_DOC_INSTALLED_FALSE@uninstall-local: +@GTK_DOC_INSTALLED_FALSE@distclean-local: +@GTK_DOC_INSTALLED_FALSE@install-data-local: +@GTK_DOC_INSTALLED_FALSE@maintainer-clean-local: +@GTK_DOC_INSTALLED_FALSE@clean-local: +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-local + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-data-local install-manpageDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic \ + maintainer-clean-local + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-local uninstall-manpageDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am all-local check check-am clean clean-generic \ + clean-libtool clean-local dist-hook distclean \ + distclean-generic distclean-libtool distclean-local distdir \ + dvi dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-data-local install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-manpageDATA install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + maintainer-clean-local mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-local uninstall-manpageDATA + + +@ENABLE_GTK_DOC_TRUE@@GTK_DOC_INSTALLED_TRUE@all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) +@ENABLE_GTK_DOC_FALSE@@GTK_DOC_INSTALLED_TRUE@all-local: + +@GTK_DOC_INSTALLED_TRUE@docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) + +@GTK_DOC_INSTALLED_TRUE@$(REPORT_FILES): sgml-build.stamp + +#### scan #### + +@GTK_DOC_INSTALLED_TRUE@scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) +@GTK_DOC_INSTALLED_TRUE@ @echo 'gtk-doc: Scanning header files' +@GTK_DOC_INSTALLED_TRUE@ @-chmod -R u+w $(srcdir) +@GTK_DOC_INSTALLED_TRUE@ @_source_dir='' ; for i in $(DOC_SOURCE_DIR) ; do \ +@GTK_DOC_INSTALLED_TRUE@ _source_dir="$${_source_dir} --source-dir=$$i" ; \ +@GTK_DOC_INSTALLED_TRUE@ done ; \ +@GTK_DOC_INSTALLED_TRUE@ cd $(srcdir) && \ +@GTK_DOC_INSTALLED_TRUE@ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) +@GTK_DOC_INSTALLED_TRUE@ @if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ +@GTK_DOC_INSTALLED_TRUE@ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ +@GTK_DOC_INSTALLED_TRUE@ else \ +@GTK_DOC_INSTALLED_TRUE@ cd $(srcdir) ; \ +@GTK_DOC_INSTALLED_TRUE@ for i in $(SCANOBJ_FILES) ; do \ +@GTK_DOC_INSTALLED_TRUE@ test -f $$i || touch $$i ; \ +@GTK_DOC_INSTALLED_TRUE@ done \ +@GTK_DOC_INSTALLED_TRUE@ fi +@GTK_DOC_INSTALLED_TRUE@ @touch scan-build.stamp + +@GTK_DOC_INSTALLED_TRUE@$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp +@GTK_DOC_INSTALLED_TRUE@ @true + +#### templates #### + +@GTK_DOC_INSTALLED_TRUE@tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt +@GTK_DOC_INSTALLED_TRUE@ @echo 'gtk-doc: Rebuilding template files' +@GTK_DOC_INSTALLED_TRUE@ @-chmod -R u+w $(srcdir) +@GTK_DOC_INSTALLED_TRUE@ @cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) +@GTK_DOC_INSTALLED_TRUE@ @touch tmpl-build.stamp + +@GTK_DOC_INSTALLED_TRUE@tmpl.stamp: tmpl-build.stamp +@GTK_DOC_INSTALLED_TRUE@ @true + +@GTK_DOC_INSTALLED_TRUE@$(srcdir)/tmpl/*.sgml: +@GTK_DOC_INSTALLED_TRUE@ @true + +#### xml #### + +@GTK_DOC_INSTALLED_TRUE@sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) +@GTK_DOC_INSTALLED_TRUE@ @echo 'gtk-doc: Building XML' +@GTK_DOC_INSTALLED_TRUE@ @-chmod -R u+w $(srcdir) +@GTK_DOC_INSTALLED_TRUE@ @_source_dir='' ; for i in $(DOC_SOURCE_DIR) ; do \ +@GTK_DOC_INSTALLED_TRUE@ _source_dir="$${_source_dir} --source-dir=$$i" ; \ +@GTK_DOC_INSTALLED_TRUE@ done ; \ +@GTK_DOC_INSTALLED_TRUE@ cd $(srcdir) && \ +@GTK_DOC_INSTALLED_TRUE@ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) +@GTK_DOC_INSTALLED_TRUE@ @touch sgml-build.stamp + +@GTK_DOC_INSTALLED_TRUE@sgml.stamp: sgml-build.stamp +@GTK_DOC_INSTALLED_TRUE@ @true + +#### html #### + +@GTK_DOC_INSTALLED_TRUE@html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) +@GTK_DOC_INSTALLED_TRUE@ @echo 'gtk-doc: Building HTML' +@GTK_DOC_INSTALLED_TRUE@ @-chmod -R u+w $(srcdir) +@GTK_DOC_INSTALLED_TRUE@ @rm -rf $(srcdir)/html +@GTK_DOC_INSTALLED_TRUE@ @mkdir $(srcdir)/html +@GTK_DOC_INSTALLED_TRUE@ @mkhtml_options=""; \ +@GTK_DOC_INSTALLED_TRUE@ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ +@GTK_DOC_INSTALLED_TRUE@ if test "$(?)" = "0"; then \ +@GTK_DOC_INSTALLED_TRUE@ mkhtml_options=--path="$(srcdir)"; \ +@GTK_DOC_INSTALLED_TRUE@ fi; \ +@GTK_DOC_INSTALLED_TRUE@ cd $(srcdir)/html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) +@GTK_DOC_INSTALLED_TRUE@ @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) +@GTK_DOC_INSTALLED_TRUE@ @echo 'gtk-doc: Fixing cross-references' +@GTK_DOC_INSTALLED_TRUE@ @cd $(srcdir) && gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) +@GTK_DOC_INSTALLED_TRUE@ @touch html-build.stamp + +#### pdf #### + +@GTK_DOC_INSTALLED_TRUE@pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) +@GTK_DOC_INSTALLED_TRUE@ @echo 'gtk-doc: Building PDF' +@GTK_DOC_INSTALLED_TRUE@ @-chmod -R u+w $(srcdir) +@GTK_DOC_INSTALLED_TRUE@ @rm -rf $(srcdir)/$(DOC_MODULE).pdf +@GTK_DOC_INSTALLED_TRUE@ @mkpdf_imgdirs=""; \ +@GTK_DOC_INSTALLED_TRUE@ if test "x$(HTML_IMAGES)" != "x"; then \ +@GTK_DOC_INSTALLED_TRUE@ for img in $(HTML_IMAGES); do \ +@GTK_DOC_INSTALLED_TRUE@ part=`dirname $$img`; \ +@GTK_DOC_INSTALLED_TRUE@ echo $$mkpdf_imgdirs | grep >/dev/null "\-\-imgdir=$$part "; \ +@GTK_DOC_INSTALLED_TRUE@ if test $$? != 0; then \ +@GTK_DOC_INSTALLED_TRUE@ mkpdf_imgdirs="$$mkpdf_imgdirs --imgdir=$$part"; \ +@GTK_DOC_INSTALLED_TRUE@ fi; \ +@GTK_DOC_INSTALLED_TRUE@ done; \ +@GTK_DOC_INSTALLED_TRUE@ fi; \ +@GTK_DOC_INSTALLED_TRUE@ cd $(srcdir) && gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_imgdirs $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) +@GTK_DOC_INSTALLED_TRUE@ @touch pdf-build.stamp + +############## + +@GTK_DOC_INSTALLED_TRUE@clean-local: +@GTK_DOC_INSTALLED_TRUE@ rm -f *~ *.bak +@GTK_DOC_INSTALLED_TRUE@ rm -rf .libs + +@GTK_DOC_INSTALLED_TRUE@distclean-local: +@GTK_DOC_INSTALLED_TRUE@ cd $(srcdir) && \ +@GTK_DOC_INSTALLED_TRUE@ rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf \ +@GTK_DOC_INSTALLED_TRUE@ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + +@GTK_DOC_INSTALLED_TRUE@maintainer-clean-local: clean +@GTK_DOC_INSTALLED_TRUE@ cd $(srcdir) && rm -rf xml html + +@GTK_DOC_INSTALLED_TRUE@install-data-local: +@GTK_DOC_INSTALLED_TRUE@ @installfiles=`echo $(srcdir)/html/*`; \ +@GTK_DOC_INSTALLED_TRUE@ if test "$$installfiles" = '$(srcdir)/html/*'; \ +@GTK_DOC_INSTALLED_TRUE@ then echo '-- Nothing to install' ; \ +@GTK_DOC_INSTALLED_TRUE@ else \ +@GTK_DOC_INSTALLED_TRUE@ if test -n "$(DOC_MODULE_VERSION)"; then \ +@GTK_DOC_INSTALLED_TRUE@ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ +@GTK_DOC_INSTALLED_TRUE@ else \ +@GTK_DOC_INSTALLED_TRUE@ installdir="$(DESTDIR)$(TARGET_DIR)"; \ +@GTK_DOC_INSTALLED_TRUE@ fi; \ +@GTK_DOC_INSTALLED_TRUE@ $(mkinstalldirs) $${installdir} ; \ +@GTK_DOC_INSTALLED_TRUE@ for i in $$installfiles; do \ +@GTK_DOC_INSTALLED_TRUE@ echo '-- Installing '$$i ; \ +@GTK_DOC_INSTALLED_TRUE@ $(INSTALL_DATA) $$i $${installdir}; \ +@GTK_DOC_INSTALLED_TRUE@ done; \ +@GTK_DOC_INSTALLED_TRUE@ if test -n "$(DOC_MODULE_VERSION)"; then \ +@GTK_DOC_INSTALLED_TRUE@ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ +@GTK_DOC_INSTALLED_TRUE@ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ +@GTK_DOC_INSTALLED_TRUE@ mv -f $${installdir}/$(DOC_MODULE).devhelp \ +@GTK_DOC_INSTALLED_TRUE@ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ +@GTK_DOC_INSTALLED_TRUE@ fi; \ +@GTK_DOC_INSTALLED_TRUE@ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ +@GTK_DOC_INSTALLED_TRUE@ fi + +@GTK_DOC_INSTALLED_TRUE@uninstall-local: +@GTK_DOC_INSTALLED_TRUE@ @if test -n "$(DOC_MODULE_VERSION)"; then \ +@GTK_DOC_INSTALLED_TRUE@ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ +@GTK_DOC_INSTALLED_TRUE@ else \ +@GTK_DOC_INSTALLED_TRUE@ installdir="$(DESTDIR)$(TARGET_DIR)"; \ +@GTK_DOC_INSTALLED_TRUE@ fi; \ +@GTK_DOC_INSTALLED_TRUE@ rm -rf $${installdir} + +# +# Require gtk-doc when making dist +# +@ENABLE_GTK_DOC_TRUE@@GTK_DOC_INSTALLED_TRUE@dist-check-gtkdoc: +@ENABLE_GTK_DOC_FALSE@@GTK_DOC_INSTALLED_TRUE@dist-check-gtkdoc: +@ENABLE_GTK_DOC_FALSE@@GTK_DOC_INSTALLED_TRUE@ @echo "*** gtk-doc must be installed and enabled in order to make dist" +@ENABLE_GTK_DOC_FALSE@@GTK_DOC_INSTALLED_TRUE@ @false + +@GTK_DOC_INSTALLED_TRUE@dist-hook: dist-check-gtkdoc dist-hook-local +@GTK_DOC_INSTALLED_TRUE@ mkdir $(distdir)/tmpl +@GTK_DOC_INSTALLED_TRUE@ mkdir $(distdir)/html +@GTK_DOC_INSTALLED_TRUE@ -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl +@GTK_DOC_INSTALLED_TRUE@ cp $(srcdir)/html/* $(distdir)/html +@GTK_DOC_INSTALLED_TRUE@ -cp $(srcdir)/$(DOC_MODULE).pdf $(distdir)/ +@GTK_DOC_INSTALLED_TRUE@ -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ +@GTK_DOC_INSTALLED_TRUE@ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ +@GTK_DOC_INSTALLED_TRUE@ cd $(distdir) && rm -f $(DISTCLEANFILES) +@GTK_DOC_INSTALLED_TRUE@ $(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html + +@GTK_DOC_INSTALLED_TRUE@.PHONY : dist-hook-local docs +@GTK_DOC_INSTALLED_TRUE@.PHONY : dist-hook-local + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/doc/developer/blocksize.html b/doc/developer/blocksize.html new file mode 100644 index 0000000..1a7356d --- /dev/null +++ b/doc/developer/blocksize.html @@ -0,0 +1,124 @@ + + +MSOLE block size variations + + +

Experiments with various block sizes in MS OLE

+ +

Small files

+ +

setup

+

I decided to test the following parameters: +

    +
  • Block size: powers of 2 from 128 B up to 8 KB, 7 possible values. +(The small block size was always 64 B.) +
  • Header size (3 possibilities): +
      +
    1. 512 B for all block sizes +
    2. padded/truncated to block size; (padded with 0's) +
    3. padded/truncated to block size; (padded with 0xff's) +
    +
  • cSectDir: either set or 0 +
  • major version: either 3 or 4 (minor is always 0x3e) +
  • doc or xls (I used two small files, 19KB doc file and 14KB xls file; +so XBAT is never used for these tiny files). +
  • version of windows (3 versions tested): +
      +
    1. Win 98, Office 2000 +
    2. Win 2000 Pro, Office 2000 +
    3. Win XP Pro, Word viewer and Excel viewer, available for free from MS. +
    +
+ +

results

+

Using all combinations, I used a slightly modified test-cp-msole program +to create 168 files (84 doc files and 84 xls files). +I tried to run all of them on each of the three platforms. +Here are the results: +

All these files either opened OK, or were reported as incorrect files. +I haven't experienced crashes, with only one exception (see the next paragraph). +

There were no differences between Excel and Word, they behaved both the +same, with one exception: if a file with 8KB blocks was succesfully opened by +Excel, then Word crashed on that file. (If the file was reported as incorrect, +Word also said it's incorrect, without any crash.) The current libgsf code +allows only block up to 4KB, so it's wise to keep this limitation. +

When the header was padded to block size, it had never any influence whether +it was padded by 0's or 0xff's. + +

Win 2000 and Win XP results

+

Both of these platforms behaved exactly the same: +

The major version set (3 or 4) had no influence. +

Header size had to be = block size. (Constant 512 B header didn't work +for any block size != 512.) +

With _cSectDir set, all block sizes worked. When _cSectDir was not set (0), +only block sizes <= 512 worked. +

(I hope the above text says unambiguously which files worked and which didn't.) + +

Win 98 results

+

The major version had to be 3. (When set to 4, no file worked, not even with +block size 512B.) +

Header size had to be constant 512. (When header size = block size, no block +size != 512 worked.) +

It had no influence whether _cSectDir was set or not. + +

Bigger files, tested on Win 2000 only

+ +

Block sizes bigger then 512

+

I wanted to verify that the header really has size 512. +In other words, that the header still has only 109 metabat pointers, and then +an XBAT block is used. +

I needed a file bigger then about 28 MB. I created a 32MB file by Excel. +

I copied it with the modified test-cp-msole in two configurations: +

    +
  1. block size 1024 B, _cSectDir set, major ver. 4, header padded by 0xff +
  2. block size 1024 B, _cSectDir set, major ver. 3, header padded by 0 +
+(I used a hex dump to verify that the file really has one XBAT block.) +

Both of these files worked. I tried to save the file under another name, and re-open +the file: it worked. The saved file had 512B blocks again; the major/minor +version is set to 3/3e, which is the same as libgsf's default values. + +

Block sizes smaller then 512

+ +

part one

+

I prepared two test files: one had size about 767 KB, the other had 2 MB. +(Using 256B blocks, the former size is big enough to use more than 256 B of the +header, the later is big enough to have more then 109 metabat pointers.) +

When I copied these files with 256 B blocks, they didn't work. +

This proved that the header is 512 B long, even if that means that block 0 +may not be used for data. (Well, I used it for data in the previous experiment, +but it cannot be used generally.) +

Thus I modified the code so that the header is not truncated for block sizes < 512. +At the beginning of the BAT table, I marked the block 0 (or blocks 0,1,2 for block +size 128) as belonging to XBAT. +

With that modified code, I again copied both of the test files using block size 256, +and it worked. + +

part two

+Then I experimented with smaller small block sizes, using the modified code, as explained +above. I used big block size 256, 128, 64, +in combination with small block size 32 and 16. I copied the old small 14KB xls file. (6 combinations) +

The ones with big block size 256 and 128 worked. +

With big block size 64, excel crashed. Even explorer crashed when I selected that file +(I haven't tried to open it, I just selected it: it probably tries to determine the author +and title of the file.) Thus I conclude that the current test that block size has to be >= dirent size +(128) is good to keep. + +

Conclusions and suggestions

+

I suggest to set _cSectDir always: it helps in certain situations and it never hurts. +

There have to be a new instance variable, determining the offset of block 0. +I prefer to call it block0_offset, not header_size, as the header data always take up +exactly 512 B. This will be set at the begining. This determines whether the file will +be compatible with Win 98 or Win 2000/XP. (Only files with 512B blocks can be compatible +with both.) The default should be 2000/XP comaptibility as these are more common now. +

(Previous versions of libgsf had block0_offset = +MAX (block_size, 512), which is a mix of the two.) +

With block0_offset > 512, the header should be padded with 0, as it's cleaner this +way. +

This is the most controversial proposal: we could set the major version to 4 when +block0_offset is not 512. That doesn't break compatibility with MS and enables us to +distinguish the two types for the future. +


+

These experiments were conducted and the document written by +Stepan Kasal around August 23, 2004. + diff --git a/doc/gsf-docs.sgml b/doc/gsf-docs.sgml new file mode 100644 index 0000000..548e4cb --- /dev/null +++ b/doc/gsf-docs.sgml @@ -0,0 +1,250 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +]> + + + + GSF Reference Manual + + + + GSF: Introduction + + +The GNOME Structured File Library (GSF) is an I/O abstraction for +reading/writing compound files. GSF is released under the GNU Lesser General Public +License (GNU LGPL), which allows for flexible licensing of client +applications. + + + + + + GSF: History + + +GSF was written as part of the Gnumeric project. It started in 2002 as a +replacement for libole2 which Gnumeric was using to handle the Microsoft +Excel file format, as libole2's +code had become difficult to maintain and was difficult to generalize. GSF +was designed to be a more general library for dealing with a number of +different types of structured data files and streams. + + +With the release of Gnumeric 1.1.6 (July 2002), Gnumeric used GSF and +libole2 was orphaned. + + + + + + GSF: Dependencies + +GSF depends on the following libraries: + + + +GLib + +A general-purpose utility library, not specific to graphical user interfaces. +GLib provides many useful data types, macros, type conversions, +string utilities, file utilities, a main loop abstraction, and so on. + + + + +Libxml2 + +A library that provides a parser and toolkit for XML, the Extensible Markup Language. +XML is a metalanguage used to define markup languages (text languages where +structure and semantics are added to the content using extra "markup" +information). + + + + + +The core GSF library can be built to also utilize the following libraries: + + + +zlib + +A data +compression library that implements the DEFLATE algorithm used in gzip. + + + + +libbz2 + +A data compression library that implements the algorithm used in bzip2. + + + + + +A separate GSF library can be built that offers additional functionality for +use in the GNOME desktop environment. That library has the following +additional requirements: + + + +libbonobo-2.0 + +Bonobo +is the GNOME architecture for creating reusable software components and +compound documents. + + + + +gnome-vfs-2.0 + +GnomeVFS +is a filesystem abstraction library that allows applications plugable +transparent access to a variety of "real" filesystems, including networked +filesystems like WebDAV, storage on devices like digital cameras, to the +local filesystem. + + + + +gio-2.0 + +GIO +is striving to provide a modern, easy-to-use VFS API that sits at the right +level in the library stack. The goal is to overcome the shortcomings of +GnomeVFS and provide an API that is so good that developers prefer it over +raw POSIX calls. Among other things that means using GObject. It also means +not cloning the POSIX API, but providing higher-level, document-centric interfaces. + + + + + + + + + + Projects using GSF + + +GSF is now also being used by other projects than Gnumeric, including + + +KWord + +The word processor application of KOffice, the integrated office suite for +KDE, the K Desktop Environment. + + + + +librsvg + +A library to support the SVG scalable vector graphics +format. + + + + +libwpd + +A library for importing WordPerfect documents. + + + + +planner + +A project management application. + + + + + + + + + + + API Reference + + +The core of GSF's API deals with basic I/O, an abstraction layer that +provides a uniform interface to several mechanisms that provide streams of +data and a set of parsers for various structured types of data streams. + + + + Basic Input/Output + &GsfInput; + &GsfOutput; + + + Stream Sources + &GsfInfile; + &GsfOutfile; + &GsfStdio; + &GsfMemory; + &GsfIOChannel; + &GsfGnomevfs; + &GsfGIO; + &GsfBonobo; + + + Stream Parsers + &GsfText; + &GsfXml; + &GsfZip; + &GsfCompression; + &GsfMsole; + &GsfMetadata; + &GsfOpenDocument; + &GsfBlobs; + &GsfClipData; + + + Miscellaneous + &GsfUtils; + + + +&TreeIndex; + + diff --git a/doc/gsf-office-thumbnailer.1 b/doc/gsf-office-thumbnailer.1 new file mode 100644 index 0000000..846a234 --- /dev/null +++ b/doc/gsf-office-thumbnailer.1 @@ -0,0 +1,71 @@ +.de URL +\\$2 \(laURL: \\$1 \(ra\\$3 +.. +.if \n[.g] .mso www.tmac +.TH GSF-OFFICE-THUMBNAILER 1 "August 17, 2005" gsf "GNOME" +.SH NAME +gsf-office-thumbnailer \- office files thumbnailer for the GNOME desktop + +.SH SYNOPSIS +\fBgsf-office-thumbnailer\fR [\fIOPTIONS\fR] \fIinfile\fR \fIoutfile\fR + +.SH DESCRIPTION +This manual page briefly documents the \fBgsf-office-thumbnailer\fR command. + +\fBgsf-office-thumbnailer\fR is used internally by GNOME applications such +as \fBnautilus\fR to generate thumbnails of several types of office +application files. While it is possible to invoke it manually, it is usually +invoked automatically by \fBnautilus\fR. + +.\".SH "RETURN VALUE" +.\".SH "EXIT STATUS" +.\".SH "ERROR HANDLING" +.\".SH ERRORS +.SH OPTIONS +This program follows the usual GNU command line syntax, with single +letter options starting with a single dash (`-') and longer options +starting with two dashes (`--'). + +.SS "Main options" +.TP +.B \-i, \-\-input=\fIfilename\fR +Name of file for which to create a thumbnail +.TP +.B \-o, \-\-output=\fIfilename\fR +Name of the file in which to store the thumbnail +.TP +.B \-s, \-\-size=\fIN\fR +Size of thumbnail in pixels; the thumbnail will be at most N*N pixels large. + +.SS "Help options" +.TP +.B \-?, \-\-help +Display a brief usage message + +.\".SH USAGE +.\".SH EXAMPLES +.\".SH FILES +.\".SH ENVIRONMENT +.\".SH DIAGNOSTICS +.\".SH SECURITY +.\".SH CONFORMING TO +.\".SH NOTES +.\".SH BUGS + +.SH LICENSE + +\fBgsf-office-thumbnailer\fR is licensed under the terms of version 2.1 of +the GNU Lesser General Public License (LGPL) as published by the Free +Software Foundation. For information on this license look at the source code +that came with the software or see the +.URL "http://www.gnu.org/" "GNU project page" . + +.SH AUTHOR + +\fBgsf-office-thumbnailer\fR's primary author is Federico Mena-Quintero +. + +The initial version of this manpage was written by J.H.M. Dassen (Ray) +. + +\".SH SEE ALSO diff --git a/doc/gsf-overrides.txt b/doc/gsf-overrides.txt new file mode 100644 index 0000000..13f485f --- /dev/null +++ b/doc/gsf-overrides.txt @@ -0,0 +1,2 @@ +# These are manually-edited to override or add declarations to those scanned +# from the header files. diff --git a/doc/gsf-sections.txt b/doc/gsf-sections.txt new file mode 100644 index 0000000..0306705 --- /dev/null +++ b/doc/gsf-sections.txt @@ -0,0 +1,891 @@ +

+Input from unstructured files +input +GsfInput +gsf_input_read +gsf_input_tell +gsf_input_seek +gsf_input_container +gsf_input_dup +gsf_input_size +gsf_input_eof +gsf_input_remaining +gsf_input_error_id +gsf_input_sibling +gsf_input_error +gsf_input_name +gsf_input_set_name_from_filename + +GsfInputProxy +gsf_input_proxy_new +gsf_input_proxy_new_section + +gsf_input_copy +gsf_input_uncompress + +GSF_INPUT_TYPE +GSF_INPUT +GSF_IS_INPUT +GSF_INPUT_CLASS +GSF_IS_INPUT_CLASS +GsfInputClass +gsf_input_get_type +GSF_INPUT_PROXY +GSF_INPUT_PROXY_TYPE +GSF_IS_INPUT_PROXY +gsf_input_proxy_get_type + +gsf_input_set_name +gsf_input_set_container +gsf_input_set_size +gsf_input_seek_emulate +
+ +
+Output to unstructured files +output +GsfOutput +gsf_output_size +gsf_output_close +gsf_output_tell +gsf_output_seek +gsf_output_write +gsf_output_puts +gsf_output_printf +gsf_output_vprintf + +gsf_output_container +gsf_output_name +gsf_output_set_name_from_filename +gsf_output_error_id +gsf_output_set_error +gsf_output_error +gsf_output_is_closed + +gsf_output_wrap +gsf_output_unwrap + + +GSF_OUTPUT_TYPE +GSF_OUTPUT +GSF_IS_OUTPUT +GSF_OUTPUT_CLASS +GSF_IS_OUTPUT_CLASS +GsfOutfileClass +gsf_output_get_type + +gsf_output_set_name +gsf_output_set_container +
+ +
+Infile reading structed files +infile +GsfInfile +gsf_infile_num_children +gsf_infile_child_by_index +gsf_infile_child_by_name +gsf_infile_child_by_vname +gsf_infile_child_by_aname +gsf_infile_child_by_vaname +gsf_infile_name_by_index + +GSF_INFILE_TYPE +GSF_INFILE +GSF_IS_INFILE +GSF_INFILE_CLASS +GSF_IS_INFILE_CLASS +GsfInfileClass +gsf_infile_get_type +
+ +
+Outfile writing structed files +outfile +GsfOutfile +gsf_outfile_new_child +gsf_outfile_new_child_full +gsf_outfile_new_child_varg + +GSF_OUTFILE_TYPE +GSF_OUTFILE +GSF_IS_OUTFILE +GSF_OUTFILE_CLASS +GSF_IS_OUTFILE_CLASS +GsfOutputClass +gsf_outfile_get_type +
+ +
+Reading and Writing from local files and directories +stdio +GsfInputStdio +gsf_input_stdio_new +gsf_input_stdio_new_FILE +GsfOutputStdio +gsf_output_stdio_new +gsf_output_stdio_new_full +gsf_output_stdio_new_valist +gsf_output_stdio_new_FILE +GsfOutfileStdio +gsf_outfile_stdio_new +gsf_outfile_stdio_new_full +gsf_outfile_stdio_new_valist +GsfInfileStdio +gsf_infile_stdio_new + + +GSF_INPUT_STDIO_TYPE +GSF_INPUT_STDIO +GSF_IS_INPUT_STDIO +gsf_input_stdio_get_type + +GSF_IS_OUTPUT_STDIO +GSF_OUTPUT_STDIO +GSF_OUTPUT_STDIO_TYPE +gsf_output_stdio_get_type + +GSF_IS_INFILE_STDIO +GSF_INFILE_STDIO +GSF_INFILE_STDIO_TYPE +gsf_infile_stdio_get_type + +GSF_IS_OUTFILE_STDIO +GSF_OUTFILE_STDIO +GSF_OUTFILE_STDIO_TYPE +gsf_outfile_stdio_get_type + +
+ +
+memory +GsfInputMemory +gsf_input_mmap_new +gsf_input_memory_new +gsf_input_memory_new_clone +gsf_input_memory_new_from_iochannel + +GsfOutputMemory +gsf_output_memory_get_bytes +gsf_output_memory_new + + +GSF_INPUT_MEMORY_TYPE +GSF_INPUT_MEMORY +GSF_IS_INPUT_MEMORY +gsf_input_memory_get_type + +GSF_OUTPUT_MEMORY_TYPE +GSF_OUTPUT_MEMORY +GSF_IS_OUTPUT_MEMORY +gsf_output_memory_get_type + +GSF_SHARED_MEMORY_TYPE +GSF_SHARED_MEMORY +GSF_IS_SHARED_MEMORY +gsf_shared_memory_get_type + + +GsfSharedMemory +gsf_shared_memory_new +gsf_shared_memory_mmapped_new +
+ +
+GnomeVFS +gnome-vfs +GsfInputGnomeVFS +gsf_input_gnomevfs_new +gsf_input_gnomevfs_new_uri +gsf_input_gnomevfs_needs_local_copy + +GsfOutputGnomeVFS +gsf_output_gnomevfs_new +gsf_output_gnomevfs_new_uri + +GSF_INPUT_GNOMEVFS_TYPE +GSF_INPUT_GNOMEVFS +GSF_IS_INPUT_GNOMEVFS +gsf_input_gnomevfs_get_type + +GSF_OUTPUT_GNOMEVFS_TYPE +GSF_OUTPUT_GNOMEVFS +GSF_IS_OUTPUT_GNOMEVFS +gsf_output_gnomevfs_get_type +
+ +
+GIO +gio +GsfInputGio +gsf_input_gio_new +gsf_input_gio_new_for_path +gsf_input_gio_new_for_uri + +GsfOutputGio +gsf_output_gio_new +gsf_output_gio_new_for_path +gsf_output_gio_new_for_uri + +GSF_INPUT_GIO_TYPE +GSF_INPUT_GIO +GSF_IS_INPUT_GIO +gsf_input_gio_get_type + +GSF_OUTPUT_GIO_TYPE +GSF_OUTPUT_GIO +GSF_IS_OUTPUT_GIO +gsf_output_gio_get_type +
+ +
+Compression +compression +GsfInputGZip +gsf_input_gzip_new +gsf_input_memory_new_from_bzip + +GsfOutputGZip +gsf_output_gzip_new + +GsfOutputBzip +gsf_output_bzip_new + +GSF_INPUT_GZIP_TYPE +GSF_INPUT_GZIP +GSF_IS_INPUT_GZIP +gsf_input_gzip_get_type + +GSF_OUTPUT_GZIP_TYPE +GSF_OUTPUT_GZIP +GSF_IS_OUTPUT_GZIP +gsf_output_gzip_get_type + +GSF_OUTPUT_BZIP_TYPE +GSF_OUTPUT_BZIP +GSF_IS_OUTPUT_BZIP +gsf_output_bzip_get_type +
+ +
+Text +text +GsfInputTextline +gsf_input_textline_new +gsf_input_textline_ascii_gets +gsf_input_textline_utf8_gets + +GsfOutputIconv +gsf_output_iconv_new + +GsfOutputCsv +gsf_output_csv_write_eol +gsf_output_csv_write_field + +GsfOutputCsvQuotingMode + +GSF_INPUT_TEXTLINE_TYPE +GSF_INPUT_TEXTLINE +GSF_IS_INPUT_TEXTLINE +gsf_input_textline_get_type + +GSF_OUTPUT_ICONV_TYPE +GSF_OUTPUT_ICONV +GSF_IS_OUTPUT_ICONV +GsfOutputIconvClass +gsf_output_iconv_get_type + +GSF_OUTPUT_CSV_TYPE +GSF_OUTPUT_CSV +GSF_IS_OUTPUT_CSV +GsfOutputCsvClass +gsf_output_csv_get_type + +GSF_OUTPUT_CSV_QUOTING_MODE_TYPE +gsf_output_csv_quoting_mode_get_type +
+ +
+MS OLE2 +msole +GsfInfileMSOle +gsf_infile_msole_new +gsf_infile_msole_get_class_id + +GsfOutfileMSOle +gsf_outfile_msole_new +gsf_outfile_msole_new_full +gsf_outfile_msole_set_class_id + +gsf_msole_metadata_read +gsf_msole_metadata_write +gsf_msole_iconv_open_codepages_for_export +gsf_msole_iconv_open_codepage_for_import +gsf_msole_iconv_open_for_export +gsf_msole_iconv_open_codepage_for_export +gsf_msole_iconv_open_for_import +gsf_msole_iconv_win_codepage +gsf_msole_codepage_to_lid +gsf_msole_lid_to_codepage +gsf_msole_lid_to_codepage_str +gsf_msole_lid_for_language +gsf_msole_language_for_lid +gsf_msole_inflate + +GSF_INFILE_MSOLE_TYPE +GSF_INFILE_MSOLE +GSF_IS_INFILE_MSOLE +gsf_infile_msole_get_type + +GSF_OUTFILE_MSOLE_TYPE +GSF_OUTFILE_MSOLE +GSF_IS_OUTFILE_MSOLE +gsf_outfile_msole_get_type + +OLE_HEADER_START_BAT +OLE_HEADER_MAJOR_VER +OLE_HEADER_METABAT_SIZE +OLE_HEADER_DIRENT_START +OLE_HEADER_NUM_SBAT +OLE_HEADER_BB_SHIFT +OLE_HEADER_CSECTDIR +OLE_HEADER_NUM_BAT +OLE_HEADER_THRESHOLD +OLE_HEADER_METABAT_BLOCK +OLE_HEADER_SBAT_START +OLE_HEADER_SIGNATURE +OLE_HEADER_BYTE_ORDER +OLE_HEADER_SB_SHIFT +OLE_HEADER_NUM_METABAT +OLE_HEADER_SIZE +OLE_HEADER_CLSID +OLE_HEADER_MINOR_VER +OLE_DEFAULT_BB_SHIFT +OLE_DEFAULT_SB_SHIFT + +DIRENT_DETAILS_SIZE +DIRENT_SIZE +DIRENT_NAME_LEN +DIRENT_TYPE_PROPERTY +DIRENT_TYPE_FILE +DIRENT_MAGIC_END +DIRENT_TYPE_DIR +DIRENT_MAX_NAME_SIZE +DIRENT_FILE_SIZE +DIRENT_FIRSTBLOCK +DIRENT_TYPE_INVALID +DIRENT_USERFLAGS +DIRENT_COLOUR +DIRENT_MODIFY_TIME +DIRENT_TYPE_LOCKBYTES +DIRENT_CREATE_TIME +DIRENT_PREV +DIRENT_NEXT +DIRENT_CHILD +DIRENT_TYPE +DIRENT_CLSID +DIRENT_TYPE_ROOTDIR + +BAT_MAGIC_METABAT +BAT_MAGIC_BAT +BAT_INDEX_SIZE +BAT_MAGIC_END_OF_CHAIN +BAT_MAGIC_UNUSED +
+ +
+OASIS Open Document +opendoc +gsf_opendoc_metadata_read +gsf_opendoc_metadata_subtree +gsf_opendoc_metadata_write +
+ +
+Open Package (ECMA 376) +open-pkg +GsfOpenPkgRel +GsfOpenPkgRels +GsfOpenPkgIter +gsf_open_pkg_rel_get_target +gsf_open_pkg_rel_get_type +gsf_open_pkg_rel_is_extern + +gsf_open_pkg_foreach_rel +gsf_open_pkg_open_rel +gsf_open_pkg_lookup_rel_by_id +gsf_open_pkg_lookup_rel_by_type + +gsf_open_pkg_error_id + +GsfOutfileOpenPkg +gsf_outfile_open_pkg_new +gsf_outfile_open_pkg_set_sink +gsf_outfile_open_pkg_set_content_type +gsf_outfile_open_pkg_relate +gsf_outfile_open_pkg_add_rel +gsf_outfile_open_pkg_add_extern_rel + +GSF_OUTFILE_OPEN_PKG_TYPE +GSF_OUTFILE_OPEN_PKG +GSF_IS_OUTFILE_OPEN_PKG +gsf_outfile_open_pkg_get_type + + +gsf_open_pkg_open_rel_by_id +gsf_open_pkg_open_rel_by_type +gsf_open_pkg_parse_rel_by_id +gsf_open_pkg_get_rel_by_type +gsf_open_pkg_get_rel_by_id +
+ +
+Raw Data Chunks +blobs +GsfBlob +GsfBlobClass +GsfStructuredBlob +GsfBlob +gsf_blob_new +gsf_blob_get_size +gsf_blob_peek_data + +gsf_structured_blob_write +gsf_structured_blob_read + +GSF_BLOB +GSF_IS_BLOB +GSF_BLOB_TYPE +GSF_BLOB_CLASS +GSF_IS_BLOB_CLASS +GSF_BLOB_GET_CLASS + +GSF_STRUCTURED_BLOB_TYPE +GSF_STRUCTURED_BLOB +GSF_IS_STRUCTURED_BLOB +
+ +GSF_TYPE_BLOB +GsfBlobPrivate +gsf_blob_get_type +gsf_structured_blob_get_type + + + +
+clip-data +GsfClipFormat +GsfClipFormatWindows +GsfClipData +GsfClipDataClass +GsfClipData +gsf_clip_data_new +gsf_clip_data_get_format +gsf_clip_data_get_data_blob +gsf_clip_data_get_windows_clipboard_format +gsf_clip_data_peek_real_data + +GSF_CLIP_DATA +GSF_IS_CLIP_DATA +GSF_TYPE_CLIP_DATA +GSF_CLIP_DATA_CLASS +GSF_IS_CLIP_DATA_CLASS +GSF_CLIP_DATA_GET_CLASS + +GsfClipDataPrivate +gsf_clip_data_get_type +
+ +
+Zip +zip +GsfInfileZip +gsf_infile_zip_new + +GsfOutfileZip +gsf_outfile_zip_new +gsf_outfile_zip_set_compression_method + + +GSF_INFILE_ZIP_TYPE +GSF_INFILE_ZIP +GSF_IS_INFILE_ZIP +gsf_infile_zip_get_type + +GSF_OUTFILE_ZIP_TYPE +GSF_OUTFILE_ZIP +GSF_IS_OUTFILE_ZIP +gsf_outfile_zip_get_type + + +GsfZipDirent +gsf_zip_dirent_new +gsf_zip_dirent_free + +GsfZipVDir +gsf_vdir_free +gsf_vdir_new +gsf_vdir_add_child + +ZIP_DIRENT_USIZE +ZIP_DIRENT_OFFSET +GsfZipCompressionMethod +ZIP_FILE_HEADER_NAME_SIZE +ZZIP_IS_STREAMED +ZIP_FILE_HEADER_EXTRACT +ZIP_TRAILER_SIZE +ZIP_HEADER_TIME +ZIP_FILE_HEADER_SIZE +ZZIP_IS_ENCRYPTED +ZIP_HEADER_VERSION +ZIP_BUF_SIZE +ZIP_DIRENT_CRC32 +ZIP_HEADER_COMP_SIZE +ZIP_DIRENT_COMPR_METHOD +ZIP_DIRENT_FILE_TYPE +ZIP_FILE_HEADER_EXTRAS_SIZE +ZIP_DIRENT_EXTRACT +ZIP_DIRENT_FILE_MODE +ZIP_DIRENT_FLAGS +ZIP_FILE_HEADER_CSIZE +ZIP_TRAILER_DIR_SIZE +ZIP_TRAILER_COMMENT_SIZE +ZIP_TRAILER_ENTRIES +ZIP_NAME_SEPARATOR +ZIP_HEADER_SIZE +ZIP_HEADER_CRC +ZIP_FILE_HEADER_FLAGS +ZIP_DIRENT_EXTRAS_SIZE +ZIP_HEADER_COMP_METHOD +ZZIP_IS_COMPRLEVEL +ZIP_DIRENT_DOSTIME +ZIP_DIRENT_ENCODER +ZIP_HEADER_OS +ZIP_DIRENT_COMMENT_SIZE +ZIP_FILE_HEADER_CRC32 +ZIP_HEADER_FLAGS +ZIP_TRAILER_DISK +ZIP_FILE_HEADER_USIZE +ZIP_TRAILER_TOTAL_ENTRIES +ZIP_HEADER_NAME_LEN +ZIP_HEADER_UNCOMP_SIZE +ZIP_TRAILER_DIR_DISK +ZIP_DIRENT_CSIZE +ZIP_TRAILER_DIR_POS +ZIP_BLOCK_SIZE +ZIP_DIRENT_NAME_SIZE +ZIP_DIRENT_SIZE +ZIP_DIRENT_DISKSTART +ZIP_HEADER_EXTRA_LEN +ZIP_FILE_HEADER_COMPR_METHOD +ZIP_FILE_HEADER_DOSTIME +
+ +
+GIOChannel +iochannel +GsfOutputIOChannel +gsf_output_iochannel_new + + +GSF_OUTPUT_IOCHANNEL_TYPE +GSF_OUTPUT_IOCHANNEL +GSF_IS_OUTPUT_IOCHANNEL +gsf_output_iochannel_get_type +
+ +
+Bononbo +bonobo +GsfInputBonobo +gsf_input_bonobo_new + +GsfOutputBonobo +gsf_output_bonobo_new + +GsfSharedBonoboStream +gsf_shared_bonobo_stream_new + +GSF_INPUT_BONOBO_TYPE +GSF_INPUT_BONOBO +GSF_IS_INPUT_BONOBO +gsf_input_bonobo_get_type + +GSF_OUTPUT_BONOBO_TYPE +GSF_OUTPUT_BONOBO +GSF_IS_OUTPUT_BONOBO +gsf_output_bonobo_get_type + +GSF_SHARED_BONOBO_STREAM_TYPE +GSF_SHARED_BONOBO_STREAM +GSF_IS_SHARED_BONOBO_STREAM +gsf_shared_bonobo_stream_get_type +
+ +
+XML and libxml +xml + +GsfXMLIn +GsfXMLInDoc +GsfXMLInUnknownFunc +GsfXMLInNS +GsfXMLInNode +GsfXMLInExtDtor +GsfXMLContent +GsfXMLBlob +GsfInputHTTP +GsfXMLProbeFunc + +GSF_XML_IN_NODE_FULL +GSF_XML_IN_NODE +GSF_XML_IN_NODE_END +GSF_XML_IN_NS +GSF_XML_IN_NS_END + +gsf_xml_in_doc_new +gsf_xml_in_doc_free +gsf_xml_in_doc_add_nodes +gsf_xml_in_doc_parse +gsf_xml_in_doc_set_unknown_handler + +gsf_xml_in_push_state +gsf_xml_in_namecmp +gsf_xml_in_check_ns +gsf_xml_in_get_input + +gsf_xml_probe + +GsfXMLOut + +gsf_xml_out_new +gsf_xml_out_set_doc_type +gsf_xml_out_get_output + +gsf_xml_out_start_element +gsf_xml_out_end_element + +gsf_xml_out_add_cstr +gsf_xml_out_add_cstr_unchecked +gsf_xml_out_add_bool +gsf_xml_out_add_int +gsf_xml_out_add_uint +gsf_xml_out_add_float +gsf_xml_out_add_enum +gsf_xml_out_add_color +gsf_xml_out_add_base64 +gsf_xml_out_add_gvalue +gsf_xml_out_simple_element +gsf_xml_out_simple_float_element +gsf_xml_out_simple_int_element + + +gsf_input_http_get_content_type +gsf_input_http_get_type +gsf_input_http_get_url + + +gsf_xml_parser_context +gsf_xml_gvalue_from_str +gsf_xmlDocFormatDump + + +GSF_XML_OUT_TYPE +GSF_XML_OUT +GSF_IS_XML_OUT +gsf_xml_out_get_type + +GSF_INPUT_HTTP +GSF_INPUT_HTTP_TYPE +GSF_IS_INPUT_HTTP +gsf_input_http_new +
+ +
+utils +gsf_init +gsf_shutdown +gsf_init_dynamic +gsf_shutdown_dynamic +libgsf_major_version +libgsf_minor_version +libgsf_micro_version + +GSF_CLASS +GSF_CLASS_FULL +GSF_CLASS_ABSTRACT +GSF_INTERFACE +GSF_INTERFACE_FULL +GSF_DYNAMIC_CLASS +GSF_DYNAMIC_CLASS_FULL +GSF_DYNAMIC_CLASS_ABSTRACT +GSF_DYNAMIC_INTERFACE +GSF_DYNAMIC_INTERFACE_FULL +GSF_PARAM_STATIC + +GSF_ERROR +GsfError +gsf_error_quark + +gsf_mem_dump +gsf_input_dump + +GSF_OFF_T_FORMAT +gsf_off_t + +gsf_filename_to_utf8 +gsf_iconv_close +gsf_extension_pointer + +gsf_base64_encode_simple +gsf_base64_encode_close +gsf_base64_encode_step +gsf_base64_decode_simple +gsf_base64_decode_step +GSF_LE_GET_GINT8 +GSF_LE_GET_GUINT64 +GSF_LE_GET_GINT16 +GSF_LE_GET_GUINT8 +GSF_LE_GET_GINT32 +GSF_LE_GET_GUINT16 +GSF_LE_GET_GUINT32 +GSF_LE_GET_GINT64 +gsf_le_get_guint64 +GSF_LE_GET_FLOAT +gsf_le_get_float +GSF_LE_GET_DOUBLE +gsf_le_get_double +GSF_LE_SET_GUINT8 +GSF_LE_SET_GUINT16 +GSF_LE_SET_GUINT32 +GSF_LE_SET_GINT8 +GSF_LE_SET_GINT16 +GSF_LE_SET_GINT32 +GSF_LE_SET_GINT64 +GSF_LE_SET_GUINT64 +GSF_LE_SET_FLOAT +GSF_LE_SET_DOUBLE +gsf_le_set_float +gsf_le_set_double + + +GsfTimestamp +gsf_timestamp_copy +gsf_timestamp_free +gsf_timestamp_as_string +gsf_timestamp_from_string +gsf_timestamp_hash +gsf_timestamp_equal +gsf_value_set_timestamp +VAL_IS_GSF_TIMESTAMP + +GSF_TIMESTAMP_TYPE +gsf_timestamp_get_type + +gsf_timestamp_parse + + +gsf_doc_prop_swap_val +gsf_property_settings_collect +gsf_property_settings_collect_valist +gsf_property_settings_free +
+ +
+metadata +GsfDocMetaData +gsf_doc_meta_data_new +gsf_doc_meta_data_lookup +gsf_doc_meta_data_insert +gsf_doc_meta_data_remove +gsf_doc_meta_data_steal +gsf_doc_meta_data_store +gsf_doc_meta_data_foreach +gsf_doc_meta_data_size +gsf_doc_meta_dump + +GsfDocProp +gsf_doc_prop_new +gsf_doc_prop_free +gsf_doc_prop_get_name +gsf_doc_prop_get_val +gsf_doc_prop_set_val +gsf_doc_prop_get_link +gsf_doc_prop_set_link +gsf_doc_prop_dump + +GsfDocPropVector +gsf_docprop_vector_new +gsf_docprop_vector_append +gsf_docprop_vector_as_string +gsf_value_get_docprop_varray +gsf_value_get_docprop_vector + + +GSF_META_NAME_TITLE +GSF_META_NAME_DESCRIPTION +GSF_META_NAME_SUBJECT +GSF_META_NAME_DATE_MODIFIED +GSF_META_NAME_DATE_CREATED +GSF_META_NAME_KEYWORDS +GSF_META_NAME_LANGUAGE +GSF_META_NAME_CODEPAGE +GSF_META_NAME_REVISION_COUNT +GSF_META_NAME_EDITING_DURATION +GSF_META_NAME_TABLE_COUNT +GSF_META_NAME_IMAGE_COUNT +GSF_META_NAME_OBJECT_COUNT +GSF_META_NAME_PAGE_COUNT +GSF_META_NAME_PARAGRAPH_COUNT +GSF_META_NAME_WORD_COUNT +GSF_META_NAME_CHARACTER_COUNT +GSF_META_NAME_CELL_COUNT +GSF_META_NAME_SPREADSHEET_COUNT +GSF_META_NAME_CREATOR +GSF_META_NAME_TEMPLATE +GSF_META_NAME_LAST_SAVED_BY +GSF_META_NAME_LAST_PRINTED +GSF_META_NAME_PRINT_DATE +GSF_META_NAME_PRINTED_BY +GSF_META_NAME_KEYWORD +GSF_META_NAME_SECURITY +GSF_META_NAME_CATEGORY +GSF_META_NAME_PRESENTATION_FORMAT +GSF_META_NAME_THUMBNAIL +GSF_META_NAME_GENERATOR +GSF_META_NAME_LINE_COUNT +GSF_META_NAME_SLIDE_COUNT +GSF_META_NAME_NOTE_COUNT +GSF_META_NAME_HIDDEN_SLIDE_COUNT +GSF_META_NAME_MM_CLIP_COUNT +GSF_META_NAME_BYTE_COUNT +GSF_META_NAME_SCALE +GSF_META_NAME_HEADING_PAIRS +GSF_META_NAME_DOCUMENT_PARTS +GSF_META_NAME_MANAGER +GSF_META_NAME_COMPANY +GSF_META_NAME_LINKS_DIRTY +GSF_META_NAME_DICTIONARY +GSF_META_NAME_MSOLE_UNKNOWN_17 +GSF_META_NAME_MSOLE_UNKNOWN_18 +GSF_META_NAME_MSOLE_UNKNOWN_19 +GSF_META_NAME_MSOLE_UNKNOWN_20 +GSF_META_NAME_MSOLE_UNKNOWN_21 +GSF_META_NAME_MSOLE_UNKNOWN_22 +GSF_META_NAME_MSOLE_UNKNOWN_23 +GSF_META_NAME_LOCALE_SYSTEM_DEFAULT +GSF_META_NAME_CASE_SENSITIVE +GSF_META_NAME_INITIAL_CREATOR + +GSF_DOC_META_DATA_TYPE +GSF_DOC_META_DATA +IS_GSF_DOC_META_DATA +gsf_doc_meta_data_get_type + +GSF_DOCPROP_VECTOR +GSF_DOCPROP_VECTOR_TYPE +IS_GSF_DOCPROP_VECTOR +VAL_IS_GSF_DOCPROP_VECTOR +gsf_docprop_vector_get_type + +
diff --git a/doc/gsf-vba-dump.1 b/doc/gsf-vba-dump.1 new file mode 100644 index 0000000..9f5afc8 --- /dev/null +++ b/doc/gsf-vba-dump.1 @@ -0,0 +1,61 @@ +.de URL +\\$2 \(laURL: \\$1 \(ra\\$3 +.. +.if \n[.g] .mso www.tmac +.TH GSF 1 "March 16, 2008" gsf "GNOME" +.SH NAME +gsf-vba-dump \- extract Visual Basic for Applications macros + +.SH SYNOPSIS +\fBgsf-vba-dump\fR [\fIFILE\fR]... + +.SH DESCRIPTION +This manual page briefly documents the \fBgsf-vba-dump\fR command. + +Various Microsoft binary data formats, including Excel (.xls), Word (.doc) +and PowerPoint (.ppt) can embed macro code streams. These macro streams are +in P-code (intermediate language) compiled from Visual Basic for +Applications (VBA). + +The \fBgsf-vba-dump\fR utility extracts these macro streams. + +.\".SH "RETURN VALUE" +.\".SH "EXIT STATUS" +.\".SH "ERROR HANDLING" +.\".SH ERRORS +.\".SH OPTIONS +.\".SH USAGE +.\".SH EXAMPLES +.\".SH FILES +.\".SH ENVIRONMENT +.\".SH DIAGNOSTICS +.\".SH SECURITY +.\".SH CONFORMING TO +.\".SH NOTES +.SH BUGS +Macro extraction from Powerpoint (.ppt) files has not been implemented yet. + +.SH LICENSE + +\fBgsf-vba-dump\fR is licensed under the terms of version 2.1 of +the GNU Lesser General Public License (LGPL) as published by the Free +Software Foundation. For information on this license look at the source code +that came with the software or see the +.URL "http://www.gnu.org" "GNU project page" . + +.SH AUTHORS + +\fBgsf-vba-dump\fR's primary author is Jody Goldberg . + +The initial version of this manpage was written by J.H.M. Dassen (Ray) +. + +.SH SEE ALSO +\fBgnumeric\fR(1) + +.URL "http://www.gnome.org/projects/gnumeric/" "The Gnumeric homepage" . + +.URL "http://www.gnome.org/" "The GNOME project page" . + +Wikipedia, +.URL "http://en.wikipedia.org/wiki/Visual_Basic_for_Applications" "Visual Basic for Applications" . diff --git a/doc/gsf.1 b/doc/gsf.1 new file mode 100644 index 0000000..22eeaa5 --- /dev/null +++ b/doc/gsf.1 @@ -0,0 +1,91 @@ +.de URL +\\$2 \(laURL: \\$1 \(ra\\$3 +.. +.if \n[.g] .mso www.tmac +.TH GSF 1 "29 November 2009" gsf "GNOME" +.SH NAME +gsf \- archiving utility using the G Structured File library + +.SH SYNOPSIS +\fBgsf\fR [\fIOPTION...\fR] \fISUBCOMMAND\fR \fIARCHIVE...\fR + +.SH DESCRIPTION +This manual page briefly documents the \fBgsf\fR command. + +\fBgsf\fR is a simple archive utility, somewhat similar to \fBtar\fR(1). It +operates on files following one of the structured file formats understood by +the G Structured File library, for example, Microsoft Excel(TM) files. + +.\".SH "RETURN VALUE" +.\".SH "EXIT STATUS" +.\".SH "ERROR HANDLING" +.\".SH ERRORS +.SH OPTIONS +.SS "Options" +.TP +.B \-?, \-\-help +Show help options +.TP +.B \-v, \-\-version +Display gsf's version + +.SS "Subcommands" +.TP +.B cat +Output one or more files in archive +.TP +.B dump +Dump one or more files in archive as formatted hexadecimal +.TP +.B help +List subcommands +.TP +.B list +List files in archive +.TP +.B props +Archive list of property names + +.\".SH USAGE +.SH EXAMPLES +To list the content structure of a Microsoft Excel(TM) file \fIarrays.xls\fR: +.PP +gsf list arrays.xls +.PP +To dump Workbook, an individual data stream in arrays.xls: +.PP +gsf dump arrays.xls Workbook +.PP +.\".SH FILES +.\".SH ENVIRONMENT +.\".SH DIAGNOSTICS +.\".SH SECURITY +.\".SH CONFORMING TO +.\".SH NOTES +.\".SH BUGS + +.\".SH LICENSE +.\" +.\"\fBgsf-office-thumbnailer\fR is licensed under the terms of version 2.1 of +.\"the GNU Lesser General Public License (LGPL) as published by the Free +.\"Software Foundation. For information on this license look at the source code +.\"that came with the software or see the +.\".UR http://www.gnu.org +.\"GNU project page +.\".UE +.\"at http://www.gnu.org/. + +.SH AUTHORS + +\fBgsf\fR's primary authors are Morten Welinder and Jody +Goldberg . + +The initial version of this manpage was written by J.H.M. Dassen (Ray) +. + +.SH SEE ALSO +\fBgnumeric\fR(1) + +.URL "http://www.gnome.org/projects/gnumeric/" "The Gnumeric homepage" + +.URL "http://www.gnome.org/" "The GNOME project page" diff --git a/doc/gsf.types b/doc/gsf.types new file mode 100644 index 0000000..6fcf2aa --- /dev/null +++ b/doc/gsf.types @@ -0,0 +1,83 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +gsf_blob_get_type +gsf_clip_data_get_type +gsf_doc_meta_data_get_type +gsf_docprop_vector_get_type +gsf_infile_get_type +gsf_infile_msole_get_type +gsf_infile_msvba_get_type +gsf_infile_stdio_get_type +gsf_infile_zip_get_type +gsf_input_get_type +gsf_input_gzip_get_type +gsf_input_memory_get_type +gsf_input_proxy_get_type +gsf_input_stdio_get_type +gsf_input_textline_get_type +gsf_outfile_get_type +gsf_outfile_msole_get_type +gsf_outfile_stdio_get_type +gsf_outfile_zip_get_type +gsf_output_bzip_get_type +gsf_output_csv_get_type +gsf_output_get_type +gsf_output_gzip_get_type +gsf_output_iconv_get_type +gsf_output_iochannel_get_type +gsf_output_memory_get_type +gsf_output_stdio_get_type +gsf_shared_memory_get_type +gsf_structured_blob_get_type +gsf_timestamp_get_type +gsf_xml_out_get_type diff --git a/doc/html/api.html b/doc/html/api.html new file mode 100644 index 0000000..e96fbc8 --- /dev/null +++ b/doc/html/api.html @@ -0,0 +1,113 @@ + + + + +Part V. API Reference + + + + + + + + + + + + + + + + +
+

+Part V. API Reference

+
+
+

+The core of GSF's API deals with basic I/O, an abstraction layer that +provides a uniform interface to several mechanisms that provide streams of +data and a set of parsers for various structured types of data streams. +

+ +
+
+ + + \ No newline at end of file diff --git a/doc/html/dependencies.html b/doc/html/dependencies.html new file mode 100644 index 0000000..4e936dc --- /dev/null +++ b/doc/html/dependencies.html @@ -0,0 +1,120 @@ + + + + +Part III. GSF: Dependencies + + + + + + + + + + + + + + + + +
+

+Part III. GSF: Dependencies

+

+GSF depends on the following libraries: +

+
++ + + + + + + + + + +

GLib

+A general-purpose utility library, not specific to graphical user interfaces. +GLib provides many useful data types, macros, type conversions, +string utilities, file utilities, a main loop abstraction, and so on. +

Libxml2

+A library that provides a parser and toolkit for XML, the Extensible Markup Language. +XML is a metalanguage used to define markup languages (text languages where +structure and semantics are added to the content using extra "markup" +information). +

+

+ +The core GSF library can be built to also utilize the following libraries: +

+
++ + + + + + + + + + +

zlib

+A data +compression library that implements the DEFLATE algorithm used in gzip. +

libbz2

+A data compression library that implements the algorithm used in bzip2. +

+

+ +A separate GSF library can be built that offers additional functionality for +use in the GNOME desktop environment. That library has the following +additional requirements: +

+
++ + + + + + + + + + + + + + +

libbonobo-2.0

+Bonobo +is the GNOME architecture for creating reusable software components and +compound documents. +

gnome-vfs-2.0

+GnomeVFS +is a filesystem abstraction library that allows applications plugable +transparent access to a variety of "real" filesystems, including networked +filesystems like WebDAV, storage on devices like digital cameras, to the +local filesystem. +

gio-2.0

+GIO +is striving to provide a modern, easy-to-use VFS API that sits at the right +level in the library stack. The goal is to overcome the shortcomings of +GnomeVFS and provide an API that is so good that developers prefer it over +raw POSIX calls. Among other things that means using GObject. It also means +not cloning the POSIX API, but providing higher-level, document-centric interfaces. +

+

+ +

+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-Bononbo.html b/doc/html/gsf-Bononbo.html new file mode 100644 index 0000000..0075013 --- /dev/null +++ b/doc/html/gsf-Bononbo.html @@ -0,0 +1,166 @@ + + + + +Bononbo + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

Bononbo

+

Bononbo

+
+
+

Synopsis

+
                    GsfInputBonobo;
+GsfInput *          gsf_input_bonobo_new                (Bonobo_Stream const stream,
+                                                         GError **err);
+                    GsfOutputBonobo;
+GsfOutput *         gsf_output_bonobo_new               (Bonobo_Stream const stream,
+                                                         GError **err);
+                    GsfSharedBonoboStream;
+GsfSharedBonoboStream * gsf_shared_bonobo_stream_new    (Bonobo_Stream stream);
+
+
+
+

Description

+

+

+
+
+

Details

+
+

GsfInputBonobo

+
typedef struct _GsfInputBonobo GsfInputBonobo;
+

+

+
+
+
+

gsf_input_bonobo_new ()

+
GsfInput *          gsf_input_bonobo_new                (Bonobo_Stream const stream,
+                                                         GError **err);
+

+

+
++ + + + + + + + + + + + + + +

stream :

+

err :

+

Returns :

+
+
+
+
+

GsfOutputBonobo

+
typedef struct _GsfOutputBonobo GsfOutputBonobo;
+

+

+
+
+
+

gsf_output_bonobo_new ()

+
GsfOutput *         gsf_output_bonobo_new               (Bonobo_Stream const stream,
+                                                         GError **err);
+

+

+
++ + + + + + + + + + + + + + +

stream :

+

err :

+

Returns :

+
+
+
+
+

GsfSharedBonoboStream

+
typedef struct {
+	GObject g_object;
+	Bonobo_Stream stream;
+	CORBA_long pos;
+} GsfSharedBonoboStream;
+
+

+

+
+
+
+

gsf_shared_bonobo_stream_new ()

+
GsfSharedBonoboStream * gsf_shared_bonobo_stream_new    (Bonobo_Stream stream);
+

+

+
++ + + + + + + + + + +

stream :

+

Returns :

+
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-Compression.html b/doc/html/gsf-Compression.html new file mode 100644 index 0000000..fd67a40 --- /dev/null +++ b/doc/html/gsf-Compression.html @@ -0,0 +1,267 @@ + + + + +Compression + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

Compression

+

Compression

+
+ +
+

Object Hierarchy

+
+  GObject
+   +----GsfInput
+         +----GsfInputGZip
+
+
+  GObject
+   +----GsfOutput
+         +----GsfOutputGZip
+
+
+  GObject
+   +----GsfOutput
+         +----GsfOutputBzip
+
+
+
+

Properties

+
+  "raw"                      gboolean              : Read / Write / Construct Only
+  "source"                   GsfInput*             : Read / Write / Construct Only
+  "uncompressed-size"        gint64                : Read / Write / Construct Only
+  "raw"                      gboolean              : Read / Write / Construct Only
+  "sink"                     GsfOutput*            : Read / Write / Construct Only
+
+
+
+

Description

+

+

+
+
+

Details

+
+

GsfInputGZip

+
typedef struct _GsfInputGZip GsfInputGZip;
+

+

+
+
+
+

gsf_input_gzip_new ()

+
GsfInput *          gsf_input_gzip_new                  (GsfInput *source,
+                                                         GError **err);
+

+Adds a reference to source. +

+
++ + + + + + + + + + + + + + +

source :

The underlying data source. +

err :

optionally NULL. +

Returns :

a new file or NULL. +
+
+
+
+

gsf_input_memory_new_from_bzip ()

+
GsfInput *          gsf_input_memory_new_from_bzip      (GsfInput *source,
+                                                         GError **err);
+
++ + + + + + + + + + + + + + +

source :

a GsfInput +

err :

a GError +

Returns :

a new GsfInputMemory or NULL. +
+
+
+
+

GsfOutputGZip

+
typedef struct _GsfOutputGZip GsfOutputGZip;
+

+

+
+
+
+

gsf_output_gzip_new ()

+
GsfOutput *         gsf_output_gzip_new                 (GsfOutput *sink,
+                                                         GError **err);
+

+Adds a reference to sink. +

+
++ + + + + + + + + + + + + + +

sink :

The underlying data source. +

err :

optionally NULL. +

Returns :

a new file or NULL. +
+
+
+
+

GsfOutputBzip

+
typedef struct _GsfOutputBzip GsfOutputBzip;
+

+

+
+
+
+

gsf_output_bzip_new ()

+
GsfOutput *         gsf_output_bzip_new                 (GsfOutput *sink,
+                                                         GError **err);
+

+Adds a reference to sink. +

+
++ + + + + + + + + + + + + + +

sink :

The underlying data source. +

err :

optionally NULL. +

Returns :

a new file or NULL. +
+
+
+
+

Property Details

+
+

The "raw" property

+
  "raw"                      gboolean              : Read / Write / Construct Only
+

Whether to read compressed data with no header and no trailer.

+

Default value: FALSE

+
+
+
+

The "source" property

+
  "source"                   GsfInput*             : Read / Write / Construct Only
+

Where the compressed data comes from.

+
+
+
+

The "uncompressed-size" property

+
  "uncompressed-size"        gint64                : Read / Write / Construct Only
+

The source's uncompressed size.

+

Allowed values: >= -1

+

Default value: -1

+
+
+
+

The "raw" property

+
  "raw"                      gboolean              : Read / Write / Construct Only
+

Whether to write compressed data with no header/tailer.

+

Default value: FALSE

+
+
+
+

The "sink" property

+
  "sink"                     GsfOutput*            : Read / Write / Construct Only
+

Where the compressed data is written.

+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-GIO.html b/doc/html/gsf-GIO.html new file mode 100644 index 0000000..a457c10 --- /dev/null +++ b/doc/html/gsf-GIO.html @@ -0,0 +1,222 @@ + + + + +GIO + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GIO

+

GIO

+
+
+

Synopsis

+
                    GsfInputGio;
+GsfInput *          gsf_input_gio_new                   (GFile *file,
+                                                         GError **err);
+GsfInput *          gsf_input_gio_new_for_path          (char const *path,
+                                                         GError **err);
+GsfInput *          gsf_input_gio_new_for_uri           (char const *uri,
+                                                         GError **err);
+                    GsfOutputGio;
+GsfOutput *         gsf_output_gio_new                  (GFile *file);
+GsfOutput *         gsf_output_gio_new_for_path         (char const *path,
+                                                         GError **err);
+GsfOutput *         gsf_output_gio_new_for_uri          (char const *uri,
+                                                         GError **err);
+
+
+
+

Description

+

+

+
+
+

Details

+
+

GsfInputGio

+
typedef struct _GsfInputGio GsfInputGio;
+

+

+
+
+
+

gsf_input_gio_new ()

+
GsfInput *          gsf_input_gio_new                   (GFile *file,
+                                                         GError **err);
+
++ + + + + + + + + + +

err :

optionally NULL. +

Returns :

A new GsfInputGio or NULL +
+
+
+
+

gsf_input_gio_new_for_path ()

+
GsfInput *          gsf_input_gio_new_for_path          (char const *path,
+                                                         GError **err);
+
++ + + + + + + + + + +

err :

optionally NULL. +

Returns :

A new GsfInputGio or NULL +
+
+
+
+

gsf_input_gio_new_for_uri ()

+
GsfInput *          gsf_input_gio_new_for_uri           (char const *uri,
+                                                         GError **err);
+
++ + + + + + + + + + +

err :

optionally NULL. +

Returns :

A new GsfInputGio or NULL +
+
+
+
+

GsfOutputGio

+
typedef struct _GsfOutputGio GsfOutputGio;
+

+

+
+
+
+

gsf_output_gio_new ()

+
GsfOutput *         gsf_output_gio_new                  (GFile *file);
+

+

+
++ + + + + + + + + + +

file :

+

Returns :

+
+
+
+
+

gsf_output_gio_new_for_path ()

+
GsfOutput *         gsf_output_gio_new_for_path         (char const *path,
+                                                         GError **err);
+

+

+
++ + + + + + + + + + + + + + +

path :

+

err :

+

Returns :

+
+
+
+
+

gsf_output_gio_new_for_uri ()

+
GsfOutput *         gsf_output_gio_new_for_uri          (char const *uri,
+                                                         GError **err);
+

+

+
++ + + + + + + + + + + + + + +

uri :

+

err :

+

Returns :

+
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-GIOChannel.html b/doc/html/gsf-GIOChannel.html new file mode 100644 index 0000000..712212a --- /dev/null +++ b/doc/html/gsf-GIOChannel.html @@ -0,0 +1,93 @@ + + + + +GIOChannel + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GIOChannel

+

GIOChannel

+
+ +
+

Object Hierarchy

+
+  GObject
+   +----GsfOutput
+         +----GsfOutputIOChannel
+
+
+
+

Description

+

+

+
+
+

Details

+
+

GsfOutputIOChannel

+
typedef struct _GsfOutputIOChannel GsfOutputIOChannel;
+

+

+
+
+
+

gsf_output_iochannel_new ()

+
GsfOutput *         gsf_output_iochannel_new            (GIOChannel *channel);
+
++ + + + + + + + + + +

channel :

A GIOChannel +

Returns :

a new file or NULL. +
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-GnomeVFS.html b/doc/html/gsf-GnomeVFS.html new file mode 100644 index 0000000..35fe72e --- /dev/null +++ b/doc/html/gsf-GnomeVFS.html @@ -0,0 +1,213 @@ + + + + +GnomeVFS + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GnomeVFS

+

GnomeVFS

+
+
+

Synopsis

+
                    GsfInputGnomeVFS;
+GsfInput *          gsf_input_gnomevfs_new              (char const *uri,
+                                                         GError **error);
+GsfInput *          gsf_input_gnomevfs_new_uri          (GnomeVFSURI *uri,
+                                                         GError **error);
+gboolean            gsf_input_gnomevfs_needs_local_copy (GsfInputGnomeVFS *vfs_input);
+                    GsfOutputGnomeVFS;
+GsfOutput *         gsf_output_gnomevfs_new             (char const *filename,
+                                                         GError **err);
+GsfOutput *         gsf_output_gnomevfs_new_uri         (GnomeVFSURI *uri,
+                                                         GError **err);
+
+
+
+

Description

+

+

+
+
+

Details

+
+

GsfInputGnomeVFS

+
typedef struct _GsfInputGnomeVFS GsfInputGnomeVFS;
+

+

+
+
+
+

gsf_input_gnomevfs_new ()

+
GsfInput *          gsf_input_gnomevfs_new              (char const *uri,
+                                                         GError **error);
+

+

+
++ + + + + + + + + + + + + + +

uri :

+

error :

+

Returns :

+
+
+
+
+

gsf_input_gnomevfs_new_uri ()

+
GsfInput *          gsf_input_gnomevfs_new_uri          (GnomeVFSURI *uri,
+                                                         GError **error);
+

+

+
++ + + + + + + + + + + + + + +

uri :

+

error :

+

Returns :

+
+
+
+
+

gsf_input_gnomevfs_needs_local_copy ()

+
gboolean            gsf_input_gnomevfs_needs_local_copy (GsfInputGnomeVFS *vfs_input);
+

+

+
++ + + + + + + + + + +

vfs_input :

+

Returns :

+
+
+
+
+

GsfOutputGnomeVFS

+
typedef struct _GsfOutputGnomeVFS GsfOutputGnomeVFS;
+

+

+
+
+
+

gsf_output_gnomevfs_new ()

+
GsfOutput *         gsf_output_gnomevfs_new             (char const *filename,
+                                                         GError **err);
+

+

+
++ + + + + + + + + + + + + + +

filename :

+

err :

+

Returns :

+
+
+
+
+

gsf_output_gnomevfs_new_uri ()

+
GsfOutput *         gsf_output_gnomevfs_new_uri         (GnomeVFSURI *uri,
+                                                         GError **err);
+

+

+
++ + + + + + + + + + + + + + +

uri :

+

err :

+

Returns :

+
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-Infile-reading-structed-files.html b/doc/html/gsf-Infile-reading-structed-files.html new file mode 100644 index 0000000..37cd9e1 --- /dev/null +++ b/doc/html/gsf-Infile-reading-structed-files.html @@ -0,0 +1,266 @@ + + + + +Infile reading structed files + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

Infile reading structed files

+

Infile reading structed files

+
+
+

Synopsis

+
                    GsfInfile;
+int                 gsf_infile_num_children             (GsfInfile *infile);
+GsfInput *          gsf_infile_child_by_index           (GsfInfile *infile,
+                                                         int i);
+GsfInput *          gsf_infile_child_by_name            (GsfInfile *infile,
+                                                         char const *name);
+GsfInput *          gsf_infile_child_by_vname           (GsfInfile *infile,
+                                                         ...);
+GsfInput *          gsf_infile_child_by_aname           (GsfInfile *infile,
+                                                         char const *names[]);
+GsfInput *          gsf_infile_child_by_vaname          (GsfInfile *infile,
+                                                         va_list names);
+char const *        gsf_infile_name_by_index            (GsfInfile *infile,
+                                                         int i);
+
+
+
+

Object Hierarchy

+
+  GObject
+   +----GsfInput
+         +----GsfInfile
+               +----GsfInfileMSOle
+               +----GsfInfileStdio
+               +----GsfInfileZip
+               +----GsfStructuredBlob
+
+
+
+

Description

+

+

+
+
+

Details

+
+

GsfInfile

+
typedef struct _GsfInfile GsfInfile;
+

+

+
+
+
+

gsf_infile_num_children ()

+
int                 gsf_infile_num_children             (GsfInfile *infile);
+
++ + + + + + + + + + +

infile :

the structured storage +

Returns :

the number of children the storage has, or -1 if the storage can not + have children. +
+
+
+
+

gsf_infile_child_by_index ()

+
GsfInput *          gsf_infile_child_by_index           (GsfInfile *infile,
+                                                         int i);
+

+TODO : For 2.0 api will change to include a GError. +

+
++ + + + + + + + + + + + + + +

infile :

+GsfInfile +

i :

target index +

Returns :

a newly created child which must be unrefed. +
+
+
+
+

gsf_infile_child_by_name ()

+
GsfInput *          gsf_infile_child_by_name            (GsfInfile *infile,
+                                                         char const *name);
+

+TODO : For 2.0 api will change to include a GError. +

+
++ + + + + + + + + + + + + + +

infile :

+GsfInfile +

name :

target name +

Returns :

a newly created child which must be unrefed. +
+
+
+
+

gsf_infile_child_by_vname ()

+
GsfInput *          gsf_infile_child_by_vname           (GsfInfile *infile,
+                                                         ...);
+
++ + + + + + + + + + +

... :

A NULL terminated list of names +

Returns :

a newly created child which must be unrefed. +
+
+
+
+

gsf_infile_child_by_aname ()

+
GsfInput *          gsf_infile_child_by_aname           (GsfInfile *infile,
+                                                         char const *names[]);
+

+New in 1.14.9. +

+
++ + + + + + + + + + + + + + +

infile :

+GsfInfile +

names :

A NULL terminated array of names (e.g. from g_strsplit) +

Returns :

a newly created child which must be unrefed. +
+
+
+
+

gsf_infile_child_by_vaname ()

+
GsfInput *          gsf_infile_child_by_vaname          (GsfInfile *infile,
+                                                         va_list names);
+

+New in 1.14.9. +

+
++ + + + + + + + + + + + + + +

infile :

+GsfInfile +

names :

A NULL terminated array of names (e.g. from g_strsplit) +

Returns :

a newly created child which must be unrefed. +
+
+
+
+

gsf_infile_name_by_index ()

+
char const *        gsf_infile_name_by_index            (GsfInfile *infile,
+                                                         int i);
+
++ + + + +

Returns :

the utf8 encoded name of the i-th child + DO NOT FREE THE STRING. +
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-Input-from-unstructured-files.html b/doc/html/gsf-Input-from-unstructured-files.html new file mode 100644 index 0000000..8d1082e --- /dev/null +++ b/doc/html/gsf-Input-from-unstructured-files.html @@ -0,0 +1,623 @@ + + + + +Input from unstructured files + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

Input from unstructured files

+

Input from unstructured files

+
+
+

Synopsis

+
                    GsfInput;
+guint8 const *      gsf_input_read                      (GsfInput *input,
+                                                         size_t num_bytes,
+                                                         guint8 *optional_buffer);
+gsf_off_t           gsf_input_tell                      (GsfInput *input);
+gboolean            gsf_input_seek                      (GsfInput *input,
+                                                         gsf_off_t offset,
+                                                         GSeekType whence);
+GsfInfile *         gsf_input_container                 (GsfInput *input);
+GsfInput *          gsf_input_dup                       (GsfInput *input,
+                                                         GError **err);
+gsf_off_t           gsf_input_size                      (GsfInput *input);
+gboolean            gsf_input_eof                       (GsfInput *input);
+gsf_off_t           gsf_input_remaining                 (GsfInput *input);
+GQuark              gsf_input_error_id                  (void);
+GsfInput *          gsf_input_sibling                   (GsfInput const *input,
+                                                         char const *name,
+                                                         GError **err);
+GQuark              gsf_input_error                     (void);
+char const   *      gsf_input_name                      (GsfInput *input);
+gboolean            gsf_input_set_name_from_filename    (GsfInput *input,
+                                                         char const *filename);
+                    GsfInputProxy;
+GsfInput *          gsf_input_proxy_new                 (GsfInput *source);
+GsfInput *          gsf_input_proxy_new_section         (GsfInput *source,
+                                                         gsf_off_t offset,
+                                                         gsf_off_t size);
+
+gboolean            gsf_input_copy                      (GsfInput *input,
+                                                         GsfOutput *output);
+GsfInput *          gsf_input_uncompress                (GsfInput *src);
+
+
+
+

Object Hierarchy

+
+  GObject
+   +----GsfInput
+         +----GsfInfile
+         +----GsfInputGZip
+         +----GsfInputMemory
+         +----GsfInputProxy
+         +----GsfInputStdio
+         +----GsfInputTextline
+
+
+  GObject
+   +----GsfInput
+         +----GsfInputProxy
+
+
+
+

Properties

+
+  "eof"                      gboolean              : Read
+  "name"                     gchar*                : Read
+  "position"                 gint64                : Read
+  "remaining"                gint64                : Read
+  "size"                     gint64                : Read
+
+
+
+

Description

+

+

+
+
+

Details

+
+

GsfInput

+
typedef struct _GsfInput GsfInput;
+

+Class representing an input stream. +

+
+
+
+

gsf_input_read ()

+
guint8 const *      gsf_input_read                      (GsfInput *input,
+                                                         size_t num_bytes,
+                                                         guint8 *optional_buffer);
+

+Read at least num_bytes. Does not change the current position if there +is an error. Will only read if the entire amount can be read. Invalidates +the buffer associated with previous calls to gsf_input_read. +

+
++ + + + + + + + + + + + + + + + + + +

input :

the input stream +

num_bytes :

number of bytes to read +

optional_buffer :

+NULL, or pointer to destination memory area +

Returns :

pointer to the buffer or NULL if there is an error or 0 bytes are + requested. +
+
+
+
+

gsf_input_tell ()

+
gsf_off_t           gsf_input_tell                      (GsfInput *input);
+
++ + + + + + + + + + +

input :

the input stream +

Returns :

the current offset in the file. +
+
+
+
+

gsf_input_seek ()

+
gboolean            gsf_input_seek                      (GsfInput *input,
+                                                         gsf_off_t offset,
+                                                         GSeekType whence);
+

+Move the current location in the input stream. +

+
++ + + + + + + + + + + + + + + + + + +

input :

the input stream +

offset :

target offset +

whence :

determines whether the offset is relative to the beginning or + the end of the stream, or to the current location. +

Returns :

TRUE on error. +
+
+
+
+

gsf_input_container ()

+
GsfInfile *         gsf_input_container                 (GsfInput *input);
+
++ + + + + + + + + + +

input :

the input stream +

Returns :

but does not add a reference to input's container. + Potentially NULL +
+
+
+
+

gsf_input_dup ()

+
GsfInput *          gsf_input_dup                       (GsfInput *input,
+                                                         GError **err);
+

+Duplicates input src leaving the new one at the same offset. +

+
++ + + + + + + + + + + + + + +

input :

The input to duplicate +

err :

optionally NULL +

Returns :

the duplicate, or NULL on error +
+
+
+
+

gsf_input_size ()

+
gsf_off_t           gsf_input_size                      (GsfInput *input);
+

+Looks up and caches the number of bytes in the input +

+
++ + + + + + + + + + +

input :

The input +

Returns :

the size or -1 on error +
+
+
+
+

gsf_input_eof ()

+
gboolean            gsf_input_eof                       (GsfInput *input);
+

+Are we at the end of the file ? +

+
++ + + + + + + + + + +

input :

the input +

Returns :

TRUE if the input is at the eof. +
+
+
+
+

gsf_input_remaining ()

+
gsf_off_t           gsf_input_remaining                 (GsfInput *input);
+
++ + + + + + + + + + +

input :

the input stream +

Returns :

the number of bytes left in the file. +
+
+
+
+

gsf_input_error_id ()

+
GQuark              gsf_input_error_id                  (void);
+
++ + + + +

Returns :

A utility quark to flag a GError as being an input problem. +
+
+
+
+

gsf_input_sibling ()

+
GsfInput *          gsf_input_sibling                   (GsfInput const *input,
+                                                         char const *name,
+                                                         GError **err);
+

+

+
++ + + + + + + + + + + + + + + + + + +

input :

+

name :

+

err :

+

Returns :

+
+
+
+
+

gsf_input_error ()

+
GQuark              gsf_input_error                     (void);
+

+Deprecated as of GSF 1.12.0; use gsf_input_error_id() instead. +

+
++ + + + +

Returns :

A utility quark to flag a GError as being an input problem. +
+
+
+
+

gsf_input_name ()

+
char const   *      gsf_input_name                      (GsfInput *input);
+

+The name of the input stream. +

+
++ + + + + + + + + + +

input :

the input stream +

Returns :

input's name in utf8 form, or NULL if it has no name. +
+
+
+
+

gsf_input_set_name_from_filename ()

+
gboolean            gsf_input_set_name_from_filename    (GsfInput *input,
+                                                         char const *filename);
+

+protected. +

+
++ + + + + + + + + + + + + + +

input :

the input stream +

filename :

the (fs-sys encoded) filename +

Returns :

TRUE if the assignment was ok. +
+
+
+
+

GsfInputProxy

+
typedef struct _GsfInputProxy GsfInputProxy;
+

+

+
+
+
+

gsf_input_proxy_new ()

+
GsfInput *          gsf_input_proxy_new                 (GsfInput *source);
+

+This creates a new proxy to the entire, given input source. See +gsf_input_proxy_new_section for details. +

+
++ + + + + + + + + + +

source :

The underlying data source. +

Returns :

a new input object. +
+
+
+
+

gsf_input_proxy_new_section ()

+
GsfInput *          gsf_input_proxy_new_section         (GsfInput *source,
+                                                         gsf_off_t offset,
+                                                         gsf_off_t size);
+

+This creates a new proxy to a section of the given source. The new +object will have its own current position, but any operation on it +can change the source's position. +

+

+If a proxy to a proxy is created, the intermediate proxy is short- +circuited. +

+

+This function will ref the source. +

+
++ + + + + + + + + + + + + + + + + + +

source :

The underlying data source. +

offset :

Offset into source for start of section. +

size :

Length of section. +

Returns :

a new input object. +
+
+
+
+

gsf_input_copy ()

+
gboolean            gsf_input_copy                      (GsfInput *input,
+                                                         GsfOutput *output);
+

+Copy the contents from input to output from their respective +current positions. So if you want to be sure to copy *everything*, +make sure to call gsf_input_seek (input, 0, G_SEEK_SET) and +gsf_output_seek (output, 0, G_SEEK_SET) first, if applicable. +

+
++ + + + + + + + + + + + + + +

input :

a non-null GsfInput +

output :

a non-null GsfOutput +

Returns :

TRUE on Success +
+
+
+
+

gsf_input_uncompress ()

+
GsfInput *          gsf_input_uncompress                (GsfInput *src);
+

+This functions takes ownership of the incoming reference and yields a +new one as its output. +

+
++ + + + + + + + + + +

src :

stream to be uncompressed. +

Returns :

A stream equivalent to the source stream, but uncompressed if +the source was compressed. +
+
+
+
+

Property Details

+
+

The "eof" property

+
  "eof"                      gboolean              : Read
+

End Of File.

+

Default value: FALSE

+
+
+
+

The "name" property

+
  "name"                     gchar*                : Read
+

The Input's Name.

+

Default value: NULL

+
+
+
+

The "position" property

+
  "position"                 gint64                : Read
+

The Output's Current Position.

+

Allowed values: >= 0

+

Default value: 0

+
+
+
+

The "remaining" property

+
  "remaining"                gint64                : Read
+

Amount of Data Remaining.

+

Allowed values: >= 0

+

Default value: 0

+
+
+
+

The "size" property

+
  "size"                     gint64                : Read
+

The Input's Size.

+

Allowed values: >= 0

+

Default value: 0

+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-MS-OLE2.html b/doc/html/gsf-MS-OLE2.html new file mode 100644 index 0000000..5c8ca7c --- /dev/null +++ b/doc/html/gsf-MS-OLE2.html @@ -0,0 +1,547 @@ + + + + +MS OLE2 + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

MS OLE2

+

MS OLE2

+
+ +
+

Object Hierarchy

+
+  GObject
+   +----GsfInput
+         +----GsfInfile
+               +----GsfInfileMSOle
+
+
+  GObject
+   +----GsfOutput
+         +----GsfOutfile
+               +----GsfOutfileMSOle
+
+
+
+

Description

+

+

+
+
+

Details

+
+

GsfInfileMSOle

+
typedef struct _GsfInfileMSOle GsfInfileMSOle;
+

+

+
+
+
+

gsf_infile_msole_new ()

+
GsfInfile *         gsf_infile_msole_new                (GsfInput *source,
+                                                         GError **err);
+

+Opens the root directory of an MS OLE file. +

+
+

Note

This adds a reference to source.
+

+

+
++ + + + + + + + + + + + + + +

source :

+GsfInput +

err :

optional place to store an error +

Returns :

the new ole file handler +
+
+
+
+

gsf_infile_msole_get_class_id ()

+
gboolean            gsf_infile_msole_get_class_id       (GsfInfileMSOle const *ole,
+                                                         guint8 *res);
+

+Retrieves the 16 byte indentifier (often a GUID in MS Windows apps) +stored within the directory associated with ole and stores it in res. +

+
++ + + + + + + + + + + + + + +

ole :

a GsfInfileMSOle +

res :

16 byte identifier (often a GUID in MS Windows apps) +

Returns :

TRUE on success +
+
+
+
+

GsfOutfileMSOle

+
typedef struct _GsfOutfileMSOle GsfOutfileMSOle;
+

+

+
+
+
+

gsf_outfile_msole_new ()

+
GsfOutfile *        gsf_outfile_msole_new               (GsfOutput *sink);
+

+Creates the root directory of an MS OLE file and manages the addition of +children. +

+

+

+
+

Note

This adds a reference to sink.
+

+

+
++ + + + + + + + + + +

sink :

a GsfOutput to hold the OLE2 file +

Returns :

the new ole file handler. +
+
+
+
+

gsf_outfile_msole_new_full ()

+
GsfOutfile *        gsf_outfile_msole_new_full          (GsfOutput *sink,
+                                                         guint bb_size,
+                                                         guint sb_size);
+

+Creates the root directory of an MS OLE file and manages the addition of +children. +

+

+

+
+

Note

This adds a reference to sink.
+

+

+
++ + + + + + + + + + + + + + + + + + +

sink :

a GsfOutput to hold the OLE2 file. +

bb_size :

size of large blocks. +

sb_size :

size of small blocks. +

Returns :

the new ole file handler. +
+
+
+
+

gsf_outfile_msole_set_class_id ()

+
gboolean            gsf_outfile_msole_set_class_id      (GsfOutfileMSOle *ole,
+                                                         guint8 const *clsid);
+

+Write clsid to the directory associated with ole. +

+
++ + + + + + + + + + + + + + +

ole :

a GsfOutfileMSOle +

clsid :

16 byte identifier (often a GUID in MS Windows apps) +

Returns :

TRUE on success. +
+
+
+
+

gsf_msole_metadata_read ()

+
GError *            gsf_msole_metadata_read             (GsfInput *in,
+                                                         GsfDocMetaData *accum);
+

+Read a stream formated as a set of MS OLE properties from in and store the +results in accum. +

+
++ + + + + + + + + + + + + + +

in :

+GsfInput +

accum :

+GsfDocMetaData +

Returns :

GError which the caller must free on error. +
+
+
+
+

gsf_msole_metadata_write ()

+
gboolean            gsf_msole_metadata_write            (GsfOutput *out,
+                                                         GsfDocMetaData const *meta_data,
+                                                         gboolean doc_not_component);
+
++ + + + + + + + + + + + + + + + + + +

out :

+GsfOutput +

meta_data :

+GsfDocMetaData +

doc_not_component :

a kludge to differentiate DocumentSummary from Summary +

Returns :

TRUE on success; +
+
+
+
+

gsf_msole_iconv_open_codepages_for_export ()

+
GIConv              gsf_msole_iconv_open_codepages_for_export
+                                                        (int codepage_to,
+                                                         char const *from);
+
++ + + + +

Returns :

an iconv converter to go from utf8 -> to our best guess at a useful + windows codepage. +
+
+
+
+

gsf_msole_iconv_open_codepage_for_import ()

+
GIConv              gsf_msole_iconv_open_codepage_for_import
+                                                        (char const *to,
+                                                         int codepage);
+
++ + + + +

Returns :

an iconv converter for codepage -> utf8. +
+
+
+
+

gsf_msole_iconv_open_for_export ()

+
GIConv              gsf_msole_iconv_open_for_export     (void);
+
++ + + + +

Returns :

an iconv convert to go from utf8 -> to our best guess at a useful + windows codepage. +
+
+
+
+

gsf_msole_iconv_open_codepage_for_export ()

+
GIConv              gsf_msole_iconv_open_codepage_for_export
+                                                        (int codepage_to);
+
++ + + + +

Returns :

an iconv converter to go from utf8 -> to our best guess at a useful + windows codepage. +
+
+
+
+

gsf_msole_iconv_open_for_import ()

+
GIConv              gsf_msole_iconv_open_for_import     (int codepage);
+
++ + + + +

Returns :

an iconv converter for single byte encodings codepage -> utf8. + Attempt to handle the semantics of a specification for multibyte encodings + since this is only supposed to be used for single bytes. +
+
+
+
+

gsf_msole_iconv_win_codepage ()

+
int                 gsf_msole_iconv_win_codepage        (void);
+
++ + + + +

Returns :

our best guess at the applicable windows code page based on an + environment variable or the current locale. +
+
+
+
+

gsf_msole_codepage_to_lid ()

+
guint               gsf_msole_codepage_to_lid           (int codepage);
+

+

+
++ + + + + + + + + + +

codepage :

+

Returns :

+
+
+
+
+

gsf_msole_lid_to_codepage ()

+
int                 gsf_msole_lid_to_codepage           (guint lid);
+
++ + + + +

Returns :

our best guess at the codepage for the given language id +
+
+
+
+

gsf_msole_lid_to_codepage_str ()

+
gchar *             gsf_msole_lid_to_codepage_str       (guint lid);
+
++ + + + +

Returns :

the Iconv codepage string for the given LID. + Return value must be g_free()'d +
+
+
+
+

gsf_msole_lid_for_language ()

+
guint               gsf_msole_lid_for_language          (char const *lang);
+
++ + + + +

Returns :

the LID (Language Identifier) for the input language. + If lang is null, return 0x0400 ("-none-"), and not 0x0000 ("no proofing") +
+
+
+
+

gsf_msole_language_for_lid ()

+
char const *        gsf_msole_language_for_lid          (guint lid);
+
++ + + + +

Returns :

the xx_YY style string (can be just xx or xxx) for the given LID. + Return value must not be freed. If the LID is not found, is set to + 0x0400, or is set to 0x0000, will return "-none-" +
+
+
+
+

gsf_msole_inflate ()

+
GByteArray *        gsf_msole_inflate                   (GsfInput *input,
+                                                         gsf_off_t offset);
+

+Decompresses an LZ compressed stream. +

+
++ + + + + + + + + + + + + + +

input :

stream to read from +

offset :

offset into it for start byte of compresse stream +

Returns :

A GByteArray that the caller is responsible for freeing +
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-OASIS-Open-Document.html b/doc/html/gsf-OASIS-Open-Document.html new file mode 100644 index 0000000..4199ffd --- /dev/null +++ b/doc/html/gsf-OASIS-Open-Document.html @@ -0,0 +1,146 @@ + + + + +OASIS Open Document + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

OASIS Open Document

+

OASIS Open Document

+
+ +
+

Description

+

+

+
+
+

Details

+
+

gsf_opendoc_metadata_read ()

+
GError *            gsf_opendoc_metadata_read           (GsfInput *input,
+                                                         GsfDocMetaData *md);
+

+Read an OpenDocument metadata stream from input and store the properties +into md. Overwrite any existing properties with the same id. +

+
++ + + + + + + + + + + + + + +

input :

+GsfInput +

md :

+GsfDocMetaData +

Returns :

a GError if there is a problem. +
+
+
+
+

gsf_opendoc_metadata_subtree ()

+
void                gsf_opendoc_metadata_subtree        (GsfXMLIn *doc,
+                                                         GsfDocMetaData *md);
+

+Extend xin so that it can parse a subtree in OpenDoc metadata format +

+
++ + + + + + + + + + +

doc :

+GsfXMLInDoc +

md :

+GsfDocMetaData +
+
+
+
+

gsf_opendoc_metadata_write ()

+
gboolean            gsf_opendoc_metadata_write          (GsfXMLOut *output,
+                                                         GsfDocMetaData const *md);
+

+

+
++ + + + + + + + + + + + + + +

output :

+

md :

+

Returns :

+
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-Outfile-writing-structed-files.html b/doc/html/gsf-Outfile-writing-structed-files.html new file mode 100644 index 0000000..ac821ed --- /dev/null +++ b/doc/html/gsf-Outfile-writing-structed-files.html @@ -0,0 +1,202 @@ + + + + +Outfile writing structed files + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

Outfile writing structed files

+

Outfile writing structed files

+
+
+

Synopsis

+
                    GsfOutfile;
+GsfOutput *         gsf_outfile_new_child               (GsfOutfile *outfile,
+                                                         char const *name,
+                                                         gboolean is_dir);
+GsfOutput *         gsf_outfile_new_child_full          (GsfOutfile *outfile,
+                                                         char const *name,
+                                                         gboolean is_dir,
+                                                         char const *first_property_name,
+                                                         ...);
+GsfOutput *         gsf_outfile_new_child_varg          (GsfOutfile *outfile,
+                                                         char const *name,
+                                                         gboolean is_dir,
+                                                         char const *first_property_name,
+                                                         va_list args);
+
+
+
+

Object Hierarchy

+
+  GObject
+   +----GsfOutput
+         +----GsfOutfile
+               +----GsfOutfileMSOle
+               +----GsfOutfileStdio
+               +----GsfOutfileZip
+
+
+
+

Description

+

+

+
+
+

Details

+
+

GsfOutfile

+
typedef struct _GsfOutfile GsfOutfile;
+

+Class representing an output file, counterpart to GsfInfile. +

+
+
+
+

gsf_outfile_new_child ()

+
GsfOutput *         gsf_outfile_new_child               (GsfOutfile *outfile,
+                                                         char const *name,
+                                                         gboolean is_dir);
+
++ + + + + + + + + + + + + + + + + + +

outfile :

A GsfOutfile +

name :

The name of the new child to create +

is_dir :

+TRUE to create a directory, FALSE to create a plain file +

Returns :

a newly created child +
+
+
+
+

gsf_outfile_new_child_full ()

+
GsfOutput *         gsf_outfile_new_child_full          (GsfOutfile *outfile,
+                                                         char const *name,
+                                                         gboolean is_dir,
+                                                         char const *first_property_name,
+                                                         ...);
+
++ + + + + + + + + + + + + + + + + + +

outfile :

A GsfOutfile +

name :

The name of the new child to create +

is_dir :

TRUE to create a directory, FALSE to create a plain file +

Returns :

a newly created child +
+
+
+
+

gsf_outfile_new_child_varg ()

+
GsfOutput *         gsf_outfile_new_child_varg          (GsfOutfile *outfile,
+                                                         char const *name,
+                                                         gboolean is_dir,
+                                                         char const *first_property_name,
+                                                         va_list args);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

outfile :

+

name :

+

is_dir :

+

first_property_name :

+

args :

+

Returns :

+
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-Output-to-unstructured-files.html b/doc/html/gsf-Output-to-unstructured-files.html new file mode 100644 index 0000000..2ed146c --- /dev/null +++ b/doc/html/gsf-Output-to-unstructured-files.html @@ -0,0 +1,599 @@ + + + + +Output to unstructured files + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

Output to unstructured files

+

Output to unstructured files

+
+
+

Synopsis

+
                    GsfOutput;
+gsf_off_t           gsf_output_size                     (GsfOutput *output);
+gboolean            gsf_output_close                    (GsfOutput *output);
+gsf_off_t           gsf_output_tell                     (GsfOutput *output);
+gboolean            gsf_output_seek                     (GsfOutput *output,
+                                                         gsf_off_t offset,
+                                                         GSeekType whence);
+gboolean            gsf_output_write                    (GsfOutput *output,
+                                                         size_t num_bytes,
+                                                         guint8 const *data);
+gboolean            gsf_output_puts                     (GsfOutput *output,
+                                                         char const *line);
+gboolean            gsf_output_printf                   (GsfOutput *output,
+                                                         char const *format,
+                                                         ...);
+gsf_off_t           gsf_output_vprintf                  (GsfOutput *output,
+                                                         char const *format,
+                                                         va_list args);
+GsfOutfile *        gsf_output_container                (GsfOutput const *output);
+char const   *      gsf_output_name                     (GsfOutput const *output);
+gboolean            gsf_output_set_name_from_filename   (GsfOutput *output,
+                                                         char const *filename);
+GQuark              gsf_output_error_id                 (void);
+gboolean            gsf_output_set_error                (GsfOutput *output,
+                                                         gint code,
+                                                         char const *format,
+                                                         ...);
+GError const *      gsf_output_error                    (GsfOutput const *output);
+gboolean            gsf_output_is_closed                (GsfOutput const *output);
+gboolean            gsf_output_wrap                     (GObject *wrapper,
+                                                         GsfOutput *wrapee);
+gboolean            gsf_output_unwrap                   (GObject *wrapper,
+                                                         GsfOutput *wrapee);
+
+
+
+

Object Hierarchy

+
+  GObject
+   +----GsfOutput
+         +----GsfOutfile
+         +----GsfOutputBzip
+         +----GsfOutputCsv
+         +----GsfOutputGZip
+         +----GsfOutputIconv
+         +----GsfOutputIOChannel
+         +----GsfOutputMemory
+         +----GsfOutputStdio
+
+
+
+

Properties

+
+  "is-closed"                gboolean              : Read
+  "name"                     gchar*                : Read
+  "position"                 gint64                : Read
+  "size"                     gint64                : Read
+
+
+
+

Description

+

+

+
+
+

Details

+
+

GsfOutput

+
typedef struct _GsfOutput GsfOutput;
+

+Class representing an output stream, counterpart to GsfInput. +

+
+
+
+

gsf_output_size ()

+
gsf_off_t           gsf_output_size                     (GsfOutput *output);
+

+Determine the size of the output stream output. +

+
++ + + + + + + + + + +

output :

+GsfOutput +

Returns :

the size of the output, or -1 if it does not have a size. +
+
+
+
+

gsf_output_close ()

+
gboolean            gsf_output_close                    (GsfOutput *output);
+

+Close a stream. +

+
++ + + + + + + + + + +

output :

+GsfOutput +

Returns :

FALSE on error +
+
+
+
+

gsf_output_tell ()

+
gsf_off_t           gsf_output_tell                     (GsfOutput *output);
+

+Tell the current position in output, similar to +ftell(3). +

+
++ + + + + + + + + + +

output :

+GsfOutput +

Returns :

the current position in the file +
+
+
+
+

gsf_output_seek ()

+
gboolean            gsf_output_seek                     (GsfOutput *output,
+                                                         gsf_off_t offset,
+                                                         GSeekType whence);
+

+Reposition in output stream output. whence specifies what the offset is +relative to: the beginning of the stream (G_SEEK_SET), current position in +the stream (G_SEEK_CUR) or the end of the stream (G_SEEK_END). +This function is similar to +fseek(3). +

+
++ + + + + + + + + + + + + + + + + + +

output :

+GsfOutput +

offset :

Relative amount to reposition +

whence :

What the offset is relative to. +

Returns :

FALSE on error. +
+
+
+
+

gsf_output_write ()

+
gboolean            gsf_output_write                    (GsfOutput *output,
+                                                         size_t num_bytes,
+                                                         guint8 const *data);
+

+Write num_bytes of data to output. +

+
++ + + + + + + + + + + + + + + + + + +

output :

Output stream +

num_bytes :

Number of bytes to write +

data :

Data to write. +

Returns :

FALSE on error. +
+
+
+
+

gsf_output_puts ()

+
gboolean            gsf_output_puts                     (GsfOutput *output,
+                                                         char const *line);
+

+Like fputs, this assumes that the line already ends with a newline +

+
++ + + + + + + + + + + + + + +

output :

A GsfOutput +

line :

+null terminated string to write +

Returns :

TRUE if successful, FALSE if not +
+
+
+
+

gsf_output_printf ()

+
gboolean            gsf_output_printf                   (GsfOutput *output,
+                                                         char const *format,
+                                                         ...);
+

+Output Varargs to output using the format string format, similar to +printf(3). +

+
++ + + + + + + + + + + + + + + + + + +

output :

A GsfOutput +

format :

The printf-style format string +

... :

the arguments for format +

Returns :

TRUE if successful, FALSE if not +
+
+
+
+

gsf_output_vprintf ()

+
gsf_off_t           gsf_output_vprintf                  (GsfOutput *output,
+                                                         char const *format,
+                                                         va_list args);
+

+Output args to output using the format string format, similar to +vprintf(3). +

+
++ + + + + + + + + + + + + + + + + + +

output :

A GsfOutput +

format :

The printf-style format string +

args :

the arguments for format +

Returns :

number of bytes printed, a negative value if not successful +
+
+
+
+

gsf_output_container ()

+
GsfOutfile *        gsf_output_container                (GsfOutput const *output);
+
++ + + + +

Returns :

but does not add a reference to output's container. + Potentially NULL +
+
+
+
+

gsf_output_name ()

+
char const   *      gsf_output_name                     (GsfOutput const *output);
+

+Give the name of output. +

+
++ + + + + + + + + + +

output :

+GsfOutput +

Returns :

output's name in utf8 form, DO NOT FREE THIS STRING +
+
+
+
+

gsf_output_set_name_from_filename ()

+
gboolean            gsf_output_set_name_from_filename   (GsfOutput *output,
+                                                         char const *filename);
+

+

+
+

Note

This is a utility routine that should only be used by derived +outputs.
+

+

+
++ + + + + + + + + + + + + + +

output :

the output stream +

filename :

the (fs-sys encoded) filename +

Returns :

TRUE if the assignment was ok. +
+
+
+
+

gsf_output_error_id ()

+
GQuark              gsf_output_error_id                 (void);
+

+

+
++ + + + +

Returns :

+
+
+
+
+

gsf_output_set_error ()

+
gboolean            gsf_output_set_error                (GsfOutput *output,
+                                                         gint code,
+                                                         char const *format,
+                                                         ...);
+

+

+
+

Note

This is a utility routine that should only be used by derived +outputs.
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

output :

+GsfOutput +

code :

The error id +

format :

printf style format string +

... :

arguments for format +

Returns :

Always returns FALSE to facilitate its use. +
+
+
+
+

gsf_output_error ()

+
GError const *      gsf_output_error                    (GsfOutput const *output);
+
++ + + + +

Returns :

the last error logged on the output, or NULL. +
+
+
+
+

gsf_output_is_closed ()

+
gboolean            gsf_output_is_closed                (GsfOutput const *output);
+
++ + + + + + + + + + +

output :

+GsfOutput +

Returns :

TRUE if output has already been closed. +
+
+
+
+

gsf_output_wrap ()

+
gboolean            gsf_output_wrap                     (GObject *wrapper,
+                                                         GsfOutput *wrapee);
+
++ + + + +

Returns :

TRUE if the wrapping succeeded. +
+
+
+
+

gsf_output_unwrap ()

+
gboolean            gsf_output_unwrap                   (GObject *wrapper,
+                                                         GsfOutput *wrapee);
+
++ + + + +

Returns :

TRUE if the unwrapping succeeded. +
+
+
+
+

Property Details

+
+

The "is-closed" property

+
  "is-closed"                gboolean              : Read
+

Whether the Output is Closed.

+

Default value: FALSE

+
+
+
+

The "name" property

+
  "name"                     gchar*                : Read
+

The Output's Name.

+

Default value: NULL

+
+
+
+

The "position" property

+
  "position"                 gint64                : Read
+

The Output's Current Position.

+

Allowed values: >= 0

+

Default value: 0

+
+
+
+

The "size" property

+
  "size"                     gint64                : Read
+

The Output's Size.

+

Allowed values: >= 0

+

Default value: 0

+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-Reading-and-Writing-from-local-files-and-directories.html b/doc/html/gsf-Reading-and-Writing-from-local-files-and-directories.html new file mode 100644 index 0000000..5639811 --- /dev/null +++ b/doc/html/gsf-Reading-and-Writing-from-local-files-and-directories.html @@ -0,0 +1,474 @@ + + + + +Reading and Writing from local files and directories + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

Reading and Writing from local files and directories

+

Reading and Writing from local files and directories

+
+
+

Synopsis

+
                    GsfInputStdio;
+GsfInput *          gsf_input_stdio_new                 (char const *filename,
+                                                         GError **err);
+GsfInput *          gsf_input_stdio_new_FILE            (char const *filename,
+                                                         FILE *file,
+                                                         gboolean keep_open);
+                    GsfOutputStdio;
+GsfOutput *         gsf_output_stdio_new                (char const *filename,
+                                                         GError **err);
+GsfOutput *         gsf_output_stdio_new_full           (char const *filename,
+                                                         GError **err,
+                                                         char const *first_property_name,
+                                                         ...);
+GsfOutput *         gsf_output_stdio_new_valist         (char const *filename,
+                                                         GError **err,
+                                                         char const *first_property_name,
+                                                         va_list var_args);
+GsfOutput *         gsf_output_stdio_new_FILE           (char const *filename,
+                                                         FILE *file,
+                                                         gboolean keep_open);
+                    GsfOutfileStdio;
+GsfOutfile *        gsf_outfile_stdio_new               (char const *root,
+                                                         GError **err);
+GsfOutfile *        gsf_outfile_stdio_new_full          (char const *root,
+                                                         GError **err,
+                                                         char const *first_property_name,
+                                                         ...);
+GsfOutfile *        gsf_outfile_stdio_new_valist        (char const *root,
+                                                         GError **err,
+                                                         char const *first_property_name,
+                                                         va_list var_args);
+                    GsfInfileStdio;
+GsfInfile *         gsf_infile_stdio_new                (char const *root,
+                                                         GError **err);
+
+
+
+

Object Hierarchy

+
+  GObject
+   +----GsfInput
+         +----GsfInputStdio
+
+
+  GObject
+   +----GsfOutput
+         +----GsfOutputStdio
+
+
+  GObject
+   +----GsfOutput
+         +----GsfOutfile
+               +----GsfOutfileStdio
+
+
+  GObject
+   +----GsfInput
+         +----GsfInfile
+               +----GsfInfileStdio
+
+
+
+

Description

+

+

+
+
+

Details

+
+

GsfInputStdio

+
typedef struct _GsfInputStdio GsfInputStdio;
+

+

+
+
+
+

gsf_input_stdio_new ()

+
GsfInput *          gsf_input_stdio_new                 (char const *filename,
+                                                         GError **err);
+
++ + + + + + + + + + + + + + +

filename :

in utf8. +

err :

optionally NULL. +

Returns :

a new file or NULL. +
+
+
+
+

gsf_input_stdio_new_FILE ()

+
GsfInput *          gsf_input_stdio_new_FILE            (char const *filename,
+                                                         FILE *file,
+                                                         gboolean keep_open);
+

+Assumes ownership of file when succeeding. If keep_open is true, +ownership reverts to caller when the GsfObject is closed. +

+
++ + + + + + + + + + + + + + + + + + +

filename :

The filename corresponding to file. +

file :

an existing stdio FILE * +

keep_open :

Should file be closed when the wrapper is closed +

Returns :

a new GsfInput wrapper for file. Note that if the file is not + seekable, this function will make a local copy of the entire file. +
+
+
+
+

GsfOutputStdio

+
typedef struct _GsfOutputStdio GsfOutputStdio;
+

+

+
+
+
+

gsf_output_stdio_new ()

+
GsfOutput *         gsf_output_stdio_new                (char const *filename,
+                                                         GError **err);
+
++ + + + + + + + + + + + + + +

filename :

name of file to create or replace. +

err :

optionally NULL. +

Returns :

a new file or NULL. +
+
+
+
+

gsf_output_stdio_new_full ()

+
GsfOutput *         gsf_output_stdio_new_full           (char const *filename,
+                                                         GError **err,
+                                                         char const *first_property_name,
+                                                         ...);
+
++ + + + + + + + + + + + + + + + + + +

filename :

name of file to create or replace. +

err :

optionally NULL. +

first_property_name :

+NULL terminated list of properties +

Returns :

a new file or NULL. +
+
+
+
+

gsf_output_stdio_new_valist ()

+
GsfOutput *         gsf_output_stdio_new_valist         (char const *filename,
+                                                         GError **err,
+                                                         char const *first_property_name,
+                                                         va_list var_args);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

filename :

+

err :

+

first_property_name :

+

var_args :

+

Returns :

+
+
+
+
+

gsf_output_stdio_new_FILE ()

+
GsfOutput *         gsf_output_stdio_new_FILE           (char const *filename,
+                                                         FILE *file,
+                                                         gboolean keep_open);
+

+Assumes ownership of file. If keep_open is true, ownership reverts +to caller when the GsfObject is closed. +

+
++ + + + + + + + + + + + + + + + + + +

filename :

The filename corresponding to file. +

file :

an existing stdio FILE * +

keep_open :

Should file be closed when the wrapper is closed +

Returns :

a new GsfOutput wrapper for file. Warning: the result will be +seekable only if file is seekable. If it is seekable, the resulting +GsfOutput object will seek relative to file's beginning, not its +current location at the time the GsfOutput object is created. +
+
+
+
+

GsfOutfileStdio

+
typedef struct _GsfOutfileStdio GsfOutfileStdio;
+

+

+
+
+
+

gsf_outfile_stdio_new ()

+
GsfOutfile *        gsf_outfile_stdio_new               (char const *root,
+                                                         GError **err);
+
++ + + + + + + + + + + + + + +

root :

root directory in utf8. +

err :

optionally NULL. +

Returns :

a new outfile or NULL. +
+
+
+
+

gsf_outfile_stdio_new_full ()

+
GsfOutfile *        gsf_outfile_stdio_new_full          (char const *root,
+                                                         GError **err,
+                                                         char const *first_property_name,
+                                                         ...);
+
++ + + + + + + + + + + + + + + + + + + + + + +

root :

root directory in utf8. +

err :

optionally NULL. +

first_property_name :

name of first property to set +

... :

value of first property, followed by more properties, + NULL-terminated +

Returns :

a new outfile or NULL. +
+
+
+
+

gsf_outfile_stdio_new_valist ()

+
GsfOutfile *        gsf_outfile_stdio_new_valist        (char const *root,
+                                                         GError **err,
+                                                         char const *first_property_name,
+                                                         va_list var_args);
+
++ + + + + + + + + + + + + + + + + + + + + + +

root :

root directory in utf8. +

err :

optionally NULL. +

first_property_name :

name of first property to set +

var_args :

a NULL-terminated va_list +

Returns :

a new outfile or NULL. +
+
+
+
+

GsfInfileStdio

+
typedef struct _GsfInfileStdio GsfInfileStdio;
+

+

+
+
+
+

gsf_infile_stdio_new ()

+
GsfInfile *         gsf_infile_stdio_new                (char const *root,
+                                                         GError **err);
+
++ + + + + + + + + + + + + + +

root :

in locale dependent encoding +

err :

optionally NULL. +

Returns :

a new file or NULL. +
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-Text.html b/doc/html/gsf-Text.html new file mode 100644 index 0000000..7684e56 --- /dev/null +++ b/doc/html/gsf-Text.html @@ -0,0 +1,389 @@ + + + + +Text + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

Text

+

Text

+
+ +
+

Object Hierarchy

+
+  GObject
+   +----GsfInput
+         +----GsfInputTextline
+
+
+  GObject
+   +----GsfOutput
+         +----GsfOutputIconv
+
+
+  GObject
+   +----GsfOutput
+         +----GsfOutputCsv
+
+
+
+

Properties

+
+  "fallback"                 gchar*                : Read / Write
+  "input-charset"            gchar*                : Read / Write / Construct Only
+  "output-charset"           gchar*                : Read / Write / Construct Only
+  "sink"                     GsfOutput*            : Read / Write / Construct Only
+  "eol"                      gchar*                : Read / Write / Construct
+  "quote"                    gchar*                : Read / Write / Construct
+  "quoting-mode"             GsfOutputCsvQuotingMode  : Read / Write / Construct
+  "quoting-on-whitespace"    gboolean              : Read / Write
+  "quoting-triggers"         gchar*                : Read / Write
+  "separator"                gchar*                : Read / Write / Construct
+  "sink"                     GsfOutput*            : Read / Write
+
+
+
+

Description

+

+

+
+
+

Details

+
+

GsfInputTextline

+
typedef struct _GsfInputTextline GsfInputTextline;
+

+

+
+
+
+

gsf_input_textline_new ()

+
GsfInput *          gsf_input_textline_new              (GsfInput *source);
+

+

+
+

Note

This adds a reference to source.
+

+

+
++ + + + + + + + + + +

source :

in some combination of ascii and utf8 +

Returns :

a new file or NULL. +
+
+
+
+

gsf_input_textline_ascii_gets ()

+
unsigned char *     gsf_input_textline_ascii_gets       (GsfInputTextline *textline);
+

+A utility routine to read things line by line from the underlying source. +Trailing newlines and carriage returns are stripped, and the resultant buffer +can be edited. +

+
++ + + + + + + + + + +

textline :

+GsfInputTextline +

Returns :

the string read, or NULL on eof. +
+
+
+
+

gsf_input_textline_utf8_gets ()

+
guint8 *            gsf_input_textline_utf8_gets        (GsfInputTextline *textline);
+

+A utility routine to read things line by line from the underlying source. +Trailing newlines and carriage returns are stripped, and the resultant buffer +can be edited. +

+
++ + + + + + + + + + +

textline :

+GsfInputTextline +

Returns :

the string read, or NULL on eof. +
+
+
+
+

GsfOutputIconv

+
typedef struct _GsfOutputIconv GsfOutputIconv;
+

+

+
+
+
+

gsf_output_iconv_new ()

+
GsfOutput *         gsf_output_iconv_new                (GsfOutput *sink,
+                                                         char const *dst,
+                                                         char const *src);
+

+Adds a reference to sink. +

+
++ + + + + + + + + + + + + + + + + + +

sink :

The underlying data source. +

dst :

The target character set. +

src :

The source character set. +

Returns :

a new GsfOutput object or NULL. +
+
+
+
+

GsfOutputCsv

+
typedef struct _GsfOutputCsv GsfOutputCsv;
+

+

+
+
+
+

gsf_output_csv_write_eol ()

+
gboolean            gsf_output_csv_write_eol            (GsfOutputCsv *csv);
+

+

+
++ + + + + + + + + + +

csv :

+

Returns :

+
+
+
+
+

gsf_output_csv_write_field ()

+
gboolean            gsf_output_csv_write_field          (GsfOutputCsv *csv,
+                                                         char const *field,
+                                                         size_t len);
+

+

+
++ + + + + + + + + + + + + + + + + + +

csv :

+

field :

+

len :

+

Returns :

+
+
+
+
+

enum GsfOutputCsvQuotingMode

+
typedef enum {
+	GSF_OUTPUT_CSV_QUOTING_MODE_NEVER,
+	GSF_OUTPUT_CSV_QUOTING_MODE_AUTO,
+	GSF_OUTPUT_CSV_QUOTING_MODE_ALWAYS
+} GsfOutputCsvQuotingMode;
+
+

+

+
+
+
+

Property Details

+
+

The "fallback" property

+
  "fallback"                 gchar*                : Read / Write
+

+Either NULL or a UTF-8 string (representable in the target encoding) +to convert and output in place of characters that cannot be represented +in the target encoding. NULL means use \u1234 or \U12345678 format. +

+

Default value: NULL

+
+
+
+

The "input-charset" property

+
  "input-charset"            gchar*                : Read / Write / Construct Only
+

The character set to convert from.

+

Default value: "UTF-8"

+
+
+
+

The "output-charset" property

+
  "output-charset"           gchar*                : Read / Write / Construct Only
+

The character set to convert to.

+

Default value: "UTF-8"

+
+
+
+

The "sink" property

+
  "sink"                     GsfOutput*            : Read / Write / Construct Only
+

Where the converted data is written.

+
+
+
+

The "eol" property

+
  "eol"                      gchar*                : Read / Write / Construct
+

The end-of-line marker.

+

Default value: "\n"

+
+
+
+

The "quote" property

+
  "quote"                    gchar*                : Read / Write / Construct
+

The string used for quoting fields.

+

Default value: "\""

+
+
+
+

The "quoting-mode" property

+
  "quoting-mode"             GsfOutputCsvQuotingMode  : Read / Write / Construct
+

When to quote fields.

+

Default value: GSF_OUTPUT_CSV_QUOTING_MODE_NEVER

+
+
+
+

The "quoting-on-whitespace" property

+
  "quoting-on-whitespace"    gboolean              : Read / Write
+

Does initial or terminal whitespace force quoting?.

+

Default value: TRUE

+
+
+
+

The "quoting-triggers" property

+
  "quoting-triggers"         gchar*                : Read / Write
+

Characters that cause field quoting.

+

Default value: NULL

+
+
+
+

The "separator" property

+
  "separator"                gchar*                : Read / Write / Construct
+

The field separator.

+

Default value: ","

+
+
+
+

The "sink" property

+
  "sink"                     GsfOutput*            : Read / Write
+

Where the compressed data is written.

+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-XML-and-libxml.html b/doc/html/gsf-XML-and-libxml.html new file mode 100644 index 0000000..d745242 --- /dev/null +++ b/doc/html/gsf-XML-and-libxml.html @@ -0,0 +1,1632 @@ + + + + +XML and libxml + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

XML and libxml

+

XML and libxml

+
+
+

Synopsis

+
                    GsfXMLIn;
+                    GsfXMLInDoc;
+gboolean            (*GsfXMLInUnknownFunc)              (GsfXMLIn *xin,
+                                                         xmlChar const *elem,
+                                                         xmlChar const **attrs);
+                    GsfXMLInNS;
+                    GsfXMLInNode;
+void                (*GsfXMLInExtDtor)                  (GsfXMLIn *xin,
+                                                         gpointer old_state);
+enum                GsfXMLContent;
+                    GsfXMLBlob;
+                    GsfInputHTTP;
+gboolean            (*GsfXMLProbeFunc)                  (const xmlChar *name,
+                                                         const xmlChar *prefix,
+                                                         const xmlChar *URI,
+                                                         int nb_namespaces,
+                                                         const xmlChar **namespaces,
+                                                         int nb_attributes,
+                                                         int nb_defaulted,
+                                                         const xmlChar **attributes);
+#define             GSF_XML_IN_NODE_FULL                (parent_id,
+                                                         id,
+                                                         ns,
+                                                         name,
+                                                         has_content,
+                                                         share_children_with_parent,
+                                                         check_ns,
+                                                         start,
+                                                         end,
+                                                         user)
+#define             GSF_XML_IN_NODE                     (parent_id,
+                                                         id,
+                                                         ns,
+                                                         name,
+                                                         has_content,
+                                                         start,
+                                                         end)
+#define             GSF_XML_IN_NODE_END
+#define             GSF_XML_IN_NS                       (id,
+                                                         uri)
+#define             GSF_XML_IN_NS_END
+GsfXMLInDoc *       gsf_xml_in_doc_new                  (GsfXMLInNode const *nodes,
+                                                         GsfXMLInNS const *ns);
+void                gsf_xml_in_doc_free                 (GsfXMLInDoc *doc);
+void                gsf_xml_in_doc_add_nodes            (GsfXMLInDoc *doc,
+                                                         GsfXMLInNode const *nodes);
+gboolean            gsf_xml_in_doc_parse                (GsfXMLInDoc *doc,
+                                                         GsfInput *input,
+                                                         gpointer user_state);
+void                gsf_xml_in_doc_set_unknown_handler  (GsfXMLInDoc *doc,
+                                                         GsfXMLInUnknownFunc handler);
+void                gsf_xml_in_push_state               (GsfXMLIn *xin,
+                                                         GsfXMLInDoc const *doc,
+                                                         gpointer new_state,
+                                                         GsfXMLInExtDtor dtor,
+                                                         xmlChar const **attrs);
+gboolean            gsf_xml_in_namecmp                  (GsfXMLIn const *xin,
+                                                         char const *str,
+                                                         unsigned int ns_id,
+                                                         char const *name);
+char const  *       gsf_xml_in_check_ns                 (GsfXMLIn const *xin,
+                                                         char const *str,
+                                                         unsigned int ns_id);
+GsfInput *          gsf_xml_in_get_input                (GsfXMLIn const *xin);
+gboolean            gsf_xml_probe                       (GsfInput *input,
+                                                         GsfXMLProbeFunc startElement);
+
+                    GsfXMLOut;
+GsfXMLOut *         gsf_xml_out_new                     (GsfOutput *output);
+void                gsf_xml_out_set_doc_type            (GsfXMLOut *xout,
+                                                         char const *type);
+GsfOutput *         gsf_xml_out_get_output              (GsfXMLOut const *xout);
+void                gsf_xml_out_start_element           (GsfXMLOut *xout,
+                                                         char const *id);
+char const *        gsf_xml_out_end_element             (GsfXMLOut *xout);
+void                gsf_xml_out_add_cstr                (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         char const *val_utf8);
+void                gsf_xml_out_add_cstr_unchecked      (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         char const *val_utf8);
+void                gsf_xml_out_add_bool                (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         gboolean val);
+void                gsf_xml_out_add_int                 (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         int val);
+void                gsf_xml_out_add_uint                (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         unsigned int val);
+void                gsf_xml_out_add_float               (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         double val,
+                                                         int precision);
+void                gsf_xml_out_add_enum                (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         GType etype,
+                                                         gint val);
+void                gsf_xml_out_add_color               (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         unsigned int r,
+                                                         unsigned int g,
+                                                         unsigned int b);
+void                gsf_xml_out_add_base64              (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         guint8 const *data,
+                                                         unsigned int len);
+void                gsf_xml_out_add_gvalue              (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         GValue const *val);
+void                gsf_xml_out_simple_element          (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         char const *content);
+void                gsf_xml_out_simple_float_element    (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         double val,
+                                                         int precision);
+void                gsf_xml_out_simple_int_element      (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         int val);
+
+gchar *             gsf_input_http_get_content_type     (GsfInputHTTP *input);
+GType               gsf_input_http_get_type             (void);
+gchar *             gsf_input_http_get_url              (GsfInputHTTP *input);
+
+xmlParserCtxt *     gsf_xml_parser_context              (GsfInput *input);
+gboolean            gsf_xml_gvalue_from_str             (GValue *res,
+                                                         GType t,
+                                                         char const *str);
+int                 gsf_xmlDocFormatDump                (GsfOutput *output,
+                                                         xmlDoc *cur,
+                                                         char const *encoding,
+                                                         gboolean format);
+
+
+
+

Object Hierarchy

+
+  GObject
+   +----GsfXMLOut
+
+
+
+

Properties

+
+  "pretty-print"             gboolean              : Read / Write
+
+
+
+

Description

+

+

+
+
+

Details

+
+

GsfXMLIn

+
typedef struct {
+	/* public state : read only */
+	gpointer	    user_state;
+	GString		   *content;
+	GsfXMLInDoc  const *doc;
+	GsfXMLInNode const *node; /* current node (not on the stack) */
+	GSList	 	   *node_stack; /* stack of GsfXMLInNode */
+} GsfXMLIn;
+
+

+

+
+
+
+

GsfXMLInDoc

+
typedef struct _GsfXMLInDoc GsfXMLInDoc;
+

+

+
+
+
+

GsfXMLInUnknownFunc ()

+
gboolean            (*GsfXMLInUnknownFunc)              (GsfXMLIn *xin,
+                                                         xmlChar const *elem,
+                                                         xmlChar const **attrs);
+

+

+
++ + + + + + + + + + + + + + + + + + +

xin :

+

elem :

+

attrs :

+

Returns :

+
+
+
+
+

GsfXMLInNS

+
typedef struct {
+	char const *uri;
+	unsigned    ns_id;
+} GsfXMLInNS;
+
+

+

+
+
+
+

GsfXMLInNode

+
typedef struct {
+	char const *id;		/* unique in the entire tree */
+	int	    ns_id;
+	char const *name;
+	char const *parent_id;
+	void (*start) (GsfXMLIn *xin, xmlChar const **attrs);
+	void (*end)   (GsfXMLIn *xin, GsfXMLBlob *unknown);
+
+	union {
+		int	    v_int;
+		gboolean    v_bool;
+		gpointer    v_blob;
+		char const *v_str;
+	} user_data;
+	GsfXMLContent has_content;
+
+	unsigned int check_children_for_ns : 1;
+	unsigned int share_children_with_parent : 1;
+} GsfXMLInNode;
+
+

+

+
+
+
+

GsfXMLInExtDtor ()

+
void                (*GsfXMLInExtDtor)                  (GsfXMLIn *xin,
+                                                         gpointer old_state);
+

+

+
++ + + + + + + + + + +

xin :

+

old_state :

+
+
+
+
+

enum GsfXMLContent

+
typedef enum {
+	GSF_XML_NO_CONTENT = FALSE,
+	GSF_XML_CONTENT,
+	GSF_XML_SHARED_CONTENT
+} GsfXMLContent;
+
+

+

+
+
+
+

GsfXMLBlob

+
typedef struct _GsfXMLBlob GsfXMLBlob;
+

+

+
+
+
+

GsfInputHTTP

+
typedef struct _GsfInputHTTP GsfInputHTTP;
+

+

+
+
+
+

GsfXMLProbeFunc ()

+
gboolean            (*GsfXMLProbeFunc)                  (const xmlChar *name,
+                                                         const xmlChar *prefix,
+                                                         const xmlChar *URI,
+                                                         int nb_namespaces,
+                                                         const xmlChar **namespaces,
+                                                         int nb_attributes,
+                                                         int nb_defaulted,
+                                                         const xmlChar **attributes);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

name :

+

prefix :

+

URI :

+

nb_namespaces :

+

namespaces :

+

nb_attributes :

+

nb_defaulted :

+

attributes :

+

Returns :

+
+
+
+
+

GSF_XML_IN_NODE_FULL()

+
#define             GSF_XML_IN_NODE_FULL(parent_id, id, ns, name, has_content, 	\
+            			     share_children_with_parent, check_ns, start, end, user)
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

parent_id :

+

id :

+

ns :

+

name :

+

has_content :

+

share_children_with_parent :

+

check_ns :

+

start :

+

end :

+

user :

+
+
+
+
+

GSF_XML_IN_NODE()

+
#define             GSF_XML_IN_NODE(parent_id, id, ns, name, has_content, start, end)
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

parent_id :

+

id :

+

ns :

+

name :

+

has_content :

+

start :

+

end :

+
+
+
+
+

GSF_XML_IN_NODE_END

+
#define             GSF_XML_IN_NODE_END
+

+

+
+
+
+

GSF_XML_IN_NS()

+
#define             GSF_XML_IN_NS(id, uri)
+

+

+
++ + + + + + + + + + +

id :

+

uri :

+
+
+
+
+

GSF_XML_IN_NS_END

+
#define             GSF_XML_IN_NS_END
+

+

+
+
+
+

gsf_xml_in_doc_new ()

+
GsfXMLInDoc *       gsf_xml_in_doc_new                  (GsfXMLInNode const *nodes,
+                                                         GsfXMLInNS const *ns);
+

+Combine the nodes in the NULL terminated array starting at nodes with the +name spaces in the NULL terminated array starting at ns. Prepare the +data structures necessary to validate a doument based on that description. +

+
++ + + + + + + + + + + + + + +

nodes :

an array of node descriptors +

ns :

an array of namespace identifiers +

Returns :

NULL on error +
+
+
+
+

gsf_xml_in_doc_free ()

+
void                gsf_xml_in_doc_free                 (GsfXMLInDoc *doc);
+

+Free up resources +

+
++ + + + +

doc :

+GsfXMLInDoc +
+
+
+
+

gsf_xml_in_doc_add_nodes ()

+
void                gsf_xml_in_doc_add_nodes            (GsfXMLInDoc *doc,
+                                                         GsfXMLInNode const *nodes);
+

+Adds additional nodes to the structure of doc +

+
++ + + + + + + + + + +

doc :

+GsfXMLInDoc +

nodes :

+NULL terminated array of GsfXMLInNode +
+
+
+
+

gsf_xml_in_doc_parse ()

+
gboolean            gsf_xml_in_doc_parse                (GsfXMLInDoc *doc,
+                                                         GsfInput *input,
+                                                         gpointer user_state);
+

+Read an xml document from input and parse based on the the descriptor in +doc +

+
++ + + + + + + + + + + + + + + + + + +

doc :

+GsfXMLInDoc +

input :

+GsfInput +

user_state :

arbitrary content stored in the parser +

Returns :

FALSE on error +
+
+
+
+

gsf_xml_in_doc_set_unknown_handler ()

+
void                gsf_xml_in_doc_set_unknown_handler  (GsfXMLInDoc *doc,
+                                                         GsfXMLInUnknownFunc handler);
+

+Call the function handler when an unexpected child node is found +

+
++ + + + + + + + + + +

doc :

+GsfXMLInDoc +

handler :

The function to call +
+
+
+
+

gsf_xml_in_push_state ()

+
void                gsf_xml_in_push_state               (GsfXMLIn *xin,
+                                                         GsfXMLInDoc const *doc,
+                                                         gpointer new_state,
+                                                         GsfXMLInExtDtor dtor,
+                                                         xmlChar const **attrs);
+

+Take the first node from doc as the current node and call its start handler. +

+
++ + + + + + + + + + + + + + + + + + + + + + +

xin :

+GsfXMLIn +

doc :

+GsfXMLInDoc +

new_state :

arbitrary content for the parser +

dtor :

+GsfXMLInExtDtor +

attrs :

array of xmlChar const * +
+
+
+
+

gsf_xml_in_namecmp ()

+
gboolean            gsf_xml_in_namecmp                  (GsfXMLIn const *xin,
+                                                         char const *str,
+                                                         unsigned int ns_id,
+                                                         char const *name);
+

+Checks to see if str is the same as ns_id::name with either an explicit +namespace or the current default namespace. +

+
++ + + + + + + + + + + + + + + + + + + + + + +

xin :

The GsfXMLIn we are reading from. +

str :

The potentially namespace qualified node name. +

ns_id :

The name space id to check +

name :

The target node name +

Returns :

TRUE if str == ns_id:name according to state. +
+
+
+
+

gsf_xml_in_check_ns ()

+
char const  *       gsf_xml_in_check_ns                 (GsfXMLIn const *xin,
+                                                         char const *str,
+                                                         unsigned int ns_id);
+

+According to state is str in the namespace ns_id ? +

+
++ + + + + + + + + + + + + + + + + + +

xin :

+GsfXMLIn +

str :

string to check +

ns_id :

the namespace id +

Returns :

a pointer to str after the namespace if successful, + otherwise NULL. +
+
+
+
+

gsf_xml_in_get_input ()

+
GsfInput *          gsf_xml_in_get_input                (GsfXMLIn const *xin);
+

+(New in 1.14.2) +

+
++ + + + + + + + + + +

xin :

+GsfXMLIn +

Returns :

(but does not reference) the stream being parsed. +
+
+
+
+

gsf_xml_probe ()

+
gboolean            gsf_xml_probe                       (GsfInput *input,
+                                                         GsfXMLProbeFunc startElement);
+

+

+
++ + + + + + + + + + + + + + +

input :

+

startElement :

+

Returns :

+
+
+
+
+

GsfXMLOut

+
typedef struct _GsfXMLOut GsfXMLOut;
+

+

+
+
+
+

gsf_xml_out_new ()

+
GsfXMLOut *         gsf_xml_out_new                     (GsfOutput *output);
+

+Create an XML output stream. +

+
++ + + + + + + + + + +

output :

+GsfOutput +

Returns :

GsfXMLOut +
+
+
+
+

gsf_xml_out_set_doc_type ()

+
void                gsf_xml_out_set_doc_type            (GsfXMLOut *xout,
+                                                         char const *type);
+

+Store some optional some <!DOCTYPE .. > content +

+
++ + + + + + + + + + +

xout :

+GsfXMLOut +

type :

the document type declaration +
+
+
+
+

gsf_xml_out_get_output ()

+
GsfOutput *         gsf_xml_out_get_output              (GsfXMLOut const *xout);
+

+Get the GsfInput we are parsing from. +

+
++ + + + + + + + + + +

xout :

+GsfXMLOut +

Returns :

GsfInput or NULL. +
+
+
+
+

gsf_xml_out_start_element ()

+
void                gsf_xml_out_start_element           (GsfXMLOut *xout,
+                                                         char const *id);
+

+Output a start element id, if necessary preceeded by an XML declaration. +

+
++ + + + + + + + + + +

xout :

+GsfXMLOut +

id :

Element name +
+
+
+
+

gsf_xml_out_end_element ()

+
char const *        gsf_xml_out_end_element             (GsfXMLOut *xout);
+

+Closes/ends an XML element. +

+
++ + + + + + + + + + +

xout :

+GsfXMLOut +

Returns :

the element that has been closed. +
+
+
+
+

gsf_xml_out_add_cstr ()

+
void                gsf_xml_out_add_cstr                (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         char const *val_utf8);
+

+dump val_utf8 to an attribute named id or as the nodes content escaping +characters as necessary. If val_utf8 is NULL do nothing (no warning, no +output) +

+
++ + + + + + + + + + + + + + +

xout :

+GsfXMLOut +

id :

optionally NULL for content +

val_utf8 :

a utf8 encoded string +
+
+
+
+

gsf_xml_out_add_cstr_unchecked ()

+
void                gsf_xml_out_add_cstr_unchecked      (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         char const *val_utf8);
+

+dump val_utf8 to an attribute named id without checking to see if the +content needs escaping. A useful performance enhancement when the +application knows that structure of the content well. If val_utf8 is NULL +do nothing (no warning, no output) +

+
++ + + + + + + + + + + + + + +

xout :

+GsfXMLOut +

id :

optionally NULL for content +

val_utf8 :

a utf8 encoded string to export +
+
+
+
+

gsf_xml_out_add_bool ()

+
void                gsf_xml_out_add_bool                (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         gboolean val);
+

+dump boolean value val to an attribute named id or as the nodes content +Use '1' or '0' to simplify import +

+
++ + + + + + + + + + + + + + +

xout :

+GsfXMLOut +

id :

optionally NULL for content +

val :

a boolean +
+
+
+
+

gsf_xml_out_add_int ()

+
void                gsf_xml_out_add_int                 (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         int val);
+

+dump integer value val to an attribute named id or as the nodes content +

+
++ + + + + + + + + + + + + + +

xout :

+GsfXMLOut +

id :

optionally NULL for content +

val :

the value +
+
+
+
+

gsf_xml_out_add_uint ()

+
void                gsf_xml_out_add_uint                (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         unsigned int val);
+

+dump unsigned integer value val to an attribute named id or as the nodes +content +

+
++ + + + + + + + + + + + + + +

xout :

+GsfXMLOut +

id :

optionally NULL for content +

val :

the value +
+
+
+
+

gsf_xml_out_add_float ()

+
void                gsf_xml_out_add_float               (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         double val,
+                                                         int precision);
+

+dump float value val to an attribute named id or as the nodes +content with precision precision. The number will be formattted +according to the "C" locale. +

+
++ + + + + + + + + + + + + + + + + + +

xout :

+GsfXMLOut +

id :

optionally NULL for content +

val :

the value +

precision :

the number of significant digits to use, -1 meaning "enough". +
+
+
+
+

gsf_xml_out_add_enum ()

+
void                gsf_xml_out_add_enum                (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         GType etype,
+                                                         gint val);
+

+Output the name of value val of enumeration type etype. +

+
++ + + + + + + + + + + + + + + + + + +

xout :

+GsfXMLOut +

id :

optionally NULL for content +

etype :

+GType +

val :

enum element number +
+
+
+
+

gsf_xml_out_add_color ()

+
void                gsf_xml_out_add_color               (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         unsigned int r,
+                                                         unsigned int g,
+                                                         unsigned int b);
+

+dump Color r.g.b to an attribute named id or as the nodes content +

+
++ + + + + + + + + + + + + + + + + + + + + + +

xout :

+GsfXMLOut +

id :

optionally NULL for content +

r :

Red value +

g :

Green value +

b :

Blue value +
+
+
+
+

gsf_xml_out_add_base64 ()

+
void                gsf_xml_out_add_base64              (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         guint8 const *data,
+                                                         unsigned int len);
+

+dump len bytes in data into the content of node id using base64 +

+
++ + + + + + + + + + + + + + + + + + +

xout :

+GsfXMLOut +

id :

optionally NULL for content +

data :

Data to be written +

len :

Length of data +
+
+
+
+

gsf_xml_out_add_gvalue ()

+
void                gsf_xml_out_add_gvalue              (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         GValue const *val);
+

+Output the value of val as a string. Does NOT store any type information +with the string, just thevalue. +

+
++ + + + + + + + + + + + + + +

xout :

+GsfXMLOut +

id :

optionally NULL for content +

val :

+GValue +
+
+
+
+

gsf_xml_out_simple_element ()

+
void                gsf_xml_out_simple_element          (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         char const *content);
+

+Convenience routine to output a simple id element with content content. +

+
++ + + + + + + + + + + + + + +

xout :

+GsfXMLOut +

id :

Element name +

content :

Content of the element +
+
+
+
+

gsf_xml_out_simple_float_element ()

+
void                gsf_xml_out_simple_float_element    (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         double val,
+                                                         int precision);
+

+Convenience routine to output an element id with float value val using +precision significant digits. +

+
++ + + + + + + + + + + + + + + + + + +

xout :

+GsfXMLOut +

id :

Element name +

val :

Element value +

precision :

the number of significant digits to use, -1 meaning "enough". +
+
+
+
+

gsf_xml_out_simple_int_element ()

+
void                gsf_xml_out_simple_int_element      (GsfXMLOut *xout,
+                                                         char const *id,
+                                                         int val);
+

+Convenience routine to output an element id with integer value val. +

+
++ + + + + + + + + + + + + + +

xout :

+GsfXMLOut +

id :

Element name +

val :

Element value +
+
+
+
+

gsf_input_http_get_content_type ()

+
gchar *             gsf_input_http_get_content_type     (GsfInputHTTP *input);
+
++ + + + + + + + + + +

input :

+GsfInputHTTP +

Returns :

an allocated string containing the Content-Type field of the HTTP response. +
+
+
+
+

gsf_input_http_get_type ()

+
GType               gsf_input_http_get_type             (void);
+

+

+
++ + + + +

Returns :

+
+
+
+
+

gsf_input_http_get_url ()

+
gchar *             gsf_input_http_get_url              (GsfInputHTTP *input);
+
++ + + + + + + + + + +

input :

+GsfInputHTTP +

Returns :

an allocated string containing the URL used for input. +
+
+
+
+

gsf_xml_parser_context ()

+
xmlParserCtxt *     gsf_xml_parser_context              (GsfInput *input);
+

+Create a libxml2 pull style parser context wrapper around gsf input input. +This signature will probably change to supply a SAX structure. +

+

+

+
+

Note

This adds a reference to input.
+

+

+
+

Note

A simple wrapper around a cleaner implementation that will fold in +when we add other api changes. Its not worth bumping just for this.
+

+

+
++ + + + + + + + + + +

input :

+GsfInput +

Returns :

A parser context or NULL +
+
+
+
+

gsf_xml_gvalue_from_str ()

+
gboolean            gsf_xml_gvalue_from_str             (GValue *res,
+                                                         GType t,
+                                                         char const *str);
+

+Try to parse str as a value of type t into res. +

+
++ + + + + + + + + + + + + + + + + + +

res :

Result value +

t :

Type of data +

str :

Value string +

Returns :

True when parsing of str as a value of type t was succesfull; +false otherwise. +
+
+
+
+

gsf_xmlDocFormatDump ()

+
int                 gsf_xmlDocFormatDump                (GsfOutput *output,
+                                                         xmlDoc *cur,
+                                                         char const *encoding,
+                                                         gboolean format);
+

+Dumps the document cur into output. +

+
++ + + + + + + + + + + + + + + + + + + + + + +

output :

+GsfOutput +

cur :

+xmlDocPtr +

encoding :

The encoding to use. +

format :

+TRUE to reformat the output. +

Returns :

status from xmlSaveFormatFileTo. +
+
+
+
+

Property Details

+
+

The "pretty-print" property

+
  "pretty-print"             gboolean              : Read / Write
+

Should the output auto-indent elements to make reading easier.

+

Default value: TRUE

+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-Zip.html b/doc/html/gsf-Zip.html new file mode 100644 index 0000000..32e8dd0 --- /dev/null +++ b/doc/html/gsf-Zip.html @@ -0,0 +1,249 @@ + + + + +Zip files + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

Zip files

+

Zip files — Utilities for reading and writing ZIP/JAR files

+
+
+

Synopsis

+
                    GsfInfileZip;
+GsfInfile *         gsf_infile_zip_new                  (GsfInput *source,
+                                                         GError **err);
+                    GsfOutfileZip;
+GsfOutfile *        gsf_outfile_zip_new                 (GsfOutput *sink,
+                                                         GError **err);
+gboolean            gsf_outfile_zip_set_compression_method
+                                                        (GsfOutfileZip *zip,
+                                                         GsfZipCompressionMethod method);
+
+
+
+

Object Hierarchy

+
+  GObject
+   +----GsfInput
+         +----GsfInfile
+               +----GsfInfileZip
+
+
+  GObject
+   +----GsfOutput
+         +----GsfOutfile
+               +----GsfOutfileZip
+
+
+
+

Properties

+
+  "compression-level"        gint                  : Read
+  "internal-parent"          GsfInfileZip*         : Write / Construct Only
+  "source"                   GsfInput*             : Read / Write / Construct Only
+  "compression-level"        gint                  : Read / Write / Construct Only
+  "entry-name"               gchar*                : Read / Write / Construct Only
+  "sink"                     GsfOutput*            : Read / Write / Construct Only
+
+
+
+

Description

+

+GsfInfile and GsfOutfile support for zip files. +

+
+
+

Details

+
+

GsfInfileZip

+
typedef struct _GsfInfileZip GsfInfileZip;
+

+

+
+
+
+

gsf_infile_zip_new ()

+
GsfInfile *         gsf_infile_zip_new                  (GsfInput *source,
+                                                         GError **err);
+

+Opens the root directory of a Zip file. +

+
+

Note

This adds a reference to source.
+

+

+
++ + + + + + + + + + + + + + +

source :

A base GsfInput +

err :

A GError, optionally null +

Returns :

the new zip file handler +
+
+
+
+

GsfOutfileZip

+
typedef struct _GsfOutfileZip GsfOutfileZip;
+

+

+
+
+
+

gsf_outfile_zip_new ()

+
GsfOutfile *        gsf_outfile_zip_new                 (GsfOutput *sink,
+                                                         GError **err);
+

+Creates the root directory of a Zip file and manages the addition of +children. +

+

+

+
+

Note

This adds a reference to sink.
+

+

+
++ + + + + + + + + + + + + + +

sink :

a GsfOutput to hold the ZIP file +

err :

Location to store error, or NULL; currently unused. +

Returns :

the new zip file handler +
+
+
+
+

gsf_outfile_zip_set_compression_method ()

+
gboolean            gsf_outfile_zip_set_compression_method
+                                                        (GsfOutfileZip *zip,
+                                                         GsfZipCompressionMethod method);
+

+

+
++ + + + + + + + + + + + + + +

zip :

+

method :

+

Returns :

+
+
+
+
+

Property Details

+
+

The "compression-level" property

+
  "compression-level"        gint                  : Read
+

The level of compression used, zero meaning none.

+

Allowed values: [0,10]

+

Default value: 0

+
+
+
+

The "internal-parent" property

+
  "internal-parent"          GsfInfileZip*         : Write / Construct Only
+

Internal use only.

+
+
+
+

The "source" property

+
  "source"                   GsfInput*             : Read / Write / Construct Only
+

The archive being interpreted.

+
+
+
+

The "compression-level" property

+
  "compression-level"        gint                  : Read / Write / Construct Only
+

The level of compression used, zero meaning none.

+

Allowed values: [0,10]

+

Default value: 8

+
+
+
+

The "entry-name" property

+
  "entry-name"               gchar*                : Read / Write / Construct Only
+

The filename of this member in the archive without path.

+

Default value: NULL

+
+
+
+

The "sink" property

+
  "sink"                     GsfOutput*            : Read / Write / Construct Only
+

Where the archive is written.

+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-blobs.html b/doc/html/gsf-blobs.html new file mode 100644 index 0000000..48f0fd2 --- /dev/null +++ b/doc/html/gsf-blobs.html @@ -0,0 +1,236 @@ + + + + +GsfBlob + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GsfBlob

+

GsfBlob

+
+ +
+

Description

+

+

+
+
+

Details

+
+

GsfBlob

+
typedef struct _GsfBlob GsfBlob;
+

+

+
+
+
+

GsfBlobClass

+
typedef struct {
+	GObjectClass parent_class;
+} GsfBlobClass;
+
+

+

+
+
+
+

GsfStructuredBlob

+
typedef struct _GsfStructuredBlob GsfStructuredBlob;
+

+

+
+
+
+

gsf_blob_new ()

+
GsfBlob *           gsf_blob_new                        (gsize size,
+                                                         gconstpointer data_to_copy,
+                                                         GError **error);
+

+Creates a new GsfBlob object to hold the specified data. The blob can then +be used as a facility for reference-counting for the data. The data is +copied internally, so the blob does not hold references to external chunks +of memory. +

+
++ + + + + + + + + + + + + + + + + + +

size :

Size of the data in bytes. +

data_to_copy :

Data which will be copied into the blob, or NULL if size is zero. +

error :

location to store error, or NULL. +

Returns :

A newly-created GsfBlob, or NULL if the data could not be copied. + +Error domain: GSF_ERROR + +Possible errors: GSF_ERROR_OUT_OF_MEMORY if the data_to_copy could not be copied. +
+
+
+
+

gsf_blob_get_size ()

+
gsize               gsf_blob_get_size                   (GsfBlob const *blob);
+

+Queries the size in bytes of the data stored in the blob. +

+
++ + + + + + + + + + +

blob :

A GsfBlob. +

Returns :

Size in bytes, or 0 if the data is NULL. +
+
+
+
+

gsf_blob_peek_data ()

+
gconstpointer       gsf_blob_peek_data                  (GsfBlob const *blob);
+

+Queries a pointer to the data stored in the blob. This does not copy the data +for you; it returns a pointer to the actual buffer which the blob uses internally, +so you should not free this buffer on your own. +

+
++ + + + + + + + + + +

blob :

A GsfBlob. +

Returns :

Pointer to the data stored in the blob, or NULL if the size +of the data is zero. +
+
+
+
+

gsf_structured_blob_write ()

+
gboolean            gsf_structured_blob_write           (GsfStructuredBlob *blob,
+                                                         GsfOutfile *container);
+

+Dumps structured blob blob onto the container. Will fail if the output is +not an Outfile and blob has multiple streams. +

+
++ + + + + + + + + + + + + + +

blob :

+GsfStructuredBlob +

container :

+GsfOutfile +

Returns :

TRUE on success. +
+
+
+
+

gsf_structured_blob_read ()

+
GsfStructuredBlob * gsf_structured_blob_read            (GsfInput *input);
+

+Create a tree of binary blobs with unknown content from a GsfInput or +GsfInfile and store it in a newly created GsfStructuredBlob. +

+
++ + + + + + + + + + +

input :

An input (potentially a GsfInfile) holding the blob +

Returns :

a new GsfStructuredBlob object which the caller is responsible for. +
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-clip-data.html b/doc/html/gsf-clip-data.html new file mode 100644 index 0000000..85e8768 --- /dev/null +++ b/doc/html/gsf-clip-data.html @@ -0,0 +1,311 @@ + + + + +GsfClipData + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GsfClipData

+

GsfClipData

+
+ +
+

Object Hierarchy

+
+  GObject
+   +----GsfClipData
+
+
+
+

Description

+

+

+
+
+

Details

+
+

enum GsfClipFormat

+
typedef enum {
+	GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD = -1,
+	GSF_CLIP_FORMAT_MACINTOSH_CLIPBOARD = -2,
+	GSF_CLIP_FORMAT_GUID = -3,
+	GSF_CLIP_FORMAT_NO_DATA = 0,
+	GSF_CLIP_FORMAT_CLIPBOARD_FORMAT_NAME = 1, /* in the file it's actually any positive integer */
+	GSF_CLIP_FORMAT_UNKNOWN /* this is our own value for unknown types or invalid data */
+} GsfClipFormat;
+
+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD

Windows clipboard format +

GSF_CLIP_FORMAT_MACINTOSH_CLIPBOARD

Macintosh clipboard format +

GSF_CLIP_FORMAT_GUID

GUID that contains a format identifier +

GSF_CLIP_FORMAT_NO_DATA

No clipboard data +

GSF_CLIP_FORMAT_CLIPBOARD_FORMAT_NAME

Custom clipboard format +

GSF_CLIP_FORMAT_UNKNOWN

Unknown clipboard type or invalid data +
+
+
+
+

enum GsfClipFormatWindows

+
typedef enum {
+	GSF_CLIP_FORMAT_WINDOWS_ERROR = -1,		/* our own value */
+	GSF_CLIP_FORMAT_WINDOWS_UNKNOWN = -2,		/* our own value */
+	GSF_CLIP_FORMAT_WINDOWS_METAFILE = 3,		/* CF_METAFILEPICT */
+	GSF_CLIP_FORMAT_WINDOWS_DIB = 8,		/* CF_DIB */
+	GSF_CLIP_FORMAT_WINDOWS_ENHANCED_METAFILE = 14 /* CF_ENHMETAFILE */
+} GsfClipFormatWindows;
+
+

+

+
+
+
+

GsfClipData

+
typedef struct _GsfClipData GsfClipData;
+

+

+
+
+
+

GsfClipDataClass

+
typedef struct {
+	GObjectClass parent_class;
+} GsfClipDataClass;
+
+

+

+
+
+
+

gsf_clip_data_new ()

+
GsfClipData *       gsf_clip_data_new                   (GsfClipFormat format,
+                                                         GsfBlob *data_blob);
+

+Creates a new GsfClipData object. This function acquires a reference to the +data_blob, so you should unref the blob on your own if you no longer need it +directly. +

+
++ + + + + + + + + + + + + + +

format :

Format for the data inside the data_blob +

data_blob :

Object which holds the binary contents for the GsfClipData +

Returns :

A newly-created GsfClipData. +
+
+
+
+

gsf_clip_data_get_format ()

+
GsfClipFormat       gsf_clip_data_get_format            (GsfClipData *clip_data);
+

+Queries the clipboard data format of a GsfClipData. The format refers to the data +blob inside the clip_data; use gsf_clip_data_get_data_blob() to get that data blob. +

+
++ + + + + + + + + + +

clip_data :

A GsfClipData. +

Returns :

The format in which the GsfClipData's data blob is stored. +
+
+
+
+

gsf_clip_data_get_data_blob ()

+
GsfBlob *           gsf_clip_data_get_data_blob         (GsfClipData *clip_data);
+

+Queries the data blob that actually stores a GsfClipData's binary data. +

+
++ + + + + + + + + + +

clip_data :

A GsfClipData. +

Returns :

A new reference to the GsfBlob that stores this clip_data's +binary data. You must use g_object_unref() to dispose of that data blob when +you are done with it. +
+
+
+
+

gsf_clip_data_get_windows_clipboard_format ()

+
GsfClipFormatWindows  gsf_clip_data_get_windows_clipboard_format
+                                                        (GsfClipData *clip_data,
+                                                         GError **error);
+

+Queries the Windows clipboard data format for a GsfClipData. The clip_data must +have been created with GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD. +

+
++ + + + + + + + + + + + + + +

clip_data :

A GsfClipData. +

error :

Location to store error, or NULL +

Returns :

A GsfClipFormatWindows value. + +Possible errors: GSF_ERROR_INVALID_DATA if the data blob in the clip_data is +smaller than it should be; in this case GSF_CLIP_FORMAT_WINDOWS_ERROR will be returned. +
+
+
+
+

gsf_clip_data_peek_real_data ()

+
gconstpointer       gsf_clip_data_peek_real_data        (GsfClipData *clip_data,
+                                                         gsize *ret_size,
+                                                         GError **error);
+

+Queries a pointer directly to the clipboard data of a GsfClipData. The +resulting pointer is not necessarily the same data pointer that was passed to +gsf_blob_new() prior to creating the clip_data. For example, if the data is +in GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD format, then it will have extra header +bytes in front of the actual metafile data. This function will skip over +those header bytes if necessary and return a pointer to the "real" data. +

+
++ + + + + + + + + + + + + + + + + + +

clip_data :

A GsfClipData. +

ret_size :

Location to return the size of the returned data buffer. +

error :

Location to store error, or NULL. +

Returns :

Pointer to the real clipboard data. The size in bytes of this +buffer is returned in the ret_size argument. +
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-index.html b/doc/html/gsf-index.html new file mode 100644 index 0000000..8f31861 --- /dev/null +++ b/doc/html/gsf-index.html @@ -0,0 +1,855 @@ + + + + +Index + + + + + + + + + + + + + + + +
+

+Index

+
+    GObject
+        GsfBlob
+        GsfClipData
+        GsfDocMetaData
+        GsfDocPropVector
+        GsfInput
+            GsfInfile
+                GsfInfileMSOle
+                GsfInfileStdio
+                GsfInfileZip
+                GsfStructuredBlob
+            GsfInputGZip
+            GsfInputMemory
+            GsfInputProxy
+            GsfInputStdio
+            GsfInputTextline
+        GsfOutput
+            GsfOutfile
+                GsfOutfileMSOle
+                GsfOutfileStdio
+                GsfOutfileZip
+            GsfOutputBzip
+            GsfOutputCsv
+            GsfOutputGZip
+            GsfOutputIconv
+            GsfOutputIOChannel
+            GsfOutputMemory
+            GsfOutputStdio
+        GsfXMLOut
+
+
+
+

G

+
+
GsfBlob, GsfBlob +
+
GsfBlobClass, GsfBlobClass +
+
GsfClipData, GsfClipData +
+
GsfClipDataClass, GsfClipDataClass +
+
GsfClipFormat, enum GsfClipFormat +
+
GsfClipFormatWindows, enum GsfClipFormatWindows +
+
GsfDocMetaData, GsfDocMetaData +
+
GsfDocProp, GsfDocProp +
+
GsfDocPropVector, GsfDocPropVector +
+
GsfError, enum GsfError +
+
GsfInfile, GsfInfile +
+
GsfInfileMSOle, GsfInfileMSOle +
+
GsfInfileStdio, GsfInfileStdio +
+
GsfInfileZip, GsfInfileZip +
+
GsfInfileZip:compression-level, The "compression-level" property +
+
GsfInfileZip:internal-parent, The "internal-parent" property +
+
GsfInfileZip:source, The "source" property +
+
GsfInput, GsfInput +
+
GsfInput:eof, The "eof" property +
+
GsfInput:name, The "name" property +
+
GsfInput:position, The "position" property +
+
GsfInput:remaining, The "remaining" property +
+
GsfInput:size, The "size" property +
+
GsfInputBonobo, GsfInputBonobo +
+
GsfInputGio, GsfInputGio +
+
GsfInputGnomeVFS, GsfInputGnomeVFS +
+
GsfInputGZip, GsfInputGZip +
+
GsfInputGZip:raw, The "raw" property +
+
GsfInputGZip:source, The "source" property +
+
GsfInputGZip:uncompressed-size, The "uncompressed-size" property +
+
GsfInputHTTP, GsfInputHTTP +
+
GsfInputMemory, GsfInputMemory +
+
GsfInputProxy, GsfInputProxy +
+
GsfInputStdio, GsfInputStdio +
+
GsfInputTextline, GsfInputTextline +
+
GsfOutfile, GsfOutfile +
+
GsfOutfileMSOle, GsfOutfileMSOle +
+
GsfOutfileStdio, GsfOutfileStdio +
+
GsfOutfileZip, GsfOutfileZip +
+
GsfOutfileZip:compression-level, The "compression-level" property +
+
GsfOutfileZip:entry-name, The "entry-name" property +
+
GsfOutfileZip:sink, The "sink" property +
+
GsfOutput, GsfOutput +
+
GsfOutput:is-closed, The "is-closed" property +
+
GsfOutput:name, The "name" property +
+
GsfOutput:position, The "position" property +
+
GsfOutput:size, The "size" property +
+
GsfOutputBonobo, GsfOutputBonobo +
+
GsfOutputBzip, GsfOutputBzip +
+
GsfOutputCsv, GsfOutputCsv +
+
GsfOutputCsv:eol, The "eol" property +
+
GsfOutputCsv:quote, The "quote" property +
+
GsfOutputCsv:quoting-mode, The "quoting-mode" property +
+
GsfOutputCsv:quoting-on-whitespace, The "quoting-on-whitespace" property +
+
GsfOutputCsv:quoting-triggers, The "quoting-triggers" property +
+
GsfOutputCsv:separator, The "separator" property +
+
GsfOutputCsv:sink, The "sink" property +
+
GsfOutputCsvQuotingMode, enum GsfOutputCsvQuotingMode +
+
GsfOutputGio, GsfOutputGio +
+
GsfOutputGnomeVFS, GsfOutputGnomeVFS +
+
GsfOutputGZip, GsfOutputGZip +
+
GsfOutputGZip:raw, The "raw" property +
+
GsfOutputGZip:sink, The "sink" property +
+
GsfOutputIconv, GsfOutputIconv +
+
GsfOutputIconv:fallback, The "fallback" property +
+
GsfOutputIconv:input-charset, The "input-charset" property +
+
GsfOutputIconv:output-charset, The "output-charset" property +
+
GsfOutputIconv:sink, The "sink" property +
+
GsfOutputIOChannel, GsfOutputIOChannel +
+
GsfOutputMemory, GsfOutputMemory +
+
GsfOutputStdio, GsfOutputStdio +
+
GsfSharedBonoboStream, GsfSharedBonoboStream +
+
GsfStructuredBlob, GsfStructuredBlob +
+
GsfTimestamp, GsfTimestamp +
+
GsfXMLBlob, GsfXMLBlob +
+
GsfXMLContent, enum GsfXMLContent +
+
GsfXMLIn, GsfXMLIn +
+
GsfXMLInDoc, GsfXMLInDoc +
+
GsfXMLInExtDtor, GsfXMLInExtDtor () +
+
GsfXMLInNode, GsfXMLInNode +
+
GsfXMLInNS, GsfXMLInNS +
+
GsfXMLInUnknownFunc, GsfXMLInUnknownFunc () +
+
GsfXMLOut, GsfXMLOut +
+
GsfXMLOut:pretty-print, The "pretty-print" property +
+
GsfXMLProbeFunc, GsfXMLProbeFunc () +
+
gsf_base64_decode_simple, gsf_base64_decode_simple () +
+
gsf_base64_decode_step, gsf_base64_decode_step () +
+
gsf_base64_encode_close, gsf_base64_encode_close () +
+
gsf_base64_encode_simple, gsf_base64_encode_simple () +
+
gsf_base64_encode_step, gsf_base64_encode_step () +
+
gsf_blob_get_size, gsf_blob_get_size () +
+
gsf_blob_new, gsf_blob_new () +
+
gsf_blob_peek_data, gsf_blob_peek_data () +
+
GSF_CLASS, GSF_CLASS() +
+
GSF_CLASS_ABSTRACT, GSF_CLASS_ABSTRACT() +
+
GSF_CLASS_FULL, GSF_CLASS_FULL() +
+
gsf_clip_data_get_data_blob, gsf_clip_data_get_data_blob () +
+
gsf_clip_data_get_format, gsf_clip_data_get_format () +
+
gsf_clip_data_get_windows_clipboard_format, gsf_clip_data_get_windows_clipboard_format () +
+
gsf_clip_data_new, gsf_clip_data_new () +
+
gsf_clip_data_peek_real_data, gsf_clip_data_peek_real_data () +
+
gsf_docprop_vector_append, gsf_docprop_vector_append () +
+
gsf_docprop_vector_as_string, gsf_docprop_vector_as_string () +
+
gsf_docprop_vector_new, gsf_docprop_vector_new () +
+
gsf_doc_meta_data_foreach, gsf_doc_meta_data_foreach () +
+
gsf_doc_meta_data_insert, gsf_doc_meta_data_insert () +
+
gsf_doc_meta_data_lookup, gsf_doc_meta_data_lookup () +
+
gsf_doc_meta_data_new, gsf_doc_meta_data_new () +
+
gsf_doc_meta_data_remove, gsf_doc_meta_data_remove () +
+
gsf_doc_meta_data_size, gsf_doc_meta_data_size () +
+
gsf_doc_meta_data_steal, gsf_doc_meta_data_steal () +
+
gsf_doc_meta_data_store, gsf_doc_meta_data_store () +
+
gsf_doc_meta_dump, gsf_doc_meta_dump () +
+
gsf_doc_prop_dump, gsf_doc_prop_dump () +
+
gsf_doc_prop_free, gsf_doc_prop_free () +
+
gsf_doc_prop_get_link, gsf_doc_prop_get_link () +
+
gsf_doc_prop_get_name, gsf_doc_prop_get_name () +
+
gsf_doc_prop_get_val, gsf_doc_prop_get_val () +
+
gsf_doc_prop_new, gsf_doc_prop_new () +
+
gsf_doc_prop_set_link, gsf_doc_prop_set_link () +
+
gsf_doc_prop_set_val, gsf_doc_prop_set_val () +
+
gsf_doc_prop_swap_val, gsf_doc_prop_swap_val () +
+
GSF_DYNAMIC_CLASS, GSF_DYNAMIC_CLASS() +
+
GSF_DYNAMIC_CLASS_ABSTRACT, GSF_DYNAMIC_CLASS_ABSTRACT() +
+
GSF_DYNAMIC_CLASS_FULL, GSF_DYNAMIC_CLASS_FULL() +
+
GSF_DYNAMIC_INTERFACE, GSF_DYNAMIC_INTERFACE() +
+
GSF_DYNAMIC_INTERFACE_FULL, GSF_DYNAMIC_INTERFACE_FULL() +
+
GSF_ERROR, GSF_ERROR +
+
gsf_error_quark, gsf_error_quark () +
+
gsf_extension_pointer, gsf_extension_pointer () +
+
gsf_filename_to_utf8, gsf_filename_to_utf8 () +
+
gsf_iconv_close, gsf_iconv_close () +
+
gsf_infile_child_by_aname, gsf_infile_child_by_aname () +
+
gsf_infile_child_by_index, gsf_infile_child_by_index () +
+
gsf_infile_child_by_name, gsf_infile_child_by_name () +
+
gsf_infile_child_by_vaname, gsf_infile_child_by_vaname () +
+
gsf_infile_child_by_vname, gsf_infile_child_by_vname () +
+
gsf_infile_msole_get_class_id, gsf_infile_msole_get_class_id () +
+
gsf_infile_msole_new, gsf_infile_msole_new () +
+
gsf_infile_name_by_index, gsf_infile_name_by_index () +
+
gsf_infile_num_children, gsf_infile_num_children () +
+
gsf_infile_stdio_new, gsf_infile_stdio_new () +
+
gsf_infile_zip_new, gsf_infile_zip_new () +
+
gsf_init, gsf_init () +
+
gsf_init_dynamic, gsf_init_dynamic () +
+
gsf_input_bonobo_new, gsf_input_bonobo_new () +
+
gsf_input_container, gsf_input_container () +
+
gsf_input_copy, gsf_input_copy () +
+
gsf_input_dump, gsf_input_dump () +
+
gsf_input_dup, gsf_input_dup () +
+
gsf_input_eof, gsf_input_eof () +
+
gsf_input_error, gsf_input_error () +
+
gsf_input_error_id, gsf_input_error_id () +
+
gsf_input_gio_new, gsf_input_gio_new () +
+
gsf_input_gio_new_for_path, gsf_input_gio_new_for_path () +
+
gsf_input_gio_new_for_uri, gsf_input_gio_new_for_uri () +
+
gsf_input_gnomevfs_needs_local_copy, gsf_input_gnomevfs_needs_local_copy () +
+
gsf_input_gnomevfs_new, gsf_input_gnomevfs_new () +
+
gsf_input_gnomevfs_new_uri, gsf_input_gnomevfs_new_uri () +
+
gsf_input_gzip_new, gsf_input_gzip_new () +
+
gsf_input_http_get_content_type, gsf_input_http_get_content_type () +
+
gsf_input_http_get_type, gsf_input_http_get_type () +
+
gsf_input_http_get_url, gsf_input_http_get_url () +
+
gsf_input_memory_new, gsf_input_memory_new () +
+
gsf_input_memory_new_clone, gsf_input_memory_new_clone () +
+
gsf_input_memory_new_from_bzip, gsf_input_memory_new_from_bzip () +
+
gsf_input_memory_new_from_iochannel, gsf_input_memory_new_from_iochannel () +
+
gsf_input_mmap_new, gsf_input_mmap_new () +
+
gsf_input_name, gsf_input_name () +
+
gsf_input_proxy_new, gsf_input_proxy_new () +
+
gsf_input_proxy_new_section, gsf_input_proxy_new_section () +
+
gsf_input_read, gsf_input_read () +
+
gsf_input_remaining, gsf_input_remaining () +
+
gsf_input_seek, gsf_input_seek () +
+
gsf_input_set_name_from_filename, gsf_input_set_name_from_filename () +
+
gsf_input_sibling, gsf_input_sibling () +
+
gsf_input_size, gsf_input_size () +
+
gsf_input_stdio_new, gsf_input_stdio_new () +
+
gsf_input_stdio_new_FILE, gsf_input_stdio_new_FILE () +
+
gsf_input_tell, gsf_input_tell () +
+
gsf_input_textline_ascii_gets, gsf_input_textline_ascii_gets () +
+
gsf_input_textline_new, gsf_input_textline_new () +
+
gsf_input_textline_utf8_gets, gsf_input_textline_utf8_gets () +
+
gsf_input_uncompress, gsf_input_uncompress () +
+
GSF_INTERFACE, GSF_INTERFACE() +
+
GSF_INTERFACE_FULL, GSF_INTERFACE_FULL() +
+
GSF_LE_GET_DOUBLE, GSF_LE_GET_DOUBLE() +
+
gsf_le_get_double, gsf_le_get_double () +
+
GSF_LE_GET_FLOAT, GSF_LE_GET_FLOAT() +
+
gsf_le_get_float, gsf_le_get_float () +
+
GSF_LE_GET_GINT16, GSF_LE_GET_GINT16() +
+
GSF_LE_GET_GINT32, GSF_LE_GET_GINT32() +
+
GSF_LE_GET_GINT64, GSF_LE_GET_GINT64() +
+
GSF_LE_GET_GINT8, GSF_LE_GET_GINT8() +
+
GSF_LE_GET_GUINT16, GSF_LE_GET_GUINT16() +
+
GSF_LE_GET_GUINT32, GSF_LE_GET_GUINT32() +
+
GSF_LE_GET_GUINT64, GSF_LE_GET_GUINT64() +
+
gsf_le_get_guint64, gsf_le_get_guint64 () +
+
GSF_LE_GET_GUINT8, GSF_LE_GET_GUINT8() +
+
GSF_LE_SET_DOUBLE, GSF_LE_SET_DOUBLE() +
+
gsf_le_set_double, gsf_le_set_double () +
+
GSF_LE_SET_FLOAT, GSF_LE_SET_FLOAT() +
+
gsf_le_set_float, gsf_le_set_float () +
+
GSF_LE_SET_GINT16, GSF_LE_SET_GINT16() +
+
GSF_LE_SET_GINT32, GSF_LE_SET_GINT32() +
+
GSF_LE_SET_GINT64, GSF_LE_SET_GINT64() +
+
GSF_LE_SET_GINT8, GSF_LE_SET_GINT8() +
+
GSF_LE_SET_GUINT16, GSF_LE_SET_GUINT16() +
+
GSF_LE_SET_GUINT32, GSF_LE_SET_GUINT32() +
+
GSF_LE_SET_GUINT64, GSF_LE_SET_GUINT64() +
+
GSF_LE_SET_GUINT8, GSF_LE_SET_GUINT8() +
+
gsf_mem_dump, gsf_mem_dump () +
+
GSF_META_NAME_BYTE_COUNT, GSF_META_NAME_BYTE_COUNT +
+
GSF_META_NAME_CASE_SENSITIVE, GSF_META_NAME_CASE_SENSITIVE +
+
GSF_META_NAME_CATEGORY, GSF_META_NAME_CATEGORY +
+
GSF_META_NAME_CELL_COUNT, GSF_META_NAME_CELL_COUNT +
+
GSF_META_NAME_CHARACTER_COUNT, GSF_META_NAME_CHARACTER_COUNT +
+
GSF_META_NAME_CODEPAGE, GSF_META_NAME_CODEPAGE +
+
GSF_META_NAME_COMPANY, GSF_META_NAME_COMPANY +
+
GSF_META_NAME_CREATOR, GSF_META_NAME_CREATOR +
+
GSF_META_NAME_DATE_CREATED, GSF_META_NAME_DATE_CREATED +
+
GSF_META_NAME_DATE_MODIFIED, GSF_META_NAME_DATE_MODIFIED +
+
GSF_META_NAME_DESCRIPTION, GSF_META_NAME_DESCRIPTION +
+
GSF_META_NAME_DICTIONARY, GSF_META_NAME_DICTIONARY +
+
GSF_META_NAME_DOCUMENT_PARTS, GSF_META_NAME_DOCUMENT_PARTS +
+
GSF_META_NAME_EDITING_DURATION, GSF_META_NAME_EDITING_DURATION +
+
GSF_META_NAME_GENERATOR, GSF_META_NAME_GENERATOR +
+
GSF_META_NAME_HEADING_PAIRS, GSF_META_NAME_HEADING_PAIRS +
+
GSF_META_NAME_HIDDEN_SLIDE_COUNT, GSF_META_NAME_HIDDEN_SLIDE_COUNT +
+
GSF_META_NAME_IMAGE_COUNT, GSF_META_NAME_IMAGE_COUNT +
+
GSF_META_NAME_INITIAL_CREATOR, GSF_META_NAME_INITIAL_CREATOR +
+
GSF_META_NAME_KEYWORD, GSF_META_NAME_KEYWORD +
+
GSF_META_NAME_KEYWORDS, GSF_META_NAME_KEYWORDS +
+
GSF_META_NAME_LANGUAGE, GSF_META_NAME_LANGUAGE +
+
GSF_META_NAME_LAST_PRINTED, GSF_META_NAME_LAST_PRINTED +
+
GSF_META_NAME_LAST_SAVED_BY, GSF_META_NAME_LAST_SAVED_BY +
+
GSF_META_NAME_LINE_COUNT, GSF_META_NAME_LINE_COUNT +
+
GSF_META_NAME_LINKS_DIRTY, GSF_META_NAME_LINKS_DIRTY +
+
GSF_META_NAME_LOCALE_SYSTEM_DEFAULT, GSF_META_NAME_LOCALE_SYSTEM_DEFAULT +
+
GSF_META_NAME_MANAGER, GSF_META_NAME_MANAGER +
+
GSF_META_NAME_MM_CLIP_COUNT, GSF_META_NAME_MM_CLIP_COUNT +
+
GSF_META_NAME_MSOLE_UNKNOWN_17, GSF_META_NAME_MSOLE_UNKNOWN_17 +
+
GSF_META_NAME_MSOLE_UNKNOWN_18, GSF_META_NAME_MSOLE_UNKNOWN_18 +
+
GSF_META_NAME_MSOLE_UNKNOWN_19, GSF_META_NAME_MSOLE_UNKNOWN_19 +
+
GSF_META_NAME_MSOLE_UNKNOWN_20, GSF_META_NAME_MSOLE_UNKNOWN_20 +
+
GSF_META_NAME_MSOLE_UNKNOWN_21, GSF_META_NAME_MSOLE_UNKNOWN_21 +
+
GSF_META_NAME_MSOLE_UNKNOWN_22, GSF_META_NAME_MSOLE_UNKNOWN_22 +
+
GSF_META_NAME_MSOLE_UNKNOWN_23, GSF_META_NAME_MSOLE_UNKNOWN_23 +
+
GSF_META_NAME_NOTE_COUNT, GSF_META_NAME_NOTE_COUNT +
+
GSF_META_NAME_OBJECT_COUNT, GSF_META_NAME_OBJECT_COUNT +
+
GSF_META_NAME_PAGE_COUNT, GSF_META_NAME_PAGE_COUNT +
+
GSF_META_NAME_PARAGRAPH_COUNT, GSF_META_NAME_PARAGRAPH_COUNT +
+
GSF_META_NAME_PRESENTATION_FORMAT, GSF_META_NAME_PRESENTATION_FORMAT +
+
GSF_META_NAME_PRINTED_BY, GSF_META_NAME_PRINTED_BY +
+
GSF_META_NAME_PRINT_DATE, GSF_META_NAME_PRINT_DATE +
+
GSF_META_NAME_REVISION_COUNT, GSF_META_NAME_REVISION_COUNT +
+
GSF_META_NAME_SCALE, GSF_META_NAME_SCALE +
+
GSF_META_NAME_SECURITY, GSF_META_NAME_SECURITY +
+
GSF_META_NAME_SLIDE_COUNT, GSF_META_NAME_SLIDE_COUNT +
+
GSF_META_NAME_SPREADSHEET_COUNT, GSF_META_NAME_SPREADSHEET_COUNT +
+
GSF_META_NAME_SUBJECT, GSF_META_NAME_SUBJECT +
+
GSF_META_NAME_TABLE_COUNT, GSF_META_NAME_TABLE_COUNT +
+
GSF_META_NAME_TEMPLATE, GSF_META_NAME_TEMPLATE +
+
GSF_META_NAME_THUMBNAIL, GSF_META_NAME_THUMBNAIL +
+
GSF_META_NAME_TITLE, GSF_META_NAME_TITLE +
+
GSF_META_NAME_WORD_COUNT, GSF_META_NAME_WORD_COUNT +
+
gsf_msole_codepage_to_lid, gsf_msole_codepage_to_lid () +
+
gsf_msole_iconv_open_codepages_for_export, gsf_msole_iconv_open_codepages_for_export () +
+
gsf_msole_iconv_open_codepage_for_export, gsf_msole_iconv_open_codepage_for_export () +
+
gsf_msole_iconv_open_codepage_for_import, gsf_msole_iconv_open_codepage_for_import () +
+
gsf_msole_iconv_open_for_export, gsf_msole_iconv_open_for_export () +
+
gsf_msole_iconv_open_for_import, gsf_msole_iconv_open_for_import () +
+
gsf_msole_iconv_win_codepage, gsf_msole_iconv_win_codepage () +
+
gsf_msole_inflate, gsf_msole_inflate () +
+
gsf_msole_language_for_lid, gsf_msole_language_for_lid () +
+
gsf_msole_lid_for_language, gsf_msole_lid_for_language () +
+
gsf_msole_lid_to_codepage, gsf_msole_lid_to_codepage () +
+
gsf_msole_lid_to_codepage_str, gsf_msole_lid_to_codepage_str () +
+
gsf_msole_metadata_read, gsf_msole_metadata_read () +
+
gsf_msole_metadata_write, gsf_msole_metadata_write () +
+
gsf_off_t, gsf_off_t +
+
GSF_OFF_T_FORMAT, GSF_OFF_T_FORMAT +
+
gsf_opendoc_metadata_read, gsf_opendoc_metadata_read () +
+
gsf_opendoc_metadata_subtree, gsf_opendoc_metadata_subtree () +
+
gsf_opendoc_metadata_write, gsf_opendoc_metadata_write () +
+
gsf_outfile_msole_new, gsf_outfile_msole_new () +
+
gsf_outfile_msole_new_full, gsf_outfile_msole_new_full () +
+
gsf_outfile_msole_set_class_id, gsf_outfile_msole_set_class_id () +
+
gsf_outfile_new_child, gsf_outfile_new_child () +
+
gsf_outfile_new_child_full, gsf_outfile_new_child_full () +
+
gsf_outfile_new_child_varg, gsf_outfile_new_child_varg () +
+
gsf_outfile_stdio_new, gsf_outfile_stdio_new () +
+
gsf_outfile_stdio_new_full, gsf_outfile_stdio_new_full () +
+
gsf_outfile_stdio_new_valist, gsf_outfile_stdio_new_valist () +
+
gsf_outfile_zip_new, gsf_outfile_zip_new () +
+
gsf_outfile_zip_set_compression_method, gsf_outfile_zip_set_compression_method () +
+
gsf_output_bonobo_new, gsf_output_bonobo_new () +
+
gsf_output_bzip_new, gsf_output_bzip_new () +
+
gsf_output_close, gsf_output_close () +
+
gsf_output_container, gsf_output_container () +
+
gsf_output_csv_write_eol, gsf_output_csv_write_eol () +
+
gsf_output_csv_write_field, gsf_output_csv_write_field () +
+
gsf_output_error, gsf_output_error () +
+
gsf_output_error_id, gsf_output_error_id () +
+
gsf_output_gio_new, gsf_output_gio_new () +
+
gsf_output_gio_new_for_path, gsf_output_gio_new_for_path () +
+
gsf_output_gio_new_for_uri, gsf_output_gio_new_for_uri () +
+
gsf_output_gnomevfs_new, gsf_output_gnomevfs_new () +
+
gsf_output_gnomevfs_new_uri, gsf_output_gnomevfs_new_uri () +
+
gsf_output_gzip_new, gsf_output_gzip_new () +
+
gsf_output_iconv_new, gsf_output_iconv_new () +
+
gsf_output_iochannel_new, gsf_output_iochannel_new () +
+
gsf_output_is_closed, gsf_output_is_closed () +
+
gsf_output_memory_get_bytes, gsf_output_memory_get_bytes () +
+
gsf_output_memory_new, gsf_output_memory_new () +
+
gsf_output_name, gsf_output_name () +
+
gsf_output_printf, gsf_output_printf () +
+
gsf_output_puts, gsf_output_puts () +
+
gsf_output_seek, gsf_output_seek () +
+
gsf_output_set_error, gsf_output_set_error () +
+
gsf_output_set_name_from_filename, gsf_output_set_name_from_filename () +
+
gsf_output_size, gsf_output_size () +
+
gsf_output_stdio_new, gsf_output_stdio_new () +
+
gsf_output_stdio_new_FILE, gsf_output_stdio_new_FILE () +
+
gsf_output_stdio_new_full, gsf_output_stdio_new_full () +
+
gsf_output_stdio_new_valist, gsf_output_stdio_new_valist () +
+
gsf_output_tell, gsf_output_tell () +
+
gsf_output_unwrap, gsf_output_unwrap () +
+
gsf_output_vprintf, gsf_output_vprintf () +
+
gsf_output_wrap, gsf_output_wrap () +
+
gsf_output_write, gsf_output_write () +
+
GSF_PARAM_STATIC, GSF_PARAM_STATIC +
+
gsf_property_settings_collect, gsf_property_settings_collect () +
+
gsf_property_settings_collect_valist, gsf_property_settings_collect_valist () +
+
gsf_property_settings_free, gsf_property_settings_free () +
+
gsf_shared_bonobo_stream_new, gsf_shared_bonobo_stream_new () +
+
gsf_shutdown, gsf_shutdown () +
+
gsf_shutdown_dynamic, gsf_shutdown_dynamic () +
+
gsf_structured_blob_read, gsf_structured_blob_read () +
+
gsf_structured_blob_write, gsf_structured_blob_write () +
+
gsf_timestamp_as_string, gsf_timestamp_as_string () +
+
gsf_timestamp_copy, gsf_timestamp_copy () +
+
gsf_timestamp_equal, gsf_timestamp_equal () +
+
gsf_timestamp_free, gsf_timestamp_free () +
+
gsf_timestamp_from_string, gsf_timestamp_from_string () +
+
gsf_timestamp_hash, gsf_timestamp_hash () +
+
gsf_timestamp_parse, gsf_timestamp_parse () +
+
gsf_value_get_docprop_varray, gsf_value_get_docprop_varray () +
+
gsf_value_get_docprop_vector, gsf_value_get_docprop_vector () +
+
gsf_value_set_timestamp, gsf_value_set_timestamp () +
+
gsf_xmlDocFormatDump, gsf_xmlDocFormatDump () +
+
gsf_xml_gvalue_from_str, gsf_xml_gvalue_from_str () +
+
gsf_xml_in_check_ns, gsf_xml_in_check_ns () +
+
gsf_xml_in_doc_add_nodes, gsf_xml_in_doc_add_nodes () +
+
gsf_xml_in_doc_free, gsf_xml_in_doc_free () +
+
gsf_xml_in_doc_new, gsf_xml_in_doc_new () +
+
gsf_xml_in_doc_parse, gsf_xml_in_doc_parse () +
+
gsf_xml_in_doc_set_unknown_handler, gsf_xml_in_doc_set_unknown_handler () +
+
gsf_xml_in_get_input, gsf_xml_in_get_input () +
+
gsf_xml_in_namecmp, gsf_xml_in_namecmp () +
+
GSF_XML_IN_NODE, GSF_XML_IN_NODE() +
+
GSF_XML_IN_NODE_END, GSF_XML_IN_NODE_END +
+
GSF_XML_IN_NODE_FULL, GSF_XML_IN_NODE_FULL() +
+
GSF_XML_IN_NS, GSF_XML_IN_NS() +
+
GSF_XML_IN_NS_END, GSF_XML_IN_NS_END +
+
gsf_xml_in_push_state, gsf_xml_in_push_state () +
+
gsf_xml_out_add_base64, gsf_xml_out_add_base64 () +
+
gsf_xml_out_add_bool, gsf_xml_out_add_bool () +
+
gsf_xml_out_add_color, gsf_xml_out_add_color () +
+
gsf_xml_out_add_cstr, gsf_xml_out_add_cstr () +
+
gsf_xml_out_add_cstr_unchecked, gsf_xml_out_add_cstr_unchecked () +
+
gsf_xml_out_add_enum, gsf_xml_out_add_enum () +
+
gsf_xml_out_add_float, gsf_xml_out_add_float () +
+
gsf_xml_out_add_gvalue, gsf_xml_out_add_gvalue () +
+
gsf_xml_out_add_int, gsf_xml_out_add_int () +
+
gsf_xml_out_add_uint, gsf_xml_out_add_uint () +
+
gsf_xml_out_end_element, gsf_xml_out_end_element () +
+
gsf_xml_out_get_output, gsf_xml_out_get_output () +
+
gsf_xml_out_new, gsf_xml_out_new () +
+
gsf_xml_out_set_doc_type, gsf_xml_out_set_doc_type () +
+
gsf_xml_out_simple_element, gsf_xml_out_simple_element () +
+
gsf_xml_out_simple_float_element, gsf_xml_out_simple_float_element () +
+
gsf_xml_out_simple_int_element, gsf_xml_out_simple_int_element () +
+
gsf_xml_out_start_element, gsf_xml_out_start_element () +
+
gsf_xml_parser_context, gsf_xml_parser_context () +
+
gsf_xml_probe, gsf_xml_probe () +
+
+
+
+

L

+
+
libgsf_major_version, libgsf_major_version +
+
libgsf_micro_version, libgsf_micro_version +
+
libgsf_minor_version, libgsf_minor_version +
+
+
+
+

V

+
VAL_IS_GSF_TIMESTAMP, VAL_IS_GSF_TIMESTAMP() +
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-memory.html b/doc/html/gsf-memory.html new file mode 100644 index 0000000..f6d4557 --- /dev/null +++ b/doc/html/gsf-memory.html @@ -0,0 +1,239 @@ + + + + +memory + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

memory

+

memory

+
+
+

Synopsis

+
                    GsfInputMemory;
+GsfInput *          gsf_input_mmap_new                  (char const *filename,
+                                                         GError **err);
+GsfInput *          gsf_input_memory_new                (guint8 const *buf,
+                                                         gsf_off_t length,
+                                                         gboolean needs_free);
+GsfInput *          gsf_input_memory_new_clone          (guint8 const *buf,
+                                                         gsf_off_t length);
+GsfInput *          gsf_input_memory_new_from_iochannel (GIOChannel *channel,
+                                                         GError **error);
+                    GsfOutputMemory;
+const guint8*       gsf_output_memory_get_bytes         (GsfOutputMemory *mem);
+GsfOutput *         gsf_output_memory_new               (void);
+
+
+
+

Object Hierarchy

+
+  GObject
+   +----GsfInput
+         +----GsfInputMemory
+
+
+  GObject
+   +----GsfOutput
+         +----GsfOutputMemory
+
+
+
+

Description

+

+

+
+
+

Details

+
+

GsfInputMemory

+
typedef struct _GsfInputMemory GsfInputMemory;
+

+

+
+
+
+

gsf_input_mmap_new ()

+
GsfInput *          gsf_input_mmap_new                  (char const *filename,
+                                                         GError **err);
+
++ + + + + + + + + + + + + + +

filename :

The file on disk that you want to mmap +

err :

A GError, or optionally null +

Returns :

A new GsfInputMemory +
+
+
+
+

gsf_input_memory_new ()

+
GsfInput *          gsf_input_memory_new                (guint8 const *buf,
+                                                         gsf_off_t length,
+                                                         gboolean needs_free);
+
++ + + + + + + + + + + + + + + + + + +

buf :

The input bytes +

length :

The length of buf +

needs_free :

Whether you want this memory to be free'd at object destruction +

Returns :

A new GsfInputMemory +
+
+
+
+

gsf_input_memory_new_clone ()

+
GsfInput *          gsf_input_memory_new_clone          (guint8 const *buf,
+                                                         gsf_off_t length);
+
++ + + + + + + + + + + + + + +

buf :

The input bytes +

length :

The length of buf +

Returns :

A new GsfInputMemory +
+
+
+
+

gsf_input_memory_new_from_iochannel ()

+
GsfInput *          gsf_input_memory_new_from_iochannel (GIOChannel *channel,
+                                                         GError **error);
+
++ + + + + + + + + + + + + + +

channel :

a GIOChannel. +

error :

a GError +

Returns :

a new GsfInputMemory or NULL. +
+
+
+
+

GsfOutputMemory

+
typedef struct _GsfOutputMemory GsfOutputMemory;
+

+

+
+
+
+

gsf_output_memory_get_bytes ()

+
const guint8*       gsf_output_memory_get_bytes         (GsfOutputMemory *mem);
+
++ + + + + + + + + + +

mem :

the output device. +

Returns :

The data that has been written to mem, or null +
+
+
+
+

gsf_output_memory_new ()

+
GsfOutput *         gsf_output_memory_new               (void);
+
++ + + + +

Returns :

a new file or NULL. +
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-metadata.html b/doc/html/gsf-metadata.html new file mode 100644 index 0000000..c9d3b27 --- /dev/null +++ b/doc/html/gsf-metadata.html @@ -0,0 +1,1245 @@ + + + + +metadata + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

metadata

+

metadata

+
+
+

Synopsis

+
                    GsfDocMetaData;
+GsfDocMetaData *    gsf_doc_meta_data_new               (void);
+GsfDocProp *        gsf_doc_meta_data_lookup            (GsfDocMetaData const *meta,
+                                                         char const *name);
+void                gsf_doc_meta_data_insert            (GsfDocMetaData *meta,
+                                                         char *name,
+                                                         GValue *value);
+void                gsf_doc_meta_data_remove            (GsfDocMetaData *meta,
+                                                         char const *name);
+GsfDocProp *        gsf_doc_meta_data_steal             (GsfDocMetaData *meta,
+                                                         char const *name);
+void                gsf_doc_meta_data_store             (GsfDocMetaData *meta,
+                                                         GsfDocProp *prop);
+void                gsf_doc_meta_data_foreach           (GsfDocMetaData const *meta,
+                                                         GHFunc func,
+                                                         gpointer user_data);
+gsize               gsf_doc_meta_data_size              (GsfDocMetaData const *meta);
+void                gsf_doc_meta_dump                   (GsfDocMetaData const *meta);
+                    GsfDocProp;
+GsfDocProp *        gsf_doc_prop_new                    (char *name);
+void                gsf_doc_prop_free                   (GsfDocProp *prop);
+char const   *      gsf_doc_prop_get_name               (GsfDocProp const *prop);
+GValue const *      gsf_doc_prop_get_val                (GsfDocProp const *prop);
+void                gsf_doc_prop_set_val                (GsfDocProp *prop,
+                                                         GValue *val);
+char const   *      gsf_doc_prop_get_link               (GsfDocProp const *prop);
+void                gsf_doc_prop_set_link               (GsfDocProp *prop,
+                                                         char *link);
+void                gsf_doc_prop_dump                   (GsfDocProp const *prop);
+                    GsfDocPropVector;
+GsfDocPropVector *  gsf_docprop_vector_new              (void);
+void                gsf_docprop_vector_append           (GsfDocPropVector *vector,
+                                                         GValue *value);
+gchar *             gsf_docprop_vector_as_string        (GsfDocPropVector const *vector);
+GValueArray *       gsf_value_get_docprop_varray        (GValue const *value);
+GsfDocPropVector *  gsf_value_get_docprop_vector        (GValue const *value);
+
+#define             GSF_META_NAME_TITLE
+#define             GSF_META_NAME_DESCRIPTION
+#define             GSF_META_NAME_SUBJECT
+#define             GSF_META_NAME_DATE_MODIFIED
+#define             GSF_META_NAME_DATE_CREATED
+#define             GSF_META_NAME_KEYWORDS
+#define             GSF_META_NAME_LANGUAGE
+#define             GSF_META_NAME_CODEPAGE
+#define             GSF_META_NAME_REVISION_COUNT
+#define             GSF_META_NAME_EDITING_DURATION
+#define             GSF_META_NAME_TABLE_COUNT
+#define             GSF_META_NAME_IMAGE_COUNT
+#define             GSF_META_NAME_OBJECT_COUNT
+#define             GSF_META_NAME_PAGE_COUNT
+#define             GSF_META_NAME_PARAGRAPH_COUNT
+#define             GSF_META_NAME_WORD_COUNT
+#define             GSF_META_NAME_CHARACTER_COUNT
+#define             GSF_META_NAME_CELL_COUNT
+#define             GSF_META_NAME_SPREADSHEET_COUNT
+#define             GSF_META_NAME_CREATOR
+#define             GSF_META_NAME_TEMPLATE
+#define             GSF_META_NAME_LAST_SAVED_BY
+#define             GSF_META_NAME_LAST_PRINTED
+#define             GSF_META_NAME_PRINT_DATE
+#define             GSF_META_NAME_PRINTED_BY
+#define             GSF_META_NAME_KEYWORD
+#define             GSF_META_NAME_SECURITY
+#define             GSF_META_NAME_CATEGORY
+#define             GSF_META_NAME_PRESENTATION_FORMAT
+#define             GSF_META_NAME_THUMBNAIL
+#define             GSF_META_NAME_GENERATOR
+#define             GSF_META_NAME_LINE_COUNT
+#define             GSF_META_NAME_SLIDE_COUNT
+#define             GSF_META_NAME_NOTE_COUNT
+#define             GSF_META_NAME_HIDDEN_SLIDE_COUNT
+#define             GSF_META_NAME_MM_CLIP_COUNT
+#define             GSF_META_NAME_BYTE_COUNT
+#define             GSF_META_NAME_SCALE
+#define             GSF_META_NAME_HEADING_PAIRS
+#define             GSF_META_NAME_DOCUMENT_PARTS
+#define             GSF_META_NAME_MANAGER
+#define             GSF_META_NAME_COMPANY
+#define             GSF_META_NAME_LINKS_DIRTY
+#define             GSF_META_NAME_DICTIONARY
+#define             GSF_META_NAME_MSOLE_UNKNOWN_17
+#define             GSF_META_NAME_MSOLE_UNKNOWN_18
+#define             GSF_META_NAME_MSOLE_UNKNOWN_19
+#define             GSF_META_NAME_MSOLE_UNKNOWN_20
+#define             GSF_META_NAME_MSOLE_UNKNOWN_21
+#define             GSF_META_NAME_MSOLE_UNKNOWN_22
+#define             GSF_META_NAME_MSOLE_UNKNOWN_23
+#define             GSF_META_NAME_LOCALE_SYSTEM_DEFAULT
+#define             GSF_META_NAME_CASE_SENSITIVE
+#define             GSF_META_NAME_INITIAL_CREATOR
+
+
+
+

Object Hierarchy

+
+  GObject
+   +----GsfDocMetaData
+
+
+  GObject
+   +----GsfDocPropVector
+
+
+
+

Description

+

+

+
+
+

Details

+
+

GsfDocMetaData

+
typedef struct _GsfDocMetaData GsfDocMetaData;
+

+Class representing information about a document, such as creator and time of +last modification. +

+
+
+
+

gsf_doc_meta_data_new ()

+
GsfDocMetaData *    gsf_doc_meta_data_new               (void);
+
++ + + + +

Returns :

a new metadata property collection +
+
+
+
+

gsf_doc_meta_data_lookup ()

+
GsfDocProp *        gsf_doc_meta_data_lookup            (GsfDocMetaData const *meta,
+                                                         char const *name);
+
++ + + + + + + + + + +

meta :

+GsfDocMetaData +

Returns :

the property with name id in meta. The caller can modify the +property value and link but not the name. +
+
+
+
+

gsf_doc_meta_data_insert ()

+
void                gsf_doc_meta_data_insert            (GsfDocMetaData *meta,
+                                                         char *name,
+                                                         GValue *value);
+

+Take ownership of name and value and insert a property into meta. +If a property exists with name, it is replaced (The link is lost) +

+
++ + + + + + + + + + + + + + +

meta :

+GsfDocMetaData +

name :

the id. +

value :

+GValue +
+
+
+
+

gsf_doc_meta_data_remove ()

+
void                gsf_doc_meta_data_remove            (GsfDocMetaData *meta,
+                                                         char const *name);
+

+If name does not exist in the collection, do nothing. If name does exist, +remove it and its value from the collection +

+
++ + + + + + + + + + +

meta :

the collection +

name :

the non-null string name of the property +
+
+
+
+

gsf_doc_meta_data_steal ()

+
GsfDocProp *        gsf_doc_meta_data_steal             (GsfDocMetaData *meta,
+                                                         char const *name);
+

+

+
++ + + + + + + + + + + + + + +

meta :

+

name :

+

Returns :

+
+
+
+
+

gsf_doc_meta_data_store ()

+
void                gsf_doc_meta_data_store             (GsfDocMetaData *meta,
+                                                         GsfDocProp *prop);
+
++ + + + + + + + + + +

meta :

+GsfDocMetaData +

prop :

+GsfDocProp +
+
+
+
+

gsf_doc_meta_data_foreach ()

+
void                gsf_doc_meta_data_foreach           (GsfDocMetaData const *meta,
+                                                         GHFunc func,
+                                                         gpointer user_data);
+

+Iterate through each (key, value) pair in this collection +

+
++ + + + + + + + + + + + + + +

meta :

the collection +

func :

the function called once for each element in the collection +

user_data :

any supplied user data or NULL +
+
+
+
+

gsf_doc_meta_data_size ()

+
gsize               gsf_doc_meta_data_size              (GsfDocMetaData const *meta);
+
++ + + + + + + + + + +

meta :

the collection +

Returns :

the number of items in this collection +
+
+
+
+

gsf_doc_meta_dump ()

+
void                gsf_doc_meta_dump                   (GsfDocMetaData const *meta);
+

+A debugging utility to dump the content of meta via g_print +

+
++ + + + +

meta :

+GsfDocMetaData +
+
+
+
+

GsfDocProp

+
typedef struct _GsfDocProp GsfDocProp;
+

+Class representing a properties of a document. +

+
+
+
+

gsf_doc_prop_new ()

+
GsfDocProp *        gsf_doc_prop_new                    (char *name);
+
++ + + + +

Returns :

a new GsfDocProp which the caller is responsible for freeing. +Takes ownership of name. +
+
+
+
+

gsf_doc_prop_free ()

+
void                gsf_doc_prop_free                   (GsfDocProp *prop);
+

+If prop is non NULL free the memory associated with it +

+
++ + + + +

prop :

+GsfDocProp +
+
+
+
+

gsf_doc_prop_get_name ()

+
char const   *      gsf_doc_prop_get_name               (GsfDocProp const *prop);
+
++ + + + + + + + + + +

prop :

+GsfDocProp +

Returns :

the name of the property, the caller should not modify the result. +
+
+
+
+

gsf_doc_prop_get_val ()

+
GValue const *      gsf_doc_prop_get_val                (GsfDocProp const *prop);
+
++ + + + + + + + + + +

prop :

the property +

Returns :

the value of the property, the caller should not modify the result. +
+
+
+
+

gsf_doc_prop_set_val ()

+
void                gsf_doc_prop_set_val                (GsfDocProp *prop,
+                                                         GValue *val);
+

+Assigns val to prop, and unsets and frees the current value. +

+
++ + + + + + + + + + +

prop :

+GsfDocProp +

val :

+GValue +
+
+
+
+

gsf_doc_prop_get_link ()

+
char const   *      gsf_doc_prop_get_link               (GsfDocProp const *prop);
+
++ + + + + + + + + + +

prop :

+GsfDocProp +

Returns :

the current link descriptor of prop. The result should not be + freed or modified. +
+
+
+
+

gsf_doc_prop_set_link ()

+
void                gsf_doc_prop_set_link               (GsfDocProp *prop,
+                                                         char *link);
+

+Sets prop's link to link +

+
++ + + + + + + + + + +

prop :

+GsfDocProp +

link :

optionally NULL +
+
+
+
+

gsf_doc_prop_dump ()

+
void                gsf_doc_prop_dump                   (GsfDocProp const *prop);
+

+A debugging utility to dump prop as text via g_print +New in 1.14.2 +

+
++ + + + +

prop :

+GsfDocProp +
+
+
+
+

GsfDocPropVector

+
typedef struct _GsfDocPropVector GsfDocPropVector;
+

+

+
+
+
+

gsf_docprop_vector_new ()

+
GsfDocPropVector *  gsf_docprop_vector_new              (void);
+

+This function creates a new gsf_docprop_vector object. +

+
++ + + + +

Returns :

GsfDocPropVector* +
+
+
+
+

gsf_docprop_vector_append ()

+
void                gsf_docprop_vector_append           (GsfDocPropVector *vector,
+                                                         GValue *value);
+

+Insert a copy of value as the last element of vector. +

+
++ + + + + + + + + + +

vector :

The vector to which the GValue will be added +

value :

The GValue to add to vector +
+
+
+
+

gsf_docprop_vector_as_string ()

+
gchar *             gsf_docprop_vector_as_string        (GsfDocPropVector const *vector);
+

+This function returns a string which represents all the GValues in vector. +The caller is responsible for freeing the result. +

+
++ + + + + + + + + + +

vector :

The GsfDocPropVector from which GValues will be extracted. +

Returns :

a string of comma-separated values +
+
+
+
+

gsf_value_get_docprop_varray ()

+
GValueArray *       gsf_value_get_docprop_varray        (GValue const *value);
+

+

+
++ + + + + + + + + + +

value :

+

Returns :

+
+
+
+
+

gsf_value_get_docprop_vector ()

+
GsfDocPropVector *  gsf_value_get_docprop_vector        (GValue const *value);
+

+

+
++ + + + + + + + + + +

value :

+

Returns :

+
+
+
+
+

GSF_META_NAME_TITLE

+
#define GSF_META_NAME_TITLE				"dc:title"
+
+

+(String) A formal name given to the resource. +

+
+
+
+

GSF_META_NAME_DESCRIPTION

+
#define GSF_META_NAME_DESCRIPTION			"dc:description"
+
+

+(String) An account of the content of the resource. +

+
+
+
+

GSF_META_NAME_SUBJECT

+
#define GSF_META_NAME_SUBJECT				"dc:subject"
+
+

+(String) The topic of the content of the resource, +typically including keywords. +

+
+
+
+

GSF_META_NAME_DATE_MODIFIED

+
#define GSF_META_NAME_DATE_MODIFIED			"dc:date"
+
+

+(GsfTimestamp) The last time this document was saved. +

+

+1.14.0 Moved from dc:date-modified to dc:date. +

+
+
+
+

GSF_META_NAME_DATE_CREATED

+
#define GSF_META_NAME_DATE_CREATED			"meta:creation-date"
+
+

+(Date as ISO String) A date associated with an event in the life cycle of +the resource (creation/publication date). +Moved from gsf:date-created to meta:creation-date. This way can be used correctly +by OpenDocument and Gnumeric. +

+
+
+
+

GSF_META_NAME_KEYWORDS

+
#define GSF_META_NAME_KEYWORDS				"dc:keywords"
+
+

+(GsfDocPropVector of String) Searchable, indexable keywords. Similar to PDF +keywords or HTML's meta block. +

+
+
+
+

GSF_META_NAME_LANGUAGE

+
#define GSF_META_NAME_LANGUAGE				"dc:language"
+
+

+(String) The locale language of the intellectual content of the resource + (basically xx_YY form for us). +1.14.0 Clarified that this is unique from _NAME_CODEPAGE in msole +

+
+
+
+

GSF_META_NAME_CODEPAGE

+
#define GSF_META_NAME_CODEPAGE				"msole:codepage"
+
+

+(UnsignedShort) The MS codepage to encode strings for metadata +1.14.0 Clarified that this is unique from _NAME_CODEPAGE in msole +

+
+
+
+

GSF_META_NAME_REVISION_COUNT

+
#define GSF_META_NAME_REVISION_COUNT			"meta:editing-cycles"
+
+

+(Integer) Count of revision on the document, if appropriate. +Moved from gsf:revision-count to meta:editing-cycles. This way can be used +correctly by OpenDocument and Gnumeric. +

+
+
+
+

GSF_META_NAME_EDITING_DURATION

+
#define GSF_META_NAME_EDITING_DURATION			"meta:editing-duration"
+
+

+(Date as ISO String) The total-time taken until the last modification. +Moved from "gsf" to "meta". This way can be used correctly by OpenDocument +and Gnumeric. +

+
+
+
+

GSF_META_NAME_TABLE_COUNT

+
#define GSF_META_NAME_TABLE_COUNT			"gsf:table-count"
+
+

+(Integer) Count of tables in the document, if appropriate. +

+
+
+
+

GSF_META_NAME_IMAGE_COUNT

+
#define GSF_META_NAME_IMAGE_COUNT           		"gsf:image-count"
+
+

+(Integer) Count of images in the document, if appropriate. +

+
+
+
+

GSF_META_NAME_OBJECT_COUNT

+
#define GSF_META_NAME_OBJECT_COUNT			"gsf:object-count"
+
+

+(Integer) Count of objects (OLE and other graphics) in the document, if +appropriate. +

+
+
+
+

GSF_META_NAME_PAGE_COUNT

+
#define GSF_META_NAME_PAGE_COUNT			"gsf:page-count"
+
+

+(Integer) Count of pages in the document, if appropriate. +

+
+
+
+

GSF_META_NAME_PARAGRAPH_COUNT

+
#define GSF_META_NAME_PARAGRAPH_COUNT			"gsf:paragraph-count"
+
+

+(Integer) Count of paragraphs in the document, if appropriate. +

+
+
+
+

GSF_META_NAME_WORD_COUNT

+
#define GSF_META_NAME_WORD_COUNT			"gsf:word-count"
+
+

+(Integer) Count of words in the document. +

+
+
+
+

GSF_META_NAME_CHARACTER_COUNT

+
#define GSF_META_NAME_CHARACTER_COUNT			"gsf:character-count"
+
+

+(Integer) Count of characters in the document. +

+

+TODO See how to sync this with ODF's document-statistic +

+
+
+
+

GSF_META_NAME_CELL_COUNT

+
#define GSF_META_NAME_CELL_COUNT			"gsf:cell-count"
+
+

+(Integer) Count of cells in the spread-sheet document, if appropriate. +

+
+
+
+

GSF_META_NAME_SPREADSHEET_COUNT

+
#define GSF_META_NAME_SPREADSHEET_COUNT			"gsf:spreadsheet-count"
+
+

+(Integer) Count of pages in the document, if appropriate. +

+
+
+
+

GSF_META_NAME_CREATOR

+
#define GSF_META_NAME_CREATOR				"dc:creator"
+
+

+(String) An entity primarily responsible for making the content of the +resource typically a person, organization, or service. +

+

+1.14.0 Moved from "gsf" to "dc". +

+
+
+
+

GSF_META_NAME_TEMPLATE

+
#define GSF_META_NAME_TEMPLATE				"meta:template"
+
+

+(String) The template file that is been used to generate this document. +

+

+1.14.0 Moved from "gsf" to "meta" +

+
+
+
+

GSF_META_NAME_LAST_SAVED_BY

+
#define GSF_META_NAME_LAST_SAVED_BY         		"gsf:last-saved-by"
+
+

+(String) The entity that made the last change to the document, typically a +person, organization, or service. +

+
+
+
+

GSF_META_NAME_LAST_PRINTED

+
#define GSF_META_NAME_LAST_PRINTED			"gsf:last-printed"
+
+

+(GSF_META_NAME_HEADING_PAIRS) The last time this document was printed. +

+

+1.14.0 Moved from "gsf" to "dc". +1.14.1 Moved back to "gsf" from "dc". +

+
+
+
+

GSF_META_NAME_PRINT_DATE

+
#define GSF_META_NAME_PRINT_DATE			"meta:print-date"
+
+

+(GsfTimestamp) Specifies the date and time when the document was last +printed. +

+
+
+
+

GSF_META_NAME_PRINTED_BY

+
#define GSF_META_NAME_PRINTED_BY			"meta:printed-by"
+
+

+(String) Specifies the name of the last person who printed the document. +

+

+1.14.0 Moved from "gsf" to "meta". +

+
+
+
+

GSF_META_NAME_KEYWORD

+
#define GSF_META_NAME_KEYWORD				"meta:keyword"
+
+

+(String) Searchable, indexable keywords. Similar to PDF keywords or HTML's +meta block. +

+
+
+
+

GSF_META_NAME_SECURITY

+
#define GSF_META_NAME_SECURITY				"gsf:security"
+
+

+(Integer) Level of security. +

+

+

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + +
LevelValue
None0
Password protected1
Read-only recommended2
Read-only enforced3
Locked for annotations4
+

+

+
+
+
+

GSF_META_NAME_CATEGORY

+
#define GSF_META_NAME_CATEGORY				"gsf:category"
+
+

+(String) Category of the document.

+
+

Note

example???
+

+

+
+
+
+

GSF_META_NAME_PRESENTATION_FORMAT

+
#define GSF_META_NAME_PRESENTATION_FORMAT		"gsf:presentation-format"
+
+

+(String) Type of presentation, like "On-screen Show", "SlideView" etc. +

+
+
+
+

GSF_META_NAME_THUMBNAIL

+
#define GSF_META_NAME_THUMBNAIL				"gsf:thumbnail"
+
+

+(GsfClipData) Thumbnail data of the document, typically a +preview image of the document. +

+
+
+
+

GSF_META_NAME_GENERATOR

+
#define GSF_META_NAME_GENERATOR				"meta:generator"
+
+

+(String) The application that generated this document. AbiWord, Gnumeric, +etc... +

+

+1.14.0 Moved from "gsf" to "meta". +

+
+
+
+

GSF_META_NAME_LINE_COUNT

+
#define GSF_META_NAME_LINE_COUNT			"gsf:line-count"
+
+

+(Integer) Count of liness in the document. +

+
+
+
+

GSF_META_NAME_SLIDE_COUNT

+
#define GSF_META_NAME_SLIDE_COUNT			"gsf:slide-count"
+
+

+(Integer) Count of slides in the presentation document. +

+
+
+
+

GSF_META_NAME_NOTE_COUNT

+
#define GSF_META_NAME_NOTE_COUNT			"gsf:note-count"
+
+

+(Integer) Count of "notes" in the document. +

+
+
+
+

GSF_META_NAME_HIDDEN_SLIDE_COUNT

+
#define GSF_META_NAME_HIDDEN_SLIDE_COUNT		"gsf:hidden-slide-count"
+
+

+(Integer) Count of hidden-slides in the presentation document. +

+
+
+
+

GSF_META_NAME_MM_CLIP_COUNT

+
#define GSF_META_NAME_MM_CLIP_COUNT			"gsf:MM-clip-count"
+
+

+(Integer) Count of "multi-media" clips in the document. +

+
+
+
+

GSF_META_NAME_BYTE_COUNT

+
#define GSF_META_NAME_BYTE_COUNT			"gsf:byte-count"
+
+

+(Integer) Count of bytes in the document. +

+
+
+
+

GSF_META_NAME_SCALE

+
#define GSF_META_NAME_SCALE				"gsf:scale"
+
+

+(Boolean) ????? +

+
+
+
+

GSF_META_NAME_HEADING_PAIRS

+
#define GSF_META_NAME_HEADING_PAIRS			"gsf:heading-pairs"
+
+

+(Vector of string value pairs stored in alternating elements) Store the +counts of objects in the document as names 'worksheet' and count '4' +From MSOLE +

+
+
+
+

GSF_META_NAME_DOCUMENT_PARTS

+
#define GSF_META_NAME_DOCUMENT_PARTS			"gsf:document-parts"
+
+

+(Vector of strings) Names of the 'interesting' parts of the document. In +spreadsheets this is a list of the sheet names, and the named expressions. +From MSOLE +

+
+
+
+

GSF_META_NAME_MANAGER

+
#define GSF_META_NAME_MANAGER				"gsf:manager"
+
+

+(String) Name of the manager of "CREATOR" entity. +

+
+
+
+

GSF_META_NAME_COMPANY

+
#define GSF_META_NAME_COMPANY				"dc:publisher"
+
+

+(String) Name of the company/organization that the "CREATOR" entity is +associated with. +

+

+1.14.1 Moved from "gsf:company" to "dc:publisher". +

+
+
+
+

GSF_META_NAME_LINKS_DIRTY

+
#define GSF_META_NAME_LINKS_DIRTY			"gsf:links-dirty"
+
+

+(Boolean) ??????? +

+
+
+
+

GSF_META_NAME_DICTIONARY

+
#define GSF_META_NAME_DICTIONARY			"gsf:dictionary"
+
+

+(None) Reserved name (PID) for Dictionary +

+
+
+
+

GSF_META_NAME_MSOLE_UNKNOWN_17

+
#define GSF_META_NAME_MSOLE_UNKNOWN_17			"msole:unknown-doc-17"
+
+

+(Unknown) User-defined name +

+
+
+
+

GSF_META_NAME_MSOLE_UNKNOWN_18

+
#define GSF_META_NAME_MSOLE_UNKNOWN_18			"msole:unknown-doc-18"
+
+

+(Unknown) User-defined name +

+
+
+
+

GSF_META_NAME_MSOLE_UNKNOWN_19

+
#define GSF_META_NAME_MSOLE_UNKNOWN_19			"msole:unknown-doc-19"
+
+

+(Boolean) User-defined name +

+
+
+
+

GSF_META_NAME_MSOLE_UNKNOWN_20

+
#define GSF_META_NAME_MSOLE_UNKNOWN_20			"msole:unknown-doc-20"
+
+

+(Unknown) User-defined name +

+
+
+
+

GSF_META_NAME_MSOLE_UNKNOWN_21

+
#define GSF_META_NAME_MSOLE_UNKNOWN_21			"msole:unknown-doc-21"
+
+

+(Unknown) User-defined name +

+
+
+
+

GSF_META_NAME_MSOLE_UNKNOWN_22

+
#define GSF_META_NAME_MSOLE_UNKNOWN_22			"msole:unknown-doc-22"
+
+

+(Boolean) User-defined name +

+
+
+
+

GSF_META_NAME_MSOLE_UNKNOWN_23

+
#define GSF_META_NAME_MSOLE_UNKNOWN_23			"msole:unknown-doc-23"
+
+

+(i4) User-defined name +

+
+
+
+

GSF_META_NAME_LOCALE_SYSTEM_DEFAULT

+
#define GSF_META_NAME_LOCALE_SYSTEM_DEFAULT		"gsf:default-locale"
+
+

+(Unsigned Integer) Identifier representing the default system locale. +

+
+
+
+

GSF_META_NAME_CASE_SENSITIVE

+
#define GSF_META_NAME_CASE_SENSITIVE			"gsf:case-sensitivity"
+
+

+(Unsigned Integer) Identifier representing the case-sensitiveness. +

+
+

Note

of what ?? why is it an integer ??
+

+

+
+
+
+

GSF_META_NAME_INITIAL_CREATOR

+
#define GSF_META_NAME_INITIAL_CREATOR			"meta:initial-creator"
+
+

+(String) Specifies the name of the person who created the document +initially. +1.14.0 Moved from "gsf" to "meta". +

+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-users.html b/doc/html/gsf-users.html new file mode 100644 index 0000000..c9311ac --- /dev/null +++ b/doc/html/gsf-users.html @@ -0,0 +1,70 @@ + + + + +Part IV. Projects using GSF + + + + + + + + + + + + + + + + +
+

+Part IV. Projects using GSF

+
+
+

+GSF is now also being used by other projects than Gnumeric, including +

+
++ + + + + + + + + + + + + + + + + + +

KWord

+The word processor application of KOffice, the integrated office suite for +KDE, the K Desktop Environment. +

librsvg

+A library to support the SVG scalable vector graphics +format. +

libwpd

+A library for importing WordPerfect® documents. +

planner

+A project management application. +

+

+ +

+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf-utils.html b/doc/html/gsf-utils.html new file mode 100644 index 0000000..e57bdc2 --- /dev/null +++ b/doc/html/gsf-utils.html @@ -0,0 +1,2094 @@ + + + + +utils + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

utils

+

utils

+
+
+

Synopsis

+
void                gsf_init                            (void);
+void                gsf_shutdown                        (void);
+void                gsf_init_dynamic                    (GTypeModule *module);
+void                gsf_shutdown_dynamic                (GTypeModule *module);
+extern              int libgsf_major_version;
+extern              int libgsf_minor_version;
+extern              int libgsf_micro_version;
+
+#define             GSF_CLASS                           (name,
+                                                         prefix,
+                                                         class_init,
+                                                         instance_init,
+                                                         parent)
+#define             GSF_CLASS_FULL                      (name,
+                                                         prefix,
+                                                         base_init,
+                                                         base_finalize,
+                                                         class_init,
+                                                         class_finalize,
+                                                         instance_init,
+                                                         parent_type,
+                                                         abstract,
+                                                         interface_decl)
+#define             GSF_CLASS_ABSTRACT                  (name,
+                                                         prefix,
+                                                         class_init,
+                                                         instance_init,
+                                                         parent)
+#define             GSF_INTERFACE                       (init_func,
+                                                         iface_type)
+#define             GSF_INTERFACE_FULL                  (type,
+                                                         init_func,
+                                                         iface_type)
+#define             GSF_DYNAMIC_CLASS                   (name,
+                                                         prefix,
+                                                         class_init,
+                                                         instance_init,
+                                                         parent)
+#define             GSF_DYNAMIC_CLASS_FULL              (name,
+                                                         prefix,
+                                                         base_init,
+                                                         base_finalize,
+                                                         class_init,
+                                                         class_finalize,
+                                                         instance_init,
+                                                         parent_type,
+                                                         abstract,
+                                                         interface_decl)
+#define             GSF_DYNAMIC_CLASS_ABSTRACT          (name,
+                                                         prefix,
+                                                         class_init,
+                                                         instance_init,
+                                                         parent)
+#define             GSF_DYNAMIC_INTERFACE               (init_func,
+                                                         iface_type,
+                                                         module)
+#define             GSF_DYNAMIC_INTERFACE_FULL          (type,
+                                                         init_func,
+                                                         iface_type,
+                                                         module)
+#define             GSF_PARAM_STATIC
+
+#define             GSF_ERROR
+enum                GsfError;
+GQuark              gsf_error_quark                     (void);
+
+void                gsf_mem_dump                        (guint8 const *ptr,
+                                                         size_t len);
+void                gsf_input_dump                      (GsfInput *input,
+                                                         gboolean dump_as_hex);
+
+#define             GSF_OFF_T_FORMAT
+typedef             gsf_off_t;
+char *              gsf_filename_to_utf8                (char const *filename,
+                                                         gboolean quoted);
+void                gsf_iconv_close                     (GIConv handle);
+char const *        gsf_extension_pointer               (char const *path);
+
+guint8 *            gsf_base64_encode_simple            (guint8 const *data,
+                                                         size_t len);
+size_t              gsf_base64_encode_close             (guint8 const *in,
+                                                         size_t inlen,
+                                                         gboolean break_lines,
+                                                         guint8 *out,
+                                                         int *state,
+                                                         guint *save);
+size_t              gsf_base64_encode_step              (guint8 const *in,
+                                                         size_t len,
+                                                         gboolean break_lines,
+                                                         guint8 *out,
+                                                         int *state,
+                                                         guint *save);
+size_t              gsf_base64_decode_simple            (guint8 *data,
+                                                         size_t len);
+size_t              gsf_base64_decode_step              (guint8 const *in,
+                                                         size_t len,
+                                                         guint8 *out,
+                                                         int *state,
+                                                         guint *save);
+#define             GSF_LE_GET_GINT8                    (p)
+#define             GSF_LE_GET_GUINT64                  (p)
+#define             GSF_LE_GET_GINT16                   (p)
+#define             GSF_LE_GET_GUINT8                   (p)
+#define             GSF_LE_GET_GINT32                   (p)
+#define             GSF_LE_GET_GUINT16                  (p)
+#define             GSF_LE_GET_GUINT32                  (p)
+#define             GSF_LE_GET_GINT64                   (p)
+guint64             gsf_le_get_guint64                  (void const *p);
+#define             GSF_LE_GET_FLOAT                    (p)
+float               gsf_le_get_float                    (void const *p);
+#define             GSF_LE_GET_DOUBLE                   (p)
+double              gsf_le_get_double                   (void const *p);
+#define             GSF_LE_SET_GUINT8                   (p,
+                                                         dat)
+#define             GSF_LE_SET_GUINT16                  (p,
+                                                         dat)
+#define             GSF_LE_SET_GUINT32                  (p,
+                                                         dat)
+#define             GSF_LE_SET_GINT8                    (p,
+                                                         dat)
+#define             GSF_LE_SET_GINT16                   (p,
+                                                         dat)
+#define             GSF_LE_SET_GINT32                   (p,
+                                                         dat)
+#define             GSF_LE_SET_GINT64                   (p,
+                                                         dat)
+#define             GSF_LE_SET_GUINT64                  (p,
+                                                         dat)
+#define             GSF_LE_SET_FLOAT                    (p,
+                                                         dat)
+#define             GSF_LE_SET_DOUBLE                   (p,
+                                                         dat)
+void                gsf_le_set_float                    (void *p,
+                                                         float f);
+void                gsf_le_set_double                   (void *p,
+                                                         double d);
+
+                    GsfTimestamp;
+GsfTimestamp *      gsf_timestamp_copy                  (GsfTimestamp const *stamp);
+void                gsf_timestamp_free                  (GsfTimestamp *stamp);
+char *              gsf_timestamp_as_string             (GsfTimestamp const *stamp);
+int                 gsf_timestamp_from_string           (char const *spec,
+                                                         GsfTimestamp *stamp);
+guint               gsf_timestamp_hash                  (GsfTimestamp const *stamp);
+gboolean            gsf_timestamp_equal                 (GsfTimestamp const *a,
+                                                         GsfTimestamp const *b);
+void                gsf_value_set_timestamp             (GValue *value,
+                                                         GsfTimestamp const *stamp);
+#define             VAL_IS_GSF_TIMESTAMP                (v)
+
+
+int                 gsf_timestamp_parse                 (char const *spec,
+                                                         GsfTimestamp *stamp);
+
+GValue *            gsf_doc_prop_swap_val               (GsfDocProp *prop,
+                                                         GValue *val);
+void                gsf_property_settings_collect       (GType object_type,
+                                                         GParameter **p_params,
+                                                         size_t *p_n_params,
+                                                         const gchar *first_property_name,
+                                                         ...);
+void                gsf_property_settings_collect_valist
+                                                        (GType object_type,
+                                                         GParameter **p_params,
+                                                         size_t *p_n_params,
+                                                         const gchar *first_property_name,
+                                                         va_list var_args);
+void                gsf_property_settings_free          (GParameter *params,
+                                                         size_t n_params);
+
+
+
+

Description

+

+

+
+
+

Details

+
+

gsf_init ()

+
void                gsf_init                            (void);
+

+Initializes the GSF library +

+
+
+
+

gsf_shutdown ()

+
void                gsf_shutdown                        (void);
+

+De-intializes the GSF library from a type module. +Currently does nothing. +

+
+
+
+

gsf_init_dynamic ()

+
void                gsf_init_dynamic                    (GTypeModule *module);
+

+Initializes the GSF library and associates it with a type module mod. +

+
++ + + + +

module :

+GTypeModule. +
+
+
+
+

gsf_shutdown_dynamic ()

+
void                gsf_shutdown_dynamic                (GTypeModule *module);
+

+

+
++ + + + +

module :

+
+
+
+
+

libgsf_major_version

+
extern int libgsf_major_version;
+
+

+Major version number of libgsf, indicating the ABI version. +

+
+
+
+

libgsf_minor_version

+
extern int libgsf_minor_version;
+
+

+Minor (secondary) version number of libgsf, indicating the API version. +

+
+
+
+

libgsf_micro_version

+
extern int libgsf_micro_version;
+
+

+Micro (tertiary) version number of libgsf, indicating bug fixes. +

+
+
+
+

GSF_CLASS()

+
#define             GSF_CLASS(name, prefix, class_init, instance_init, parent)
+

+Set up a GSF class. +

+
++ + + + + + + + + + + + + + + + + + + + + + +

name :

(string) Name of the class. +

prefix :

(string) Prefix designating the namespace to be used for +implementing the class. +

class_init :

(GClassInitFunc) Initialisation function for the class. +

instance_init :

(GInstanceInitFunc) Initialisation (constructor) function +for an instance of the class. +

parent :

Parent class to this class. +
+
+
+
+

GSF_CLASS_FULL()

+
#define             GSF_CLASS_FULL(name, prefix, base_init, base_finalize, \
+            		       class_init, class_finalize, instance_init, parent_type, \
+            		       abstract, interface_decl)
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

name :

+

prefix :

+

base_init :

+

base_finalize :

+

class_init :

+

class_finalize :

+

instance_init :

+

parent_type :

+

abstract :

+

interface_decl :

+
+
+
+
+

GSF_CLASS_ABSTRACT()

+
#define             GSF_CLASS_ABSTRACT(name, prefix, class_init, instance_init, parent)
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

name :

+

prefix :

+

class_init :

+

instance_init :

+

parent :

+
+
+
+
+

GSF_INTERFACE()

+
#define             GSF_INTERFACE(init_func, iface_type)
+

+

+
++ + + + + + + + + + +

init_func :

+

iface_type :

+
+
+
+
+

GSF_INTERFACE_FULL()

+
#define             GSF_INTERFACE_FULL(type, init_func, iface_type)
+

+

+
++ + + + + + + + + + + + + + +

type :

+

init_func :

+

iface_type :

+
+
+
+
+

GSF_DYNAMIC_CLASS()

+
#define             GSF_DYNAMIC_CLASS(name, prefix, class_init, instance_init, parent)
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

name :

+

prefix :

+

class_init :

+

instance_init :

+

parent :

+
+
+
+
+

GSF_DYNAMIC_CLASS_FULL()

+
#define             GSF_DYNAMIC_CLASS_FULL(name, prefix, base_init, base_finalize, \
+            				   class_init,  class_finalize, instance_init, parent_type, \
+            			       abstract, interface_decl)
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

name :

+

prefix :

+

base_init :

+

base_finalize :

+

class_init :

+

class_finalize :

+

instance_init :

+

parent_type :

+

abstract :

+

interface_decl :

+
+
+
+
+

GSF_DYNAMIC_CLASS_ABSTRACT()

+
#define             GSF_DYNAMIC_CLASS_ABSTRACT(name, prefix, class_init, instance_init, parent)
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

name :

+

prefix :

+

class_init :

+

instance_init :

+

parent :

+
+
+
+
+

GSF_DYNAMIC_INTERFACE()

+
#define             GSF_DYNAMIC_INTERFACE(init_func, iface_type, module)
+

+

+
++ + + + + + + + + + + + + + +

init_func :

+

iface_type :

+

module :

+
+
+
+
+

GSF_DYNAMIC_INTERFACE_FULL()

+
#define             GSF_DYNAMIC_INTERFACE_FULL(type, init_func, iface_type, module)
+

+

+
++ + + + + + + + + + + + + + + + + + +

type :

+

init_func :

+

iface_type :

+

module :

+
+
+
+
+

GSF_PARAM_STATIC

+
#define             GSF_PARAM_STATIC
+

+

+
+
+
+

GSF_ERROR

+
#define GSF_ERROR (gsf_error_quark ())
+
+

+

+
+
+
+

enum GsfError

+
typedef enum {
+	GSF_ERROR_OUT_OF_MEMORY,
+	GSF_ERROR_INVALID_DATA
+} GsfError;
+
+
++ + + + + + + + + + +

GSF_ERROR_OUT_OF_MEMORY

Memory allocation failed +

GSF_ERROR_INVALID_DATA

Invalid data encountered (e.g. not enough data) +
+
+
+
+

gsf_error_quark ()

+
GQuark              gsf_error_quark                     (void);
+
++ + + + +

Returns :

the GQuark used to identify libgsf errors in GError structures. + Specific error codes come from the GsfError enumeration. +
+
+
+
+

gsf_mem_dump ()

+
void                gsf_mem_dump                        (guint8 const *ptr,
+                                                         size_t len);
+

+Dump len bytes from the memory location given by ptr. +

+
++ + + + + + + + + + +

ptr :

memory area to be dumped. +

len :

how many bytes will be dumped. +
+
+
+
+

gsf_input_dump ()

+
void                gsf_input_dump                      (GsfInput *input,
+                                                         gboolean dump_as_hex);
+

+Dumps input's contents to STDOUT, optionally in hex format. +

+
++ + + + + + + + + + +

input :

a GsfInput +

dump_as_hex :

If TRUE, dump in hexidecmal format +
+
+
+
+

GSF_OFF_T_FORMAT

+
#define GSF_OFF_T_FORMAT G_GINT64_FORMAT
+
+

+The printf(3) conversion specifier to be used for printing values of type +gsf_off_t. +

+
+
+
+

gsf_off_t

+
typedef gint64 gsf_off_t;
+
+

+Data type to represent offsets (positions) within a data stream. +

+

+FIXME: +gsf_off_t is really supposed to be the widest type off_t can be configured +to on the platform +

+
+
+
+

gsf_filename_to_utf8 ()

+
char *              gsf_filename_to_utf8                (char const *filename,
+                                                         gboolean quoted);
+

+A utility wrapper to make sure filenames are valid utf8. +Caller must g_free the result. +

+
++ + + + + + + + + + + + + + +

filename :

file name suitable for open(2). +

quoted :

if TRUE, the resulting utf8 file name will be quoted + (unless it is invalid). +

Returns :

filename using utf-8 encoding for display +
+
+
+
+

gsf_iconv_close ()

+
void                gsf_iconv_close                     (GIConv handle);
+

+A utility wrapper to safely close an iconv handle. +

+
++ + + + +

handle :

handle to be closed. +
+
+
+
+

gsf_extension_pointer ()

+
char const *        gsf_extension_pointer               (char const *path);
+

+Extracts the extension from the end of a filename (the part after the final +'.' in the filename). +

+
++ + + + + + + + + + +

path :

A filename or file path. +

Returns :

A pointer to the extension part of the filename, or a +pointer to the end of the string if the filename does not +have an extension. +
+
+
+
+

gsf_base64_encode_simple ()

+
guint8 *            gsf_base64_encode_simple            (guint8 const *data,
+                                                         size_t len);
+

+Encodes data from data back into data using base64 encoding. +

+
++ + + + + + + + + + + + + + +

data :

data stream +

len :

max length of data to encode +

Returns :

the number of bytes encoded +
+
+
+
+

gsf_base64_encode_close ()

+
size_t              gsf_base64_encode_close             (guint8 const *in,
+                                                         size_t inlen,
+                                                         gboolean break_lines,
+                                                         guint8 *out,
+                                                         int *state,
+                                                         guint *save);
+

+This funcion should be called to when finished encoding everything, to +flush off the last little bit. +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

in :

Data to be encoded +

inlen :

Length of data to be encoded +

break_lines :

Whether to use line breaks +

out :

Encoded data. +

state :

holds the number of bits that are stored in save +

save :

leftover bits that have not yet been decoded +

Returns :

a count of the number of bytes in the final block. +
+
+
+
+

gsf_base64_encode_step ()

+
size_t              gsf_base64_encode_step              (guint8 const *in,
+                                                         size_t len,
+                                                         gboolean break_lines,
+                                                         guint8 *out,
+                                                         int *state,
+                                                         guint *save);
+

+Performs an 'encode step', only encodes blocks of 3 characters from in into +the output out at a time, saves left-over state in state and save +(initialise to 0 on first invocation). +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

in :

input stream +

len :

max length of data to decode +

break_lines :

Whether to use line breaks +

out :

output stream +

state :

holds the number of bits that are stored in save +

save :

leftover bits that have not yet been decoded +

Returns :

the number of bytes encoded +
+
+
+
+

gsf_base64_decode_simple ()

+
size_t              gsf_base64_decode_simple            (guint8 *data,
+                                                         size_t len);
+

+Decodes a chunk of base64 encoded data from data back into data. +

+
++ + + + + + + + + + + + + + +

data :

data stream +

len :

max length of data to decode +

Returns :

the number of bytes converted +
+
+
+
+

gsf_base64_decode_step ()

+
size_t              gsf_base64_decode_step              (guint8 const *in,
+                                                         size_t len,
+                                                         guint8 *out,
+                                                         int *state,
+                                                         guint *save);
+

+Decodes a chunk of base64 encoded data +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

in :

input stream +

len :

max length of data to decode +

out :

output stream +

state :

holds the number of bits that are stored in save +

save :

leftover bits that have not yet been decoded +

Returns :

the number of bytes converted +
+
+
+
+

GSF_LE_GET_GINT8()

+
#define GSF_LE_GET_GINT8(p) ((gint8)GSF_LE_GET_GUINT8(p))
+
+

+Interpret binary data as a signed 8-bit integer in little endian order. +

+
++ + + + + + + + + + +

p :

pointer to storage +

Returns :

interpreted data +
+
+
+
+

GSF_LE_GET_GUINT64()

+
#define GSF_LE_GET_GUINT64(p) (gsf_le_get_guint64 (p))
+
+

+Interpret binary data as an unsigned 64-bit integer in little endian order. +

+
++ + + + + + + + + + +

p :

pointer to storage +

Returns :

interpreted data +
+
+
+
+

GSF_LE_GET_GINT16()

+
#define GSF_LE_GET_GINT16(p) ((gint16)GSF_LE_GET_GUINT16(p))
+
+

+Interpret binary data as a signed 16-bit integer in little endian order. +

+
++ + + + + + + + + + +

p :

pointer to storage +

Returns :

interpreted data +
+
+
+
+

GSF_LE_GET_GUINT8()

+
#define GSF_LE_GET_GUINT8(p) (*(guint8 const *)(p))
+
+

+Interpret binary data as an unsigned 8-bit integer in little endian order. +

+
++ + + + + + + + + + +

p :

pointer to storage +

Returns :

interpreted data +
+
+
+
+

GSF_LE_GET_GINT32()

+
#define GSF_LE_GET_GINT32(p) ((gint32)GSF_LE_GET_GUINT32(p))
+
+

+Interpret binary data as a signed 32-bit integer in little endian order. +

+
++ + + + + + + + + + +

p :

pointer to storage +

Returns :

interpreted data +
+
+
+
+

GSF_LE_GET_GUINT16()

+
#define             GSF_LE_GET_GUINT16(p)
+

+Interpret binary data as an unsigned 16-bit integer in little endian order. +

+
++ + + + + + + + + + +

p :

pointer to storage +

Returns :

interpreted data +
+
+
+
+

GSF_LE_GET_GUINT32()

+
#define             GSF_LE_GET_GUINT32(p)
+

+Interpret binary data as an unsigned 32-bit integer in little endian order. +

+
++ + + + + + + + + + +

p :

pointer to storage +

Returns :

interpreted data +
+
+
+
+

GSF_LE_GET_GINT64()

+
#define GSF_LE_GET_GINT64(p) ((gint64)GSF_LE_GET_GUINT64(p))
+
+

+Interpret binary data as a signed 64-bit integer in little endian order. +

+
++ + + + + + + + + + +

p :

pointer to storage +

Returns :

interpreted data +
+
+
+
+

gsf_le_get_guint64 ()

+
guint64             gsf_le_get_guint64                  (void const *p);
+

+Interpret binary data as a guint64 (8 byte unsigned integer type) in little +endian order. +

+
++ + + + + + + + + + +

p :

pointer to storage +

Returns :

interpreted data +
+
+
+
+

GSF_LE_GET_FLOAT()

+
#define GSF_LE_GET_FLOAT(p) (gsf_le_get_float (p))
+
+

+Interpret binary data as a float in little endian order. +

+
++ + + + + + + + + + +

p :

pointer to storage +

Returns :

interpreted data +
+
+
+
+

gsf_le_get_float ()

+
float               gsf_le_get_float                    (void const *p);
+

+Interpret binary data as a float in little endian order. +

+
++ + + + + + + + + + +

p :

pointer to storage +

Returns :

interpreted data +
+
+
+
+

GSF_LE_GET_DOUBLE()

+
#define GSF_LE_GET_DOUBLE(p) (gsf_le_get_double (p))
+
+

+Interpret binary data as a double in little endian order. +

+
++ + + + + + + + + + +

p :

pointer to storage +

Returns :

interpreted data +
+
+
+
+

gsf_le_get_double ()

+
double              gsf_le_get_double                   (void const *p);
+

+Interpret binary data as a double in little endian order. +

+
++ + + + + + + + + + +

p :

pointer to storage +

Returns :

interpreted data +
+
+
+
+

GSF_LE_SET_GUINT8()

+
#define             GSF_LE_SET_GUINT8(p, dat)
+

+Store dat in little endian order in memory pointed to by p. +

+
++ + + + + + + + + + +

p :

pointer to storage +

dat :

8-bit unsigned integer +
+
+
+
+

GSF_LE_SET_GUINT16()

+
#define             GSF_LE_SET_GUINT16(p, dat)
+

+Store dat in little endian order in memory pointed to by p. +

+
++ + + + + + + + + + +

p :

pointer to storage +

dat :

16-bit unsigned integer +
+
+
+
+

GSF_LE_SET_GUINT32()

+
#define             GSF_LE_SET_GUINT32(p, dat)
+

+Store dat in little endian order in memory pointed to by p. +

+
++ + + + + + + + + + +

p :

pointer to storage +

dat :

32-bit unsigned integer +
+
+
+
+

GSF_LE_SET_GINT8()

+
#define GSF_LE_SET_GINT8(p,dat) GSF_LE_SET_GUINT8((p),(dat))
+
+

+Store dat in little endian order in memory pointed to by p. +

+
++ + + + + + + + + + +

p :

pointer to storage +

dat :

8-bit signed integer +
+
+
+
+

GSF_LE_SET_GINT16()

+
#define GSF_LE_SET_GINT16(p,dat) GSF_LE_SET_GUINT16((p),(dat))
+
+

+Store dat in little endian order in memory pointed to by p. +

+
++ + + + + + + + + + +

p :

pointer to storage +

dat :

16-bit signed integer +
+
+
+
+

GSF_LE_SET_GINT32()

+
#define GSF_LE_SET_GINT32(p,dat) GSF_LE_SET_GUINT32((p),(dat))
+
+

+Store dat in little endian order in memory pointed to by p. +

+
++ + + + + + + + + + +

p :

pointer to storage +

dat :

32-bit signed integer +
+
+
+
+

GSF_LE_SET_GINT64()

+
#define GSF_LE_SET_GINT64(p,dat) GSF_LE_SET_GUINT64((p),(dat))
+
+

+Store dat in little endian order in memory pointed to by p. +

+
++ + + + + + + + + + +

p :

pointer to storage +

dat :

64-bit signed integer +
+
+
+
+

GSF_LE_SET_GUINT64()

+
#define             GSF_LE_SET_GUINT64(p, dat)
+

+Store dat in little endian order in memory pointed to by p. +

+
++ + + + + + + + + + +

p :

pointer to storage +

dat :

64-bit unsigned integer +
+
+
+
+

GSF_LE_SET_FLOAT()

+
#define GSF_LE_SET_FLOAT(p,dat) gsf_le_set_float((p),(dat))
+
+

+Store dat in little endian order in memory pointed to by p. +

+
++ + + + + + + + + + +

p :

pointer to storage +

dat :

float to be stored +
+
+
+
+

GSF_LE_SET_DOUBLE()

+
#define GSF_LE_SET_DOUBLE(p,dat) gsf_le_set_double((p),(dat))
+
+

+Store dat in little endian order in memory pointed to by p. +

+
++ + + + + + + + + + +

p :

pointer to storage +

dat :

double to be stored +
+
+
+
+

gsf_le_set_float ()

+
void                gsf_le_set_float                    (void *p,
+                                                         float f);
+

+Store a value of type float in memory in little endian order. +

+
++ + + + + + + + + + +

p :

pointer to storage +

f :

float to be stored +
+
+
+
+

gsf_le_set_double ()

+
void                gsf_le_set_double                   (void *p,
+                                                         double d);
+

+Store a value of type double in memory in little endian order +

+
++ + + + + + + + + + +

p :

pointer to storage +

d :

double to be stored +
+
+
+
+

GsfTimestamp

+
typedef struct {
+	GDate	  date;			/* In local timezone */
+	glong     seconds;		/* time of day */
+	GString	  time_zone;		/* possibly blank */
+
+	guint32	  timet;
+} GsfTimestamp;
+
+

+A point in time. +

+
++ + + + + + + + + + + + + + + + + + +

GDate date;

+GDate in local timezone +

glong seconds;

+glong number of seconds since date. +

GString time_zone;

possibly blank GString of the timezone +

guint32 timet;

as from mktime. +
+
+
+
+

gsf_timestamp_copy ()

+
GsfTimestamp *      gsf_timestamp_copy                  (GsfTimestamp const *stamp);
+

+Copies a timestamp. +

+
++ + + + + + + + + + +

stamp :

timestamp to be copied +

Returns :

a separate copy of stamp. +
+
+
+
+

gsf_timestamp_free ()

+
void                gsf_timestamp_free                  (GsfTimestamp *stamp);
+

+Releases the memory in use for stamp (if any). +

+
++ + + + +

stamp :

timestamp to be freed +
+
+
+
+

gsf_timestamp_as_string ()

+
char *              gsf_timestamp_as_string             (GsfTimestamp const *stamp);
+

+Produce a string representation (ISO 8601 format) of stamp. +

+
++ + + + + + + + + + +

stamp :

timestamp to be converted. +

Returns :

a string representation of stamp. When stamp is NULL, the +representation is "<invalid>". +
+
+
+
+

gsf_timestamp_from_string ()

+
int                 gsf_timestamp_from_string           (char const *spec,
+                                                         GsfTimestamp *stamp);
+

+Very simple parser for time stamps. Currently requires a format of + 'YYYY-MM-DDThh:mm:ss' +and does no bounds checking. +

+
++ + + + + + + + + + + + + + +

spec :

The string to parse +

stamp :

+GsfTimestamp +

Returns :

TRUE on success +
+

Since 1.14.12

+
+
+
+

gsf_timestamp_hash ()

+
guint               gsf_timestamp_hash                  (GsfTimestamp const *stamp);
+

+

+
++ + + + + + + + + + +

stamp :

+

Returns :

+
+
+
+
+

gsf_timestamp_equal ()

+
gboolean            gsf_timestamp_equal                 (GsfTimestamp const *a,
+                                                         GsfTimestamp const *b);
+

+Compare timestamps a and b. +

+
++ + + + + + + + + + + + + + +

a :

a timestamp +

b :

another timestamp +

Returns :

true if a and b represent the same point in time; false otherwise. + +
+
+
+
+

gsf_value_set_timestamp ()

+
void                gsf_value_set_timestamp             (GValue *value,
+                                                         GsfTimestamp const *stamp);
+

+

+
++ + + + + + + + + + +

value :

+

stamp :

+
+
+
+
+

VAL_IS_GSF_TIMESTAMP()

+
#define VAL_IS_GSF_TIMESTAMP(v) (G_TYPE_CHECK_VALUE_TYPE((v), GSF_TIMESTAMP_TYPE))
+
+

+

+
++ + + + +

v :

+
+
+
+
+

gsf_timestamp_parse ()

+
int                 gsf_timestamp_parse                 (char const *spec,
+                                                         GsfTimestamp *stamp);
+

+Very simple parser for time stamps. Currently requires a format of + 'YYYY-MM-DDThh:mm:ss' +and does no bounds checking. +

+

+Deprecated : Use gsf_timestamp_from_string +

+
++ + + + + + + + + + + + + + +

spec :

The string to parse +

stamp :

+GsfTimestamp +

Returns :

TRUE on success +
+
+
+
+

gsf_doc_prop_swap_val ()

+
GValue *            gsf_doc_prop_swap_val               (GsfDocProp *prop,
+                                                         GValue *val);
+
++ + + + + + + + + + + + + + +

prop :

+GsfDocProp +

val :

+GValue +

Returns :

the current value of prop, and replaces it with val + Caller is responsible for unsetting and freeing the result. +
+
+
+
+

gsf_property_settings_collect ()

+
void                gsf_property_settings_collect       (GType object_type,
+                                                         GParameter **p_params,
+                                                         size_t *p_n_params,
+                                                         const gchar *first_property_name,
+                                                         ...);
+

+

+
++ + + + + + + + + + + + + + + + + + + + + + +

object_type :

+

p_params :

+

p_n_params :

+

first_property_name :

+

... :

+
+
+
+
+

gsf_property_settings_collect_valist ()

+
void                gsf_property_settings_collect_valist
+                                                        (GType object_type,
+                                                         GParameter **p_params,
+                                                         size_t *p_n_params,
+                                                         const gchar *first_property_name,
+                                                         va_list var_args);
+

+This function builds a GParameter array suitable for g_object_newv. +

+
++ + + + + + + + + + + + + + + + + + + + + + +

object_type :

the GType for which the properties are being set. +

p_params :

a pointer to the GParameter array that holds the properties. + (Used for both input and output. This may point to a NULL pointer if + there are no properties collected yet.) +

p_n_params :

a pointer to the number of properties collected. (Used for + both input and output.) +

first_property_name :

the name of the first property being set, or NULL. +

var_args :

a va_list holding the remainder of the property names and + values, terminated by a NULL. +
+
+
+
+

gsf_property_settings_free ()

+
void                gsf_property_settings_free          (GParameter *params,
+                                                         size_t n_params);
+

+

+
++ + + + + + + + + + +

params :

+

n_params :

+
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/gsf.devhelp b/doc/html/gsf.devhelp new file mode 100644 index 0000000..0e7ae37 --- /dev/null +++ b/doc/html/gsf.devhelp @@ -0,0 +1,433 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/html/gsf.devhelp2 b/doc/html/gsf.devhelp2 new file mode 100644 index 0000000..9e05b78 --- /dev/null +++ b/doc/html/gsf.devhelp2 @@ -0,0 +1,441 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/html/history.html b/doc/html/history.html new file mode 100644 index 0000000..cf4189b --- /dev/null +++ b/doc/html/history.html @@ -0,0 +1,45 @@ + + + + +Part II. GSF: History + + + + + + + + + + + + + + + + +
+

+Part II. GSF: History

+
+
+

+GSF was written as part of the Gnumeric project. It started in 2002 as a +replacement for libole2 which Gnumeric was using to handle the Microsoft +Excel® file format, as libole2's +code had become difficult to maintain and was difficult to generalize. GSF +was designed to be a more general library for dealing with a number of +different types of structured data files and streams. +

+

+With the release of Gnumeric 1.1.6 (July 2002), Gnumeric used GSF and +libole2 was orphaned. +

+
+
+ + + \ No newline at end of file diff --git a/doc/html/home.png b/doc/html/home.png new file mode 100644 index 0000000..1700361 Binary files /dev/null and b/doc/html/home.png differ diff --git a/doc/html/index.html b/doc/html/index.html new file mode 100644 index 0000000..8f91d22 --- /dev/null +++ b/doc/html/index.html @@ -0,0 +1,103 @@ + + + + +GSF Reference Manual + + + + + + + + + + + \ No newline at end of file diff --git a/doc/html/index.sgml b/doc/html/index.sgml new file mode 100644 index 0000000..e8f7788 --- /dev/null +++ b/doc/html/index.sgml @@ -0,0 +1,532 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/html/intro.html b/doc/html/intro.html new file mode 100644 index 0000000..8c697a3 --- /dev/null +++ b/doc/html/intro.html @@ -0,0 +1,39 @@ + + + + +Part I. GSF: Introduction + + + + + + + + + + + + + + + + +
+

+Part I. GSF: Introduction

+
+
+

+The GNOME Structured File Library (GSF) is an I/O abstraction for +reading/writing compound files. GSF is released under the GNU Lesser General Public +License (GNU LGPL), which allows for flexible licensing of client +applications. +

+
+
+ + + \ No newline at end of file diff --git a/doc/html/io.html b/doc/html/io.html new file mode 100644 index 0000000..7f7810f --- /dev/null +++ b/doc/html/io.html @@ -0,0 +1,38 @@ + + + + +Basic Input/Output + + + + + + + + + + + + + + + + +
+

+Basic Input/Output

+ +
+ + + \ No newline at end of file diff --git a/doc/html/left.png b/doc/html/left.png new file mode 100644 index 0000000..2d05b3d Binary files /dev/null and b/doc/html/left.png differ diff --git a/doc/html/misc.html b/doc/html/misc.html new file mode 100644 index 0000000..5848b5e --- /dev/null +++ b/doc/html/misc.html @@ -0,0 +1,33 @@ + + + + +Miscellaneous + + + + + + + + + + + + + + + + +
+

+Miscellaneous

+
+utils +
+
+ + + \ No newline at end of file diff --git a/doc/html/parsers.html b/doc/html/parsers.html new file mode 100644 index 0000000..9c600a1 --- /dev/null +++ b/doc/html/parsers.html @@ -0,0 +1,59 @@ + + + + +Stream Parsers + + + + + + + + + + + + + + + + +
+

+Stream Parsers

+
+
+Text +
+
+XML and libxml +
+
+Zip files — Utilities for reading and writing ZIP/JAR files +
+
+Compression +
+
+MS OLE2 +
+
+metadata +
+
+OASIS Open Document +
+
+GsfBlob +
+
+GsfClipData +
+
+
+ + + \ No newline at end of file diff --git a/doc/html/right.png b/doc/html/right.png new file mode 100644 index 0000000..92832e3 Binary files /dev/null and b/doc/html/right.png differ diff --git a/doc/html/sources.html b/doc/html/sources.html new file mode 100644 index 0000000..66c4b9c --- /dev/null +++ b/doc/html/sources.html @@ -0,0 +1,56 @@ + + + + +Stream Sources + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/html/style.css b/doc/html/style.css new file mode 100644 index 0000000..82115eb --- /dev/null +++ b/doc/html/style.css @@ -0,0 +1,257 @@ +.synopsis, .classsynopsis +{ + /* tango:aluminium 1/2 */ + background: #eeeeec; + border: solid 1px #d3d7cf; + padding: 0.5em; +} +.programlisting +{ + /* tango:sky blue 0/1 */ + background: #e6f3ff; + border: solid 1px #729fcf; + padding: 0.5em; +} +.variablelist +{ + padding: 4px; + margin-left: 3em; +} +.variablelist td:first-child +{ + vertical-align: top; +} + +@media screen { + sup a.footnote + { + position: relative; + top: 0em ! important; + + } + /* this is needed so that the local anchors are displayed below the naviagtion */ + div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] + { + position: relative; + padding-top:4.5em; + } + /* this seems to be a bug in the xsl style sheets when generating indexes */ + div.index div.index + { + top: 0em; + } + /* make space for the fixed navigation bar and add space at the bottom so that + * link targets appear somewhat close to top + */ + body + { + padding-top: 3.2em; + padding-bottom: 20em; + } + /* style and size the navigation bar */ + table.navigation#top + { + position: fixed; + /* tango:scarlet red 0/1 */ + background: #ffe6e6; + border: solid 1px #ef2929; + margin-top: 0; + margin-bottom: 0; + top: 0; + left: 0; + height: 3em; + z-index: 10; + } + .navigation a, .navigation a:visited + { + /* tango:scarlet red 3 */ + color: #a40000; + } + .navigation a:hover + { + /* tango:scarlet red 1 */ + color: #ef2929; + } + td.shortcuts + { + /* tango:scarlet red 1 */ + color: #ef2929; + font-size: 80%; + white-space: nowrap; + } +} +@media print { + table.navigation { + visibility: collapse; + display: none; + } + div.titlepage table.navigation { + visibility: visible; + display: table; + /* tango:scarlet red 0/1 */ + background: #ffe6e6; + border: solid 1px #ef2929; + margin-top: 0; + margin-bottom: 0; + top: 0; + left: 0; + height: 3em; + } +} + +.navigation .title +{ + font-size: 200%; +} + +div.gallery-float +{ + float: left; + padding: 10px; +} +div.gallery-float img +{ + border-style: none; +} +div.gallery-spacer +{ + clear: both; +} + +a, a:visited +{ + text-decoration: none; + /* tango:sky blue 2 */ + color: #3465a4; +} +a:hover +{ + text-decoration: underline; + /* tango:sky blue 1 */ + color: #729fcf; +} + +div.table table +{ + border-collapse: collapse; + border-spacing: 0px; + /* tango:aluminium 3 */ + border: solid 1px #babdb6; +} + +div.table table td, div.table table th +{ + /* tango:aluminium 3 */ + border: solid 1px #babdb6; + padding: 3px; + vertical-align: top; +} + +div.table table th +{ + /* tango:aluminium 2 */ + background-color: #d3d7cf; +} + +hr +{ + /* tango:aluminium 3 */ + color: #babdb6; + background: #babdb6; + border: none 0px; + height: 1px; + clear: both; +} + +.footer +{ + padding-top: 3.5em; + /* tango:aluminium 3 */ + color: #babdb6; + text-align: center; + font-size: 80%; +} + +.warning +{ + /* tango:orange 0/1 */ + background: #ffeed9; + border-color: #ffb04f; +} +.note +{ + /* tango:chameleon 0/0.5 */ + background: #d8ffb2; + border-color: #abf562; +} +.note, .warning +{ + padding: 0.5em; + border-width: 1px; + border-style: solid; +} +.note h3, .warning h3 +{ + margin-top: 0.0em +} +.note p, .warning p +{ + margin-bottom: 0.0em +} + +/* blob links */ +h2 .extralinks, h3 .extralinks +{ + float: right; + /* tango:aluminium 3 */ + color: #babdb6; + font-size: 80%; + font-weight: normal; +} + +/* code listings */ + +.listing_code .programlisting .cbracket { color: #a40000; } /* tango: scarlet red 3 */ +.listing_code .programlisting .comment { color: #a1a39d; } /* tango: aluminium 4 */ +.listing_code .programlisting .function { color: #000000; font-weight: bold; } +.listing_code .programlisting .function a { color: #11326b; font-weight: bold; } /* tango: sky blue 4 */ +.listing_code .programlisting .keyword { color: #4e9a06; } /* tango: chameleon 3 */ +.listing_code .programlisting .linenum { color: #babdb6; } /* tango: aluminium 3 */ +.listing_code .programlisting .normal { color: #000000; } +.listing_code .programlisting .number { color: #75507b; } /* tango: plum 2 */ +.listing_code .programlisting .preproc { color: #204a87; } /* tango: sky blue 3 */ +.listing_code .programlisting .string { color: #c17d11; } /* tango: chocolate 2 */ +.listing_code .programlisting .type { color: #000000; } +.listing_code .programlisting .type a { color: #11326b; } /* tango: sky blue 4 */ +.listing_code .programlisting .symbol { color: #ce5c00; } /* tango: orange 3 */ + +.listing_frame { + /* tango:sky blue 1 */ + border: solid 1px #729fcf; + padding: 0px; +} + +.listing_lines, .listing_code { + margin-top: 0px; + margin-bottom: 0px; + padding: 0.5em; +} +.listing_lines { + /* tango:sky blue 0.5 */ + background: #a6c5e3; + /* tango:aluminium 6 */ + color: #2e3436; +} +.listing_code { + /* tango:sky blue 0 */ + background: #e6f3ff; +} +.listing_code .programlisting { + /* override from previous */ + border: none 0px; + padding: 0px; +} +.listing_lines pre, .listing_code pre { + margin: 0px; +} + diff --git a/doc/html/up.png b/doc/html/up.png new file mode 100644 index 0000000..85b3e2a Binary files /dev/null and b/doc/html/up.png differ diff --git a/doc/tmpl/blobs.sgml b/doc/tmpl/blobs.sgml new file mode 100644 index 0000000..c369646 --- /dev/null +++ b/doc/tmpl/blobs.sgml @@ -0,0 +1,89 @@ + +GsfBlob + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@parent_class: + + + + + + + + + + + + +@size: +@data_to_copy: +@error: +@Returns: + + + + + + + +@blob: +@Returns: + + + + + + + +@blob: +@Returns: + + + + + + + +@blob: +@container: +@Returns: + + + + + + + +@input: +@Returns: + + diff --git a/doc/tmpl/bonobo.sgml b/doc/tmpl/bonobo.sgml new file mode 100644 index 0000000..b6771ac --- /dev/null +++ b/doc/tmpl/bonobo.sgml @@ -0,0 +1,72 @@ + +Bononbo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@stream: +@err: +@Returns: + + + + + + + + + + + + + +@stream: +@err: +@Returns: + + + + + + + +@g_object: +@stream: +@pos: + + + + + + +@stream: +@Returns: + + diff --git a/doc/tmpl/clip-data.sgml b/doc/tmpl/clip-data.sgml new file mode 100644 index 0000000..03eb8fc --- /dev/null +++ b/doc/tmpl/clip-data.sgml @@ -0,0 +1,107 @@ + +GsfClipData + + + + + + + + + + + + + + + + + + + + + + + + + +@GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD: +@GSF_CLIP_FORMAT_MACINTOSH_CLIPBOARD: +@GSF_CLIP_FORMAT_GUID: +@GSF_CLIP_FORMAT_NO_DATA: +@GSF_CLIP_FORMAT_CLIPBOARD_FORMAT_NAME: +@GSF_CLIP_FORMAT_UNKNOWN: + + + + + + +@GSF_CLIP_FORMAT_WINDOWS_ERROR: +@GSF_CLIP_FORMAT_WINDOWS_UNKNOWN: +@GSF_CLIP_FORMAT_WINDOWS_METAFILE: +@GSF_CLIP_FORMAT_WINDOWS_DIB: +@GSF_CLIP_FORMAT_WINDOWS_ENHANCED_METAFILE: + + + + + + + + + + + + +@parent_class: + + + + + + +@format: +@data_blob: +@Returns: + + + + + + + +@clip_data: +@Returns: + + + + + + + +@clip_data: +@Returns: + + + + + + + +@clip_data: +@error: +@Returns: + + + + + + + +@clip_data: +@ret_size: +@error: +@Returns: + + diff --git a/doc/tmpl/compression.sgml b/doc/tmpl/compression.sgml new file mode 100644 index 0000000..a6f6c1c --- /dev/null +++ b/doc/tmpl/compression.sgml @@ -0,0 +1,105 @@ + +Compression + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@source: +@err: +@Returns: + + + + + + + +@source: +@err: +@Returns: + + + + + + + + + + + + + + + + + + + + + + + +@sink: +@err: +@Returns: + + + + + + + + + + + + + +@sink: +@err: +@Returns: + + diff --git a/doc/tmpl/gnomevfs.sgml b/doc/tmpl/gnomevfs.sgml new file mode 100644 index 0000000..cb7b828 --- /dev/null +++ b/doc/tmpl/gnomevfs.sgml @@ -0,0 +1,79 @@ + +GnomeVFS + + + + + + + + + + + + + + + + + + + + + + + + + + + +@uri: +@error: +@Returns: + + + + + + + +@uri: +@error: +@Returns: + + + + + + + +@vfs_input: +@Returns: + + + + + + + + + + + + + +@filename: +@err: +@Returns: + + + + + + + +@uri: +@err: +@Returns: + + diff --git a/doc/tmpl/gsf-unused.sgml b/doc/tmpl/gsf-unused.sgml new file mode 100644 index 0000000..9662647 --- /dev/null +++ b/doc/tmpl/gsf-unused.sgml @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + +Structured Blobs + + + + + + + + + + + + + + + + + + + +GnomeVFS + + + + + + + + + + + + + + + + + + + + + + + +GsfBlob + + + + + + + + + + + + + + + + + + + + + + + +GsfClipData + + + + + + + + + + + + + + + + + + + + + + + +gsf-opendoc-utils + + + + + + + + + + + + + + + + + + + +gsf + + + + + + + +@Returns: + diff --git a/doc/tmpl/gsf.sgml b/doc/tmpl/gsf.sgml new file mode 100644 index 0000000..da68374 --- /dev/null +++ b/doc/tmpl/gsf.sgml @@ -0,0 +1,22 @@ + +gsf + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tmpl/infile.sgml b/doc/tmpl/infile.sgml new file mode 100644 index 0000000..1d29a30 --- /dev/null +++ b/doc/tmpl/infile.sgml @@ -0,0 +1,97 @@ + +Infile reading structed files + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@infile: +@Returns: + + + + + + + +@infile: +@i: +@Returns: + + + + + + + +@infile: +@name: +@Returns: + + + + + + + +@infile: +@Varargs: +@Returns: + + + + + + + +@infile: +@names: +@Returns: + + + + + + + +@infile: +@names: +@Returns: + + + + + + + +@infile: +@i: +@Returns: + + diff --git a/doc/tmpl/input.sgml b/doc/tmpl/input.sgml new file mode 100644 index 0000000..b631a31 --- /dev/null +++ b/doc/tmpl/input.sgml @@ -0,0 +1,223 @@ + +Input from unstructured files + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@input: +@num_bytes: +@optional_buffer: +@Returns: + + + + + + + +@input: +@Returns: + + + + + + + +@input: +@offset: +@whence: +@Returns: + + + + + + + +@input: +@Returns: + + + + + + + +@input: +@err: +@Returns: + + + + + + + +@input: +@Returns: + + + + + + + +@input: +@Returns: + + + + + + + +@input: +@Returns: + + + + + + + +@void: +@Returns: + + + + + + + +@input: +@name: +@err: +@Returns: + + + + + + + +@void: +@Returns: + + + + + + + +@input: +@Returns: + + + + + + + +@input: +@filename: +@Returns: + + + + + + + + + + + + + +@source: +@Returns: + + + + + + + +@source: +@offset: +@size: +@Returns: + + + + + + + +@input: +@output: +@Returns: + + + + + + + +@src: +@Returns: + + diff --git a/doc/tmpl/iochannel.sgml b/doc/tmpl/iochannel.sgml new file mode 100644 index 0000000..173c32e --- /dev/null +++ b/doc/tmpl/iochannel.sgml @@ -0,0 +1,37 @@ + +GIOChannel + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@channel: +@Returns: + + diff --git a/doc/tmpl/memory.sgml b/doc/tmpl/memory.sgml new file mode 100644 index 0000000..5edc928 --- /dev/null +++ b/doc/tmpl/memory.sgml @@ -0,0 +1,93 @@ + +memory + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@filename: +@err: +@Returns: + + + + + + + +@buf: +@length: +@needs_free: +@Returns: + + + + + + + +@buf: +@length: +@Returns: + + + + + + + +@channel: +@error: +@Returns: + + + + + + + + + + + + + +@mem: +@Returns: + + + + + + + +@void: +@Returns: + + diff --git a/doc/tmpl/metadata.sgml b/doc/tmpl/metadata.sgml new file mode 100644 index 0000000..add035f --- /dev/null +++ b/doc/tmpl/metadata.sgml @@ -0,0 +1,617 @@ + +metadata + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@void: +@Returns: + + + + + + + +@meta: +@name: +@Returns: + + + + + + + +@meta: +@name: +@value: + + + + + + + +@meta: +@name: + + + + + + + +@meta: +@name: +@Returns: + + + + + + + +@meta: +@prop: + + + + + + + +@meta: +@func: +@user_data: + + + + + + + +@meta: +@Returns: + + + + + + + +@meta: + + + + + + + + + + + + + +@name: +@Returns: + + + + + + + +@prop: + + + + + + + +@prop: +@Returns: + + + + + + + +@prop: +@Returns: + + + + + + + +@prop: +@val: + + + + + + + +@prop: +@Returns: + + + + + + + +@prop: +@link: + + + + + + + +@prop: + + + + + + + + + + + + + +@void: +@Returns: + + + + + + + +@vector: +@value: + + + + + + + +@vector: +@Returns: + + + + + + + +@value: +@Returns: + + + + + + + +@value: +@Returns: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/tmpl/msole.sgml b/doc/tmpl/msole.sgml new file mode 100644 index 0000000..bde26db --- /dev/null +++ b/doc/tmpl/msole.sgml @@ -0,0 +1,216 @@ + +MS OLE2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@source: +@err: +@Returns: + + + + + + + +@ole: +@res: +@Returns: + + + + + + + + + + + + + +@sink: +@Returns: + + + + + + + +@sink: +@bb_size: +@sb_size: +@Returns: + + + + + + + +@ole: +@clsid: +@Returns: + + + + + + + +@in: +@accum: +@Returns: + + + + + + + +@out: +@meta_data: +@doc_not_component: +@Returns: + + + + + + + +@codepage_to: +@from: +@Returns: + + + + + + + +@to: +@codepage: +@Returns: + + + + + + + +@void: +@Returns: + + + + + + + +@codepage_to: +@Returns: + + + + + + + +@codepage: +@Returns: + + + + + + + +@void: +@Returns: + + + + + + + +@codepage: +@Returns: + + + + + + + +@lid: +@Returns: + + + + + + + +@lid: +@Returns: + + + + + + + +@lang: +@Returns: + + + + + + + +@lid: +@Returns: + + + + + + + +@input: +@offset: +@Returns: + + diff --git a/doc/tmpl/opendoc.sgml b/doc/tmpl/opendoc.sgml new file mode 100644 index 0000000..a3bb82a --- /dev/null +++ b/doc/tmpl/opendoc.sgml @@ -0,0 +1,51 @@ + +OASIS Open Document + + + + + + + + + + + + + + + + + + + + + + + + + +@input: +@md: +@Returns: + + + + + + + +@doc: +@md: + + + + + + + +@output: +@md: +@Returns: + + diff --git a/doc/tmpl/outfile.sgml b/doc/tmpl/outfile.sgml new file mode 100644 index 0000000..60e3ebb --- /dev/null +++ b/doc/tmpl/outfile.sgml @@ -0,0 +1,65 @@ + +Outfile writing structed files + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@outfile: +@name: +@is_dir: +@Returns: + + + + + + + +@outfile: +@name: +@is_dir: +@first_property_name: +@Varargs: +@Returns: + + + + + + + +@outfile: +@name: +@is_dir: +@first_property_name: +@args: +@Returns: + + diff --git a/doc/tmpl/output.sgml b/doc/tmpl/output.sgml new file mode 100644 index 0000000..7112b78 --- /dev/null +++ b/doc/tmpl/output.sgml @@ -0,0 +1,216 @@ + +Output to unstructured files + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@output: +@Returns: + + + + + + + +@output: +@Returns: + + + + + + + +@output: +@Returns: + + + + + + + +@output: +@offset: +@whence: +@Returns: + + + + + + + +@output: +@num_bytes: +@data: +@Returns: + + + + + + + +@output: +@line: +@Returns: + + + + + + + +@output: +@format: +@Varargs: +@Returns: + + + + + + + +@output: +@format: +@args: +@Returns: + + + + + + + +@output: +@Returns: + + + + + + + +@output: +@Returns: + + + + + + + +@output: +@filename: +@Returns: + + + + + + + +@void: +@Returns: + + + + + + + +@output: +@code: +@format: +@Varargs: +@Returns: + + + + + + + +@output: +@Returns: + + + + + + + +@output: +@Returns: + + + + + + + +@wrapper: +@wrapee: +@Returns: + + + + + + + +@wrapper: +@wrapee: +@Returns: + + diff --git a/doc/tmpl/stdio.sgml b/doc/tmpl/stdio.sgml new file mode 100644 index 0000000..afd299b --- /dev/null +++ b/doc/tmpl/stdio.sgml @@ -0,0 +1,156 @@ + +Reading and Writing from local files and directories + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@filename: +@err: +@Returns: + + + + + + + +@filename: +@file: +@keep_open: +@Returns: + + + + + + + + + + + + + +@filename: +@err: +@Returns: + + + + + + + +@filename: +@err: +@first_property_name: +@Varargs: +@Returns: + + + + + + + +@filename: +@err: +@first_property_name: +@var_args: +@Returns: + + + + + + + +@filename: +@file: +@keep_open: +@Returns: + + + + + + + + + + + + + +@root: +@err: +@Returns: + + + + + + + +@root: +@err: +@first_property_name: +@Varargs: +@Returns: + + + + + + + +@root: +@err: +@first_property_name: +@var_args: +@Returns: + + + + + + + + + + + + + +@root: +@err: +@Returns: + + diff --git a/doc/tmpl/text.sgml b/doc/tmpl/text.sgml new file mode 100644 index 0000000..75ba97e --- /dev/null +++ b/doc/tmpl/text.sgml @@ -0,0 +1,162 @@ + +Text + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@source: +@Returns: + + + + + + + +@textline: +@Returns: + + + + + + + +@textline: +@Returns: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@sink: +@dst: +@src: +@Returns: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@csv: +@Returns: + + + + + + + +@csv: +@field: +@len: +@Returns: + + + + + + + +@GSF_OUTPUT_CSV_QUOTING_MODE_NEVER: +@GSF_OUTPUT_CSV_QUOTING_MODE_AUTO: +@GSF_OUTPUT_CSV_QUOTING_MODE_ALWAYS: + diff --git a/doc/tmpl/utils.sgml b/doc/tmpl/utils.sgml new file mode 100644 index 0000000..55e09af --- /dev/null +++ b/doc/tmpl/utils.sgml @@ -0,0 +1,694 @@ + +utils + + + + + + + + + + + + + + + + + + + + + + + + + +@void: + + + + + + + +@void: + + + + + + + +@module: + + + + + + + +@module: + + + + + + + + + + + + + + + + + + + + + + + + + +@name: +@prefix: +@class_init: +@instance_init: +@parent: + + + + + + + +@name: +@prefix: +@base_init: +@base_finalize: +@class_init: +@class_finalize: +@instance_init: +@parent_type: +@abstract: +@interface_decl: + + + + + + + +@name: +@prefix: +@class_init: +@instance_init: +@parent: + + + + + + + +@init_func: +@iface_type: + + + + + + + +@type: +@init_func: +@iface_type: + + + + + + + +@name: +@prefix: +@class_init: +@instance_init: +@parent: + + + + + + + +@name: +@prefix: +@base_init: +@base_finalize: +@class_init: +@class_finalize: +@instance_init: +@parent_type: +@abstract: +@interface_decl: + + + + + + + +@name: +@prefix: +@class_init: +@instance_init: +@parent: + + + + + + + +@init_func: +@iface_type: +@module: + + + + + + + +@type: +@init_func: +@iface_type: +@module: + + + + + + + + + + + + + + + + + + + + + +@GSF_ERROR_OUT_OF_MEMORY: +@GSF_ERROR_INVALID_DATA: + + + + + + +@void: +@Returns: + + + + + + + +@ptr: +@len: + + + + + + + +@input: +@dump_as_hex: + + + + + + + + + + + + + + + + + + + + +@filename: +@quoted: +@Returns: + + + + + + + +@handle: + + + + + + + +@path: +@Returns: + + + + + + + +@data: +@len: +@Returns: + + + + + + + +@in: +@inlen: +@break_lines: +@out: +@state: +@save: +@Returns: + + + + + + + +@in: +@len: +@break_lines: +@out: +@state: +@save: +@Returns: + + + + + + + +@data: +@len: +@Returns: + + + + + + + +@in: +@len: +@out: +@state: +@save: +@Returns: + + + + + + + +@p: + + + + + + + +@p: + + + + + + + +@p: + + + + + + + +@p: + + + + + + + +@p: + + + + + + + +@p: + + + + + + + +@p: + + + + + + + +@p: + + + + + + + +@p: +@Returns: + + + + + + + +@p: + + + + + + + +@p: +@Returns: + + + + + + + +@p: + + + + + + + +@p: +@Returns: + + + + + + + +@p: +@dat: + + + + + + + +@p: +@dat: + + + + + + + +@p: +@dat: + + + + + + + +@p: +@dat: + + + + + + + +@p: +@dat: + + + + + + + +@p: +@dat: + + + + + + + +@p: +@dat: + + + + + + + +@p: +@dat: + + + + + + + +@p: +@dat: + + + + + + + +@p: +@dat: + + + + + + + +@p: +@f: + + + + + + + +@p: +@d: + + + + + + + +@date: +@seconds: +@time_zone: +@timet: + + + + + + +@stamp: +@Returns: + + + + + + + +@stamp: + + + + + + + +@stamp: +@Returns: + + + + + + + +@spec: +@stamp: +@Returns: + + + + + + + +@stamp: +@Returns: + + + + + + + +@a: +@b: +@Returns: + + + + + + + +@value: +@stamp: + + + + + + + +@v: + + + + + + + +@spec: +@stamp: +@Returns: + + + + + + + +@prop: +@val: +@Returns: + + + + + + + +@object_type: +@p_params: +@p_n_params: +@first_property_name: +@Varargs: + + + + + + + +@object_type: +@p_params: +@p_n_params: +@first_property_name: +@var_args: + + + + + + + +@params: +@n_params: + + diff --git a/doc/tmpl/xml.sgml b/doc/tmpl/xml.sgml new file mode 100644 index 0000000..c87b95c --- /dev/null +++ b/doc/tmpl/xml.sgml @@ -0,0 +1,524 @@ + +XML and libxml + + + + + + + + + + + + + + + + + + + + + + + + + +@user_state: +@content: +@doc: +@node: +@node_stack: + + + + + + + + + + + + +@xin: +@elem: +@attrs: +@Returns: + + + + + + + +@uri: + + + + + + +@id: +@ns_id: +@name: +@parent_id: +@start: +@end: +@has_content: +@check_children_for_ns: +@share_children_with_parent: + + + + + + +@xin: +@old_state: + + + + + + + +@GSF_XML_NO_CONTENT: +@GSF_XML_CONTENT: +@GSF_XML_SHARED_CONTENT: + + + + + + + + + + + + + + + + + + +@name: +@prefix: +@URI: +@nb_namespaces: +@namespaces: +@nb_attributes: +@nb_defaulted: +@attributes: +@Returns: + + + + + + + +@parent_id: +@id: +@ns: +@name: +@has_content: +@share_children_with_parent: +@check_ns: +@start: +@end: +@user: + + + + + + + +@parent_id: +@id: +@ns: +@name: +@has_content: +@start: +@end: + + + + + + + + + + + + + + +@id: +@uri: + + + + + + + + + + + + + + +@nodes: +@ns: +@Returns: + + + + + + + +@doc: + + + + + + + +@doc: +@nodes: + + + + + + + +@doc: +@input: +@user_state: +@Returns: + + + + + + + +@doc: +@handler: + + + + + + + +@xin: +@doc: +@new_state: +@dtor: +@attrs: + + + + + + + +@xin: +@str: +@ns_id: +@name: +@Returns: + + + + + + + +@xin: +@str: +@ns_id: +@Returns: + + + + + + + +@xin: +@Returns: + + + + + + + +@input: +@startElement: +@Returns: + + + + + + + + + + + + + + + + + + +@output: +@Returns: + + + + + + + +@xout: +@type: + + + + + + + +@xout: +@Returns: + + + + + + + +@xout: +@id: + + + + + + + +@xout: +@Returns: + + + + + + + +@xout: +@id: +@val_utf8: + + + + + + + +@xout: +@id: +@val_utf8: + + + + + + + +@xout: +@id: +@val: + + + + + + + +@xout: +@id: +@val: + + + + + + + +@xout: +@id: +@val: + + + + + + + +@xout: +@id: +@val: +@precision: + + + + + + + +@xout: +@id: +@etype: +@val: + + + + + + + +@xout: +@id: +@r: +@g: +@b: + + + + + + + +@xout: +@id: +@data: +@len: + + + + + + + +@xout: +@id: +@val: + + + + + + + +@xout: +@id: +@content: + + + + + + + +@xout: +@id: +@val: +@precision: + + + + + + + +@xout: +@id: +@val: + + + + + + + +@input: +@Returns: + + + + + + + +@void: +@Returns: + + + + + + + +@input: +@Returns: + + + + + + + +@input: +@Returns: + + + + + + + +@res: +@t: +@str: +@Returns: + + + + + + + +@output: +@cur: +@encoding: +@format: +@Returns: + + diff --git a/doc/tmpl/zip.sgml b/doc/tmpl/zip.sgml new file mode 100644 index 0000000..1fa13bd --- /dev/null +++ b/doc/tmpl/zip.sgml @@ -0,0 +1,94 @@ + +Zip + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@source: +@err: +@Returns: + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@sink: +@err: +@Returns: + + + + + + + +@zip: +@method: +@Returns: + + diff --git a/doc/version.xml.in b/doc/version.xml.in new file mode 100644 index 0000000..af9b9c4 --- /dev/null +++ b/doc/version.xml.in @@ -0,0 +1 @@ +@GLIB_VERSION@ diff --git a/dumpdef.pl b/dumpdef.pl new file mode 100755 index 0000000..863cbc3 --- /dev/null +++ b/dumpdef.pl @@ -0,0 +1,61 @@ +#!/usr/bin/perl -w +# +# dumpdef.pl: Extract function declarations from C headers. +# +# Copyright (C) 2005 Ivan, Wong Yat Cheung +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2.1 of the GNU Lesser General Public +# License as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA +# + +sub parse_header { + my ($lines, $file, @symbols); + + $file = shift; + open HEADER, $file or die "Cannot open $file: $!\n"; + $/ = undef; + $lines =
; + close HEADER; + while ($lines =~ /^\s*[A-Za-z_]\w*(?:\s+[A-Za-z_]\w*)*[\s\*]+ #function type + ([A-Za-z_]\w*)\s*\( #function name + (?:\s*[A-Za-z_]\w*(?:[\s\*]+[A-Za-z_]\w*)*[\s\*]+[A-Za-z_]\w*(?:\s*\[\s*\]\s*)? #[first arg + (?:\s*,\s*[A-Za-z_]\w*(?:[\s\*]+[A-Za-z_]\w*)*[\s\*]+[A-Za-z_]\w*(?:\s*\[\s*\]\s*)?)* #[more args]] + (?:\s*,\s*\.{3})?|void) #vargs or void + \s*\)\s* #close + (?:(?:G_GNUC_PRINTF|G_GNUC_SCANF)\s*\(\s*\d+\s*,\s*\d+\) # predefined macro modifiers] + |G_GNUC_FORMAT\s*\(\s*\d+\s*\) + |G_GNUC_NORETURN|G_GNUC_CONST|G_GNUC_UNUSED|G_GNUC_NO_INSTRUMENT + |G_GNUC_DEPRECATED)? + \s*;/gxm) { + push @symbols, $1; + } + while ($lines =~ /^\s*extern\s+ #function type + [A-Za-z_]\w*(?:[\s\*]+[A-Za-z_]\w*)*[\s\*]+([A-Za-z_]\w*) #[first arg + \s*(?:\[\s*\]\s*)?;/gxm) { + push @symbols, "$1 DATA"; + } + @symbols; +} + +die "Usage: dumpdef.pl files...\n" if ($#ARGV == -1); + +my @symbols; +do { + push @symbols, parse_header $ARGV[0]; + shift @ARGV; +} while ($#ARGV != -1); + +print join "\n", sort @symbols; +print "\n"; + diff --git a/gsf-config.h.in b/gsf-config.h.in new file mode 100644 index 0000000..2f912c1 --- /dev/null +++ b/gsf-config.h.in @@ -0,0 +1,158 @@ +/* gsf-config.h.in. Generated from configure.in by autoheader. */ + +/* always defined to indicate that i18n is enabled */ +#undef ENABLE_NLS + +/* Gettext package. */ +#undef GETTEXT_PACKAGE + +/* Define is you have two-argument statfs like linux */ +#undef HAVE_2ARG_STATFS + +/* Define to 1 if you have the `bind_textdomain_codeset' function. */ +#undef HAVE_BIND_TEXTDOMAIN_CODESET + +/* Is bzip2 available and enabled */ +#undef HAVE_BZ2 + +/* Define to 1 if you have the `chown' function. */ +#undef HAVE_CHOWN + +/* Define to 1 if you have the `dcgettext' function. */ +#undef HAVE_DCGETTEXT + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ +#undef HAVE_FSEEKO + +/* Define if gdk-pixbuf is available */ +#undef HAVE_GDK_PIXBUF + +/* Define to 1 if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#undef HAVE_GETTEXT + +/* Define to 1 if you have the `gmtime' function. */ +#undef HAVE_GMTIME + +/* Define to 1 if you have the `gmtime_r' function. */ +#undef HAVE_GMTIME_R + +/* Define if g_access is available as macro or function */ +#undef HAVE_G_ACCESS + +/* Define to 1 if you have the `g_base64_encode' function. */ +#undef HAVE_G_BASE64_ENCODE + +/* Define if g_chmod is available as macro or function */ +#undef HAVE_G_CHMOD + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_IO_H + +/* Define if your file defines LC_MESSAGES. */ +#undef HAVE_LC_MESSAGES + +/* Define to 1 if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MALLOC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define to 1 if you have the `setrlimit' function. */ +#undef HAVE_SETRLIMIT + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if `tm_gmtoff' is a member of `struct tm'. */ +#undef HAVE_STRUCT_TM_TM_GMTOFF + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MOUNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STATFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define S_ISREG if stat.h doesn't */ +#undef S_ISREG + +/* Version number of package */ +#undef VERSION + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ +#undef _LARGEFILE_SOURCE + +/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES + +/* Define to `int' if does not define. */ +#undef mode_t diff --git a/gsf-gnome/Makefile.am b/gsf-gnome/Makefile.am new file mode 100644 index 0000000..778948c --- /dev/null +++ b/gsf-gnome/Makefile.am @@ -0,0 +1,35 @@ +AM_CPPFLAGS = -I$(top_srcdir) $(LIBGSF_GNOME_CFLAGS) + +if WITH_LIBGSF_GNOME +lib_LTLIBRARIES = libgsf-gnome-1.la + +libgsf_gnome_1_la_LIBADD = $(top_builddir)/gsf/libgsf-1.la $(LIBGSF_GNOME_LIBS) +libgsf_gnome_1_la_LDFLAGS = -version-info $(VERSION_INFO) +if WITH_WIN32 + libgsf_gnome_1_la_LDFLAGS += -no-undefined +endif +libgsf_gnome_1_la_SOURCES = + +if WITH_LIBGSF_GNOMEVFS +libgsf_gnome_1_la_SOURCES += \ + gsf-input-gnomevfs.c \ + gsf-output-gnomevfs.c +endif + +if WITH_LIBGSF_BONOBO +libgsf_gnome_1_la_SOURCES += \ + gsf-input-bonobo.c \ + gsf-output-bonobo.c \ + gsf-shared-bonobo-stream.c +endif + +endif + +## But headers are installed always: +libgsf_gnome_1_includedir = $(includedir)/libgsf-1/gsf-gnome +libgsf_gnome_1_include_HEADERS = \ + gsf-input-gnomevfs.h \ + gsf-output-gnomevfs.h \ + gsf-input-bonobo.h \ + gsf-output-bonobo.h \ + gsf-shared-bonobo-stream.h diff --git a/gsf-gnome/Makefile.in b/gsf-gnome/Makefile.in new file mode 100644 index 0000000..f236812 --- /dev/null +++ b/gsf-gnome/Makefile.in @@ -0,0 +1,680 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@WITH_LIBGSF_GNOME_TRUE@@WITH_WIN32_TRUE@am__append_1 = -no-undefined +@WITH_LIBGSF_GNOMEVFS_TRUE@@WITH_LIBGSF_GNOME_TRUE@am__append_2 = \ +@WITH_LIBGSF_GNOMEVFS_TRUE@@WITH_LIBGSF_GNOME_TRUE@ gsf-input-gnomevfs.c \ +@WITH_LIBGSF_GNOMEVFS_TRUE@@WITH_LIBGSF_GNOME_TRUE@ gsf-output-gnomevfs.c + +@WITH_LIBGSF_BONOBO_TRUE@@WITH_LIBGSF_GNOME_TRUE@am__append_3 = \ +@WITH_LIBGSF_BONOBO_TRUE@@WITH_LIBGSF_GNOME_TRUE@ gsf-input-bonobo.c \ +@WITH_LIBGSF_BONOBO_TRUE@@WITH_LIBGSF_GNOME_TRUE@ gsf-output-bonobo.c \ +@WITH_LIBGSF_BONOBO_TRUE@@WITH_LIBGSF_GNOME_TRUE@ gsf-shared-bonobo-stream.c + +subdir = gsf-gnome +DIST_COMMON = $(libgsf_gnome_1_include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/gsf-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" \ + "$(DESTDIR)$(libgsf_gnome_1_includedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +am__DEPENDENCIES_1 = +@WITH_LIBGSF_GNOME_TRUE@libgsf_gnome_1_la_DEPENDENCIES = \ +@WITH_LIBGSF_GNOME_TRUE@ $(top_builddir)/gsf/libgsf-1.la \ +@WITH_LIBGSF_GNOME_TRUE@ $(am__DEPENDENCIES_1) +am__libgsf_gnome_1_la_SOURCES_DIST = gsf-input-gnomevfs.c \ + gsf-output-gnomevfs.c gsf-input-bonobo.c gsf-output-bonobo.c \ + gsf-shared-bonobo-stream.c +@WITH_LIBGSF_GNOMEVFS_TRUE@@WITH_LIBGSF_GNOME_TRUE@am__objects_1 = gsf-input-gnomevfs.lo \ +@WITH_LIBGSF_GNOMEVFS_TRUE@@WITH_LIBGSF_GNOME_TRUE@ gsf-output-gnomevfs.lo +@WITH_LIBGSF_BONOBO_TRUE@@WITH_LIBGSF_GNOME_TRUE@am__objects_2 = gsf-input-bonobo.lo \ +@WITH_LIBGSF_BONOBO_TRUE@@WITH_LIBGSF_GNOME_TRUE@ gsf-output-bonobo.lo \ +@WITH_LIBGSF_BONOBO_TRUE@@WITH_LIBGSF_GNOME_TRUE@ gsf-shared-bonobo-stream.lo +@WITH_LIBGSF_GNOME_TRUE@am_libgsf_gnome_1_la_OBJECTS = \ +@WITH_LIBGSF_GNOME_TRUE@ $(am__objects_1) $(am__objects_2) +libgsf_gnome_1_la_OBJECTS = $(am_libgsf_gnome_1_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +libgsf_gnome_1_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(libgsf_gnome_1_la_LDFLAGS) $(LDFLAGS) \ + -o $@ +@WITH_LIBGSF_GNOME_TRUE@am_libgsf_gnome_1_la_rpath = -rpath $(libdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libgsf_gnome_1_la_SOURCES) +DIST_SOURCES = $(am__libgsf_gnome_1_la_SOURCES_DIST) +HEADERS = $(libgsf_gnome_1_include_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BONOBO_REQ = @BONOBO_REQ@ +BZ2_LIBS = @BZ2_LIBS@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURRENT_MINUS_AGE = @CURRENT_MINUS_AGE@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ +GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GNOMEVFS_REQ = @GNOMEVFS_REQ@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEXE = @LIBEXE@ +LIBGSF_BONOBO_CFLAGS = @LIBGSF_BONOBO_CFLAGS@ +LIBGSF_BONOBO_LIBS = @LIBGSF_BONOBO_LIBS@ +LIBGSF_CFLAGS = @LIBGSF_CFLAGS@ +LIBGSF_GIO_CFLAGS = @LIBGSF_GIO_CFLAGS@ +LIBGSF_GIO_LIBS = @LIBGSF_GIO_LIBS@ +LIBGSF_GNOME_CFLAGS = @LIBGSF_GNOME_CFLAGS@ +LIBGSF_GNOME_LIBS = @LIBGSF_GNOME_LIBS@ +LIBGSF_LIBS = @LIBGSF_LIBS@ +LIBGSF_MAJOR_VERSION = @LIBGSF_MAJOR_VERSION@ +LIBGSF_MICRO_VERSION = @LIBGSF_MICRO_VERSION@ +LIBGSF_MINOR_VERSION = @LIBGSF_MINOR_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +PYGTK_CFLAGS = @PYGTK_CFLAGS@ +PYGTK_CODEGEN = @PYGTK_CODEGEN@ +PYGTK_LIBS = @PYGTK_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +WARN_CFLAGS = @WARN_CFLAGS@ +WINDRES = @WINDRES@ +XGETTEXT = @XGETTEXT@ +Z_CPPFLAGS = @Z_CPPFLAGS@ +Z_LIBS = @Z_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CPPFLAGS = -I$(top_srcdir) $(LIBGSF_GNOME_CFLAGS) +@WITH_LIBGSF_GNOME_TRUE@lib_LTLIBRARIES = libgsf-gnome-1.la +@WITH_LIBGSF_GNOME_TRUE@libgsf_gnome_1_la_LIBADD = $(top_builddir)/gsf/libgsf-1.la $(LIBGSF_GNOME_LIBS) +@WITH_LIBGSF_GNOME_TRUE@libgsf_gnome_1_la_LDFLAGS = -version-info \ +@WITH_LIBGSF_GNOME_TRUE@ $(VERSION_INFO) $(am__append_1) +@WITH_LIBGSF_GNOME_TRUE@libgsf_gnome_1_la_SOURCES = $(am__append_2) \ +@WITH_LIBGSF_GNOME_TRUE@ $(am__append_3) +libgsf_gnome_1_includedir = $(includedir)/libgsf-1/gsf-gnome +libgsf_gnome_1_include_HEADERS = \ + gsf-input-gnomevfs.h \ + gsf-output-gnomevfs.h \ + gsf-input-bonobo.h \ + gsf-output-bonobo.h \ + gsf-shared-bonobo-stream.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gsf-gnome/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu gsf-gnome/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; 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 +libgsf-gnome-1.la: $(libgsf_gnome_1_la_OBJECTS) $(libgsf_gnome_1_la_DEPENDENCIES) + $(AM_V_CCLD)$(libgsf_gnome_1_la_LINK) $(am_libgsf_gnome_1_la_rpath) $(libgsf_gnome_1_la_OBJECTS) $(libgsf_gnome_1_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-input-bonobo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-input-gnomevfs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-output-bonobo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-output-gnomevfs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-shared-bonobo-stream.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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 +install-libgsf_gnome_1_includeHEADERS: $(libgsf_gnome_1_include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(libgsf_gnome_1_includedir)" || $(MKDIR_P) "$(DESTDIR)$(libgsf_gnome_1_includedir)" + @list='$(libgsf_gnome_1_include_HEADERS)'; test -n "$(libgsf_gnome_1_includedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libgsf_gnome_1_includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(libgsf_gnome_1_includedir)" || exit $$?; \ + done + +uninstall-libgsf_gnome_1_includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(libgsf_gnome_1_include_HEADERS)'; test -n "$(libgsf_gnome_1_includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(libgsf_gnome_1_includedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(libgsf_gnome_1_includedir)" && rm -f $$files + +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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + 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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + 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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libgsf_gnome_1_includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(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 . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-libgsf_gnome_1_includeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLTLIBRARIES \ + uninstall-libgsf_gnome_1_includeHEADERS + +.MAKE: install-am install-strip + +.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-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-libgsf_gnome_1_includeHEADERS \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-libLTLIBRARIES \ + uninstall-libgsf_gnome_1_includeHEADERS + + +# 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/gsf-gnome/gsf-input-bonobo.c b/gsf-gnome/gsf-input-bonobo.c new file mode 100644 index 0000000..2f92095 --- /dev/null +++ b/gsf-gnome/gsf-input-bonobo.c @@ -0,0 +1,294 @@ + /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-bonobo.c: bonobo based input + * + * Copyright (C) 2002-2003 Jon K Hellan (hellan@acm.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +/* FIXME: Should make CORBA environment available to caller somehow. */ +struct _GsfInputBonobo { + GsfInput input; + GsfSharedBonoboStream *shared; + guint8 *buf; + size_t buf_size; + gsf_off_t pos; +}; + +typedef struct { + GsfInputClass input_class; +} GsfInputBonoboClass; + +static int +gib_synch_shared_ptr (GsfInputBonobo *binput) +{ + CORBA_Environment ev; + CORBA_long new_pos; + + if (binput->shared == NULL) + return 0; + if (binput->pos == (gsf_off_t) binput->shared->pos) + return 0; + + CORBA_exception_init (&ev); + new_pos = (CORBA_long) binput->pos; + Bonobo_Stream_seek (binput->shared->stream, new_pos, + Bonobo_Stream_SeekSet, &ev); + if (BONOBO_EX (&ev)) { + g_warning ("%s", bonobo_exception_get_text (&ev)); + CORBA_exception_free (&ev); + return -1; + } else { + binput->shared->pos = new_pos; + return 0; + } +} + +/** + * gsf_input_bonobo_new : + * @stream : Bonobo stream + * @err : optionally %NULL. + * + * Returns: a new input object or %NULL. + **/ +GsfInput * +gsf_input_bonobo_new (Bonobo_Stream const stream, GError **err) +{ + GsfInputBonobo *input; + Bonobo_StorageInfo *info; + CORBA_Environment ev; + CORBA_long size; + + if (stream == NULL) { + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "stream is NULL"); + return NULL; + } + + CORBA_exception_init (&ev); + /* info->size doesn't work */ + size = Bonobo_Stream_seek (stream, 0, Bonobo_Stream_SeekEnd, &ev); + if (BONOBO_EX (&ev)) { + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "%s: %s", + "Error seeking to get stream size", + bonobo_exception_get_text (&ev)); + CORBA_exception_free (&ev); + return NULL; + } + Bonobo_Stream_seek (stream, 0, Bonobo_Stream_SeekSet, &ev); + if (BONOBO_EX (&ev)) { + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "%s: %s", + "Error seeking to get stream size", + bonobo_exception_get_text (&ev)); + CORBA_exception_free (&ev); + return NULL; + } + /* */ + + info = Bonobo_Stream_getInfo (stream, 0, &ev); + if (BONOBO_EX (&ev)) { + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "%s: %s", + "Error getting stream info", + bonobo_exception_get_text (&ev)); + CORBA_exception_free (&ev); + return NULL; + } + + input = g_object_new (GSF_INPUT_BONOBO_TYPE, NULL); + if (G_UNLIKELY (NULL == input)) { + CORBA_free (info); + return NULL; + } + + input->shared = gsf_shared_bonobo_stream_new (stream); + input->buf = NULL; + input->buf_size = 0; + gsf_input_set_size (GSF_INPUT (input), (gsf_off_t) size); + gsf_input_set_name (GSF_INPUT (input), info->name); + + CORBA_free (info); + + return GSF_INPUT (input); +} + +static void +gsf_input_bonobo_finalize (GObject *obj) +{ + GObjectClass *parent_class; + GsfInputBonobo *input = (GsfInputBonobo *)obj; + + if (input->shared) + g_object_unref (G_OBJECT (input->shared)); + input->shared = NULL; + + g_free (input->buf); + input->buf = NULL; + input->buf_size = 0; + + parent_class = g_type_class_peek (GSF_INPUT_TYPE); + if (parent_class && parent_class->finalize) + parent_class->finalize (obj); +} + +static GsfInput * +gsf_input_bonobo_dup (GsfInput *src_input, GError **err) +{ + GsfInputBonobo const *src = (GsfInputBonobo *)src_input; + GsfInputBonobo *dst = g_object_new (GSF_INPUT_BONOBO_TYPE, NULL); + if (G_UNLIKELY (NULL == dst)) return NULL; + + (void) err; + + dst->shared = src->shared; + g_object_ref (G_OBJECT (dst->shared)); + + return GSF_INPUT (dst); +} + +static guint8 const * +gsf_input_bonobo_read (GsfInput *input, size_t num_bytes, + guint8 *buffer) +{ + GsfInputBonobo *binput = GSF_INPUT_BONOBO (input); + CORBA_unsigned_long num_read; + Bonobo_Stream_iobuf *bsibuf; + CORBA_Environment ev; + + g_return_val_if_fail (binput != NULL, NULL); + g_return_val_if_fail (binput->shared != NULL, NULL); + g_return_val_if_fail (binput->shared->stream != NULL, NULL); + + if (buffer == NULL) { + if (binput->buf_size < num_bytes) { + binput->buf_size = num_bytes; + g_free (binput->buf); + binput->buf = g_new (guint8, binput->buf_size); + } + buffer = binput->buf; + } + + if (gib_synch_shared_ptr (binput) != 0) + return NULL; + + CORBA_exception_init (&ev); + Bonobo_Stream_read (binput->shared->stream, (CORBA_long) num_bytes, + &bsibuf, &ev); + if (BONOBO_EX (&ev)) { + g_warning ("%s", bonobo_exception_get_text (&ev)); + return NULL; + } else { + memcpy (buffer, bsibuf->_buffer, bsibuf->_length); + num_read = bsibuf->_length; + CORBA_free (bsibuf); + } + if ((size_t) num_read == num_bytes) { + return buffer; + } else { + g_warning ("Only read %ld bytes, asked for %ld", + (long)num_read, (long)num_bytes); + return NULL; + } +} + +static gboolean +gsf_input_bonobo_seek (GsfInput *input, gsf_off_t offset, GSeekType whence) +{ + GsfInputBonobo *binput = GSF_INPUT_BONOBO (input); + Bonobo_Stream_SeekType bwhence; + CORBA_long pos, coffset; + CORBA_Environment ev; + + g_return_val_if_fail (binput != NULL, TRUE); + g_return_val_if_fail (binput->shared != NULL, TRUE); + g_return_val_if_fail (binput->shared->stream != NULL, TRUE); + + if (whence == G_SEEK_CUR) { + if (gib_synch_shared_ptr (binput) != 0) + return TRUE; + } + + switch (whence) { + case G_SEEK_SET : + bwhence = Bonobo_Stream_SeekSet; + break; + case G_SEEK_CUR : + bwhence = Bonobo_Stream_SeekCur; + break; + case G_SEEK_END : + bwhence = Bonobo_Stream_SeekEnd; + break; + default: + return TRUE; + } + + + coffset = offset; + if ((gsf_off_t) coffset != offset) { /* Check for overflow */ + g_warning ("offset too large for Bonobo_Stream_seek"); + return TRUE; + } + CORBA_exception_init (&ev); + pos = Bonobo_Stream_seek + (binput->shared->stream, coffset, bwhence, &ev); + if (BONOBO_EX (&ev)) { + g_warning ("%s", bonobo_exception_get_text (&ev)); + return TRUE; + } else { + binput->shared->pos = pos; + binput->pos = (gsf_off_t) pos; + return FALSE; + } +} + +static void +gsf_input_bonobo_init (GObject *obj) +{ + GsfInputBonobo *binput = GSF_INPUT_BONOBO (obj); + + binput->shared = NULL; + binput->buf = NULL; + binput->buf_size = 0; +} + +static void +gsf_input_bonobo_class_init (GObjectClass *gobject_class) +{ + GsfInputClass *input_class = GSF_INPUT_CLASS (gobject_class); + + gobject_class->finalize = gsf_input_bonobo_finalize; + input_class->Dup = gsf_input_bonobo_dup; + input_class->Read = gsf_input_bonobo_read; + input_class->Seek = gsf_input_bonobo_seek; +} + +GSF_CLASS (GsfInputBonobo, gsf_input_bonobo, + gsf_input_bonobo_class_init, gsf_input_bonobo_init, GSF_INPUT_TYPE) diff --git a/gsf-gnome/gsf-input-bonobo.h b/gsf-gnome/gsf-input-bonobo.h new file mode 100644 index 0000000..20aa98d --- /dev/null +++ b/gsf-gnome/gsf-input-bonobo.h @@ -0,0 +1,41 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-bonobo.h: bonobo based input + * + * Copyright (C) 2002-2003 Jon K Hellan (hellan@acm.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_INPUT_BONOBO_H +#define GSF_INPUT_BONOBO_H + +#include +#include + +G_BEGIN_DECLS + +#define GSF_INPUT_BONOBO_TYPE (gsf_input_bonobo_get_type ()) +#define GSF_INPUT_BONOBO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_INPUT_BONOBO_TYPE, GsfInputBonobo)) +#define GSF_IS_INPUT_BONOBO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_INPUT_BONOBO_TYPE)) + +typedef struct _GsfInputBonobo GsfInputBonobo; + +GType gsf_input_bonobo_get_type (void); +GsfInput *gsf_input_bonobo_new (Bonobo_Stream const stream, GError **err); + +G_END_DECLS + +#endif /* GSF_INPUT_BONOBO_H */ diff --git a/gsf-gnome/gsf-input-gnomevfs.c b/gsf-gnome/gsf-input-gnomevfs.c new file mode 100644 index 0000000..7b28a24 --- /dev/null +++ b/gsf-gnome/gsf-input-gnomevfs.c @@ -0,0 +1,367 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-gnomevfs.c: + * + * Copyright (C) 2002-2004 Dom Lachowicz (cinamod@hotmail.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include + +#ifdef LIBGSF_GNOMEVFS_VIA_GIO +#include +#define GnomeVFSHandle void +#define GnomeVFSURI void +#else +#include +#endif + +#include +#include +#include +#include + +struct _GsfInputGnomeVFS { + GsfInput input; + + GnomeVFSHandle *handle; + GnomeVFSURI *uri; + + guint8 *buf; + size_t buf_size; +}; + +typedef GsfInputClass GsfInputGnomeVFSClass; + + +#ifdef LIBGSF_GNOMEVFS_VIA_GIO + +GType +gsf_input_gnomevfs_get_type (void) +{ + return gsf_input_gio_get_type (); +} + +GsfInput * +gsf_input_gnomevfs_new (char const *uri, GError **error) +{ + return gsf_input_gio_new_for_uri (uri, error); +} + +GsfInput * +gsf_input_gnomevfs_new_uri (GnomeVFSURI *uri, GError **error) +{ + static gboolean tried = FALSE; + static char * (*h_g_vfs_uri_to_string) (const GnomeVFSURI *uri, int); + + if (!tried) { + gpointer p; + GModule *module; + + tried = TRUE; + module = g_module_open (NULL, 0); + if (module) { + if (g_module_symbol (module, "gnome_vfs_uri_to_string", + &p)) + h_g_vfs_uri_to_string = p; + g_module_close (module); + } + } + + if (h_g_vfs_uri_to_string) { + char *uritxt = h_g_vfs_uri_to_string (uri, 0); + GsfInput *res = gsf_input_gio_new_for_uri (uritxt, error); + g_free (uritxt); + return res; + } + + g_set_error (error, gsf_input_error_id (), 0, + "Failed to interface to gnome-vfs"); + return NULL; +} + +#else + +/** + * gsf_input_gnomevfs_new_uri: + * @uri : uri you wish to open. + * @err : optionally %NULL. + * + * Returns: a new input or %NULL. + **/ +GsfInput * +gsf_input_gnomevfs_new_uri (GnomeVFSURI *uri, GError **error) +{ + GnomeVFSHandle *handle; + GnomeVFSFileInfo *info; + GnomeVFSResult res; + GnomeVFSFileType type; + gsf_off_t size; + gboolean is_local; + + if (uri == NULL) { + g_set_error (error, gsf_input_error_id (), 0, + "Filename/URI cannot be NULL"); + return NULL; + } + + if (!VFS_METHOD_HAS_FUNC (uri->method, seek)) + goto make_local_copy; + + info = gnome_vfs_file_info_new (); + res = gnome_vfs_get_file_info_uri (uri, info, GNOME_VFS_FILE_INFO_DEFAULT | GNOME_VFS_FILE_INFO_FOLLOW_LINKS); + + size = (gsf_off_t)info->size; + type = info->type; + is_local = GNOME_VFS_FILE_INFO_LOCAL (info); + gnome_vfs_file_info_unref (info); + + switch (res) { + case GNOME_VFS_ERROR_NOT_SUPPORTED: + goto make_local_copy; + default: + g_set_error (error, gsf_input_error_id (), (gint) res, + gnome_vfs_result_to_string (res)); + return NULL; + case GNOME_VFS_OK: /* Nothing */ ; + } + + if (type != GNOME_VFS_FILE_TYPE_REGULAR) { +#if 0 + g_print ("uri=%s\n", gnome_vfs_uri_to_string (uri, GNOME_VFS_URI_HIDE_NONE)); + g_print ("uri.text=%s\n", uri->text); + g_print ("parent=%s\n", uri->parent ? gnome_vfs_uri_to_string (uri->parent, GNOME_VFS_URI_HIDE_NONE) : "(null)"); + g_print ("method=%s\n", uri->method_string); + g_print ("fragment=%s\n", uri->fragment_id ? uri->fragment_id : "(null)"); +#endif + if (type == GNOME_VFS_FILE_TYPE_DIRECTORY && uri->parent) { + /* Reported for "file:///.../foo.zip#zip:beta.gnumeric" */ + goto make_local_copy; + } + + g_set_error (error, gsf_input_error_id (), 0, + "Not a regular file"); + return NULL; + } + + /* Make copies of small files. */ + if (!is_local && size < (256 << 10)) + goto make_local_copy; + + res = gnome_vfs_open_uri (&handle, uri, + GNOME_VFS_OPEN_READ | GNOME_VFS_OPEN_RANDOM); + if (res != GNOME_VFS_OK) { + g_set_error (error, gsf_input_error_id (), (gint) res, + gnome_vfs_result_to_string (res)); + return NULL; + } + + { + char *name; + GsfInputGnomeVFS *input = g_object_new (GSF_INPUT_GNOMEVFS_TYPE, NULL); + if (G_UNLIKELY (NULL == input)) { + if (NULL != handle) + gnome_vfs_close (handle); + return NULL; + } + + input->handle = handle; + input->uri = gnome_vfs_uri_ref (uri); + input->buf = NULL; + input->buf_size = 0; + gsf_input_set_size (GSF_INPUT (input), size); + name = gnome_vfs_uri_to_string (uri, 0); + gsf_input_set_name (GSF_INPUT (input), name); + g_free (name); + return GSF_INPUT (input); + } + + make_local_copy: + { + char *buffer; + int file_size; + char *uri_text, *name; + GsfInput *mem; + + uri_text = gnome_vfs_uri_to_string (uri, GNOME_VFS_URI_HIDE_NONE); + res = gnome_vfs_read_entire_file (uri_text, &file_size, &buffer); + g_free (uri_text); + if (res != GNOME_VFS_OK) { + g_set_error (error, gsf_input_error_id (), (gint)res, + "Read error while creating local copy."); + return NULL; + } + + mem = gsf_input_memory_new (buffer, file_size, TRUE); + if (!mem) { + g_set_error (error, gsf_input_error_id (), 0, + "Failed to create local memory stream"); + g_free (buffer); + return NULL; + } + + name = gnome_vfs_uri_to_string (uri, 0); + gsf_input_set_name (mem, name); + g_free (name); + + return mem; + } +} + +/** + * gsf_input_gnomevfs_new : + * @uri : uri you wish to open. + * @err : optionally %NULL. + * + * Returns: a new file or %NULL. + **/ +GsfInput * +gsf_input_gnomevfs_new (char const *text_uri, GError **error) +{ + GnomeVFSURI *uri = gnome_vfs_uri_new (text_uri); + if (!uri) { + g_set_error (error, gsf_input_error_id (), 0, + "Invalid URI"); + return NULL; + } else { + GsfInput *res = gsf_input_gnomevfs_new_uri (uri, error); + gnome_vfs_uri_unref (uri); + return res; + } +} + +static void +gsf_input_gnomevfs_finalize (GObject *obj) +{ + GObjectClass *parent_class; + GsfInputGnomeVFS *input = (GsfInputGnomeVFS *)obj; + + if (input->handle != NULL) { + gnome_vfs_close (input->handle); + input->handle = NULL; + } + if (input->uri != NULL) { + gnome_vfs_uri_unref (input->uri); + input->uri = NULL; + } + + g_free (input->buf); + input->buf = NULL; + input->buf_size = 0; + + parent_class = g_type_class_peek (GSF_INPUT_TYPE); + if (parent_class && parent_class->finalize) + parent_class->finalize (obj); +} + +static GsfInput * +gsf_input_gnomevfs_dup (GsfInput *src_input, GError **err) +{ + GsfInputGnomeVFS const *src = (GsfInputGnomeVFS *)src_input; + return gsf_input_gnomevfs_new (src->input.name, err); +} + +static guint8 const * +gsf_input_gnomevfs_read (GsfInput *input, size_t num_bytes, + guint8 *buffer) +{ + GsfInputGnomeVFS *vfs = GSF_INPUT_GNOMEVFS (input); + GnomeVFSResult res = GNOME_VFS_OK; + GnomeVFSFileSize nread = 0, total_read = 0; + + g_return_val_if_fail (vfs != NULL, NULL); + g_return_val_if_fail (vfs->handle != NULL, NULL); + + if (buffer == NULL) { + if (vfs->buf_size < num_bytes) { + vfs->buf_size = num_bytes; + g_free (vfs->buf); + vfs->buf = g_new (guint8, vfs->buf_size); + } + buffer = vfs->buf; + } + + while ((res == GNOME_VFS_OK) && (total_read < num_bytes)) { + res = gnome_vfs_read (vfs->handle, + (gpointer)(buffer + total_read), + (GnomeVFSFileSize) (num_bytes - total_read), &nread); + total_read += nread; + } + + if (res != GNOME_VFS_OK || total_read != num_bytes) + return NULL; + + return buffer; +} + +static gboolean +gsf_input_gnomevfs_seek (GsfInput *input, gsf_off_t offset, GSeekType whence) +{ + GsfInputGnomeVFS const *vfs = GSF_INPUT_GNOMEVFS (input); + GnomeVFSSeekPosition vfs_whence; + + if (vfs->handle == NULL) + return TRUE; + + switch (whence) { + default: + case G_SEEK_SET : vfs_whence = GNOME_VFS_SEEK_START; break; + case G_SEEK_CUR : vfs_whence = GNOME_VFS_SEEK_CURRENT; break; + case G_SEEK_END : vfs_whence = GNOME_VFS_SEEK_END; break; + } + + /* Work around http://bugzilla.gnome.org/show_bug.cgi?id=152844 */ + if (whence == G_SEEK_SET && offset > 0 && offset == gsf_input_size (input)) { + if (gsf_input_gnomevfs_seek (input, offset - 1, whence)) + return TRUE; + if (gsf_input_gnomevfs_read (input, 1, NULL) == NULL) + return TRUE; + return FALSE; + } + + if (GNOME_VFS_OK == gnome_vfs_seek (vfs->handle,vfs_whence, + (GnomeVFSFileOffset) offset)) + return FALSE; + return TRUE; +} + +static void +gsf_input_gnomevfs_init (GObject *obj) +{ + GsfInputGnomeVFS *vfs = GSF_INPUT_GNOMEVFS (obj); + + vfs->handle = NULL; + vfs->buf = NULL; + vfs->buf_size = 0; +} + +static void +gsf_input_gnomevfs_class_init (GObjectClass *gobject_class) +{ + GsfInputClass *input_class = GSF_INPUT_CLASS (gobject_class); + + gobject_class->finalize = gsf_input_gnomevfs_finalize; + input_class->Dup = gsf_input_gnomevfs_dup; + input_class->Read = gsf_input_gnomevfs_read; + input_class->Seek = gsf_input_gnomevfs_seek; +} + +GSF_CLASS (GsfInputGnomeVFS, gsf_input_gnomevfs, + gsf_input_gnomevfs_class_init, gsf_input_gnomevfs_init, + GSF_INPUT_TYPE) + +#endif diff --git a/gsf-gnome/gsf-input-gnomevfs.h b/gsf-gnome/gsf-input-gnomevfs.h new file mode 100644 index 0000000..44a5315 --- /dev/null +++ b/gsf-gnome/gsf-input-gnomevfs.h @@ -0,0 +1,53 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-gnomevfs.h + * + * Copyright (C) 2002-2003 Dom Lachowicz (cinamod@hotmail.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_INPUT_GNOMEVFS_H +#define GSF_INPUT_GNOMEVFS_H + +#include + +#ifndef LIBGSF_GNOMEVFS_VIA_GIO +/* + * The installed version will always do this. For our emulation layer, we + * want to avoid it. + */ +#include +#else +#define GnomeVFSURI void +#endif + +G_BEGIN_DECLS + +#define GSF_INPUT_GNOMEVFS_TYPE (gsf_input_gnomevfs_get_type ()) +#define GSF_INPUT_GNOMEVFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_INPUT_GNOMEVFS_TYPE, GsfInputGnomeVFS)) +#define GSF_IS_INPUT_GNOMEVFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_INPUT_GNOMEVFS_TYPE)) + +typedef struct _GsfInputGnomeVFS GsfInputGnomeVFS; + +GType gsf_input_gnomevfs_get_type (void); +GsfInput *gsf_input_gnomevfs_new (char const *uri, GError **error); +GsfInput *gsf_input_gnomevfs_new_uri (GnomeVFSURI *uri, GError **error); + +gboolean gsf_input_gnomevfs_needs_local_copy (GsfInputGnomeVFS *vfs_input); + +G_END_DECLS + +#endif /* GSF_INPUT_GNOMEVFS_H */ diff --git a/gsf-gnome/gsf-output-bonobo.c b/gsf-gnome/gsf-output-bonobo.c new file mode 100644 index 0000000..e88a345 --- /dev/null +++ b/gsf-gnome/gsf-output-bonobo.c @@ -0,0 +1,164 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-bonobo.c: bonobo based output + * + * Copyright (C) 2002-2003 Dom Lachowicz (cinamod@hotmail.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include + +struct _GsfOutputBonobo { + GsfOutput output; + Bonobo_Stream stream ; +}; + +typedef struct { + GsfOutputClass output_class; +} GsfOutputBonoboClass; + +/** + * gsf_output_bonobo_new : + * @stream : non-%NULL bonobo stream + * @err : optionally %NULL. + * + * Returns: a new file or %NULL. + **/ +GsfOutput * +gsf_output_bonobo_new (Bonobo_Stream const stream, G_GNUC_UNUSED GError **err) +{ + GsfOutputBonobo *res; + + res = g_object_new (GSF_OUTPUT_BONOBO_TYPE, NULL); + if (G_UNLIKELY (NULL == res)) return NULL; + + res->stream = stream; + + return GSF_OUTPUT (res); +} + +static gboolean +gsf_output_bonobo_close (GsfOutput *output) +{ + GsfOutputBonobo *bonobo = GSF_OUTPUT_BONOBO (output); + gboolean res = FALSE; + + if (bonobo->stream != NULL) { + bonobo->stream = NULL; + res = TRUE; + } + + return res; +} + +static gboolean +gsf_output_bonobo_seek (GsfOutput *output, gsf_off_t offset, + GSeekType whence) +{ + GsfOutputBonobo const *bonobo = GSF_OUTPUT_BONOBO (output); + Bonobo_Stream_SeekType bwhence = 0; /* make compiler shut up */ + CORBA_long pos; + CORBA_Environment ev; + + g_return_val_if_fail (bonobo->stream != CORBA_OBJECT_NIL, + gsf_output_set_error (output, 0, "missing stream")); + + switch (whence) { + case G_SEEK_SET : bwhence = Bonobo_Stream_SeekSet; break; + case G_SEEK_CUR : bwhence = Bonobo_Stream_SeekCur; break; + case G_SEEK_END : bwhence = Bonobo_Stream_SeekEnd; break; + default: + break; /*checked in GsfOutput wrapper */ + } + + CORBA_exception_init (&ev); + pos = Bonobo_Stream_seek + (bonobo->stream, offset, bwhence, &ev); + if (BONOBO_EX (&ev)) { + gsf_output_set_error (output, 0, + "%s", bonobo_exception_get_text (&ev)); + CORBA_exception_free (&ev); + return FALSE; + } + return TRUE; +} + +static gboolean +gsf_output_bonobo_write (GsfOutput *output, + size_t num_bytes, + guint8 const *buffer) +{ + GsfOutputBonobo *bonobo = GSF_OUTPUT_BONOBO (output); + Bonobo_Stream_iobuf *bsobuf; + CORBA_Environment ev; + + g_return_val_if_fail (bonobo != NULL, FALSE); + g_return_val_if_fail (bonobo->stream != NULL, FALSE); + + bsobuf = Bonobo_Stream_iobuf__alloc (); + bsobuf->_buffer = (CORBA_octet*)buffer; + bsobuf->_length = num_bytes; + + CORBA_exception_init (&ev); + Bonobo_Stream_write (bonobo->stream, bsobuf, &ev); + if (BONOBO_EX (&ev)) { + g_warning ("%s", bonobo_exception_get_text (&ev)); + CORBA_exception_free (&ev); + return FALSE; + } + + return TRUE; +} + +static void +gsf_output_bonobo_finalize (GObject *obj) +{ + GObjectClass *parent_class; + GsfOutput *output = (GsfOutput *)obj; + + gsf_output_bonobo_close (output); + + parent_class = g_type_class_peek (GSF_OUTPUT_TYPE); + if (parent_class && parent_class->finalize) + parent_class->finalize (obj); +} + +static void +gsf_output_bonobo_init (GObject *obj) +{ + GsfOutputBonobo *stream = GSF_OUTPUT_BONOBO (obj); + + stream->stream = NULL; +} + +static void +gsf_output_bonobo_class_init (GObjectClass *gobject_class) +{ + GsfOutputClass *output_class = GSF_OUTPUT_CLASS (gobject_class); + + gobject_class->finalize = gsf_output_bonobo_finalize; + output_class->Close = gsf_output_bonobo_close; + output_class->Seek = gsf_output_bonobo_seek; + output_class->Write = gsf_output_bonobo_write; +} + +GSF_CLASS (GsfOutputBonobo, gsf_output_bonobo, + gsf_output_bonobo_class_init, gsf_output_bonobo_init, GSF_OUTPUT_TYPE) diff --git a/gsf-gnome/gsf-output-bonobo.h b/gsf-gnome/gsf-output-bonobo.h new file mode 100644 index 0000000..fe825bc --- /dev/null +++ b/gsf-gnome/gsf-output-bonobo.h @@ -0,0 +1,41 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-bonobo.h: bonobo based output + * + * Copyright (C) 2002-2003 Dom Lachowicz (cinamod@hotmail.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_OUTPUT_BONOBO_H +#define GSF_OUTPUT_BONOBO_H + +#include +#include + +G_BEGIN_DECLS + +#define GSF_OUTPUT_BONOBO_TYPE (gsf_output_bonobo_get_type ()) +#define GSF_OUTPUT_BONOBO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTPUT_BONOBO_TYPE, GsfOutputBonobo)) +#define GSF_IS_OUTPUT_BONOBO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTPUT_BONOBO_TYPE)) + +typedef struct _GsfOutputBonobo GsfOutputBonobo; + +GType gsf_output_bonobo_get_type (void); +GsfOutput *gsf_output_bonobo_new (Bonobo_Stream const stream, GError **err); + +G_END_DECLS + +#endif /* GSF_OUTPUT_BONOBO_H */ diff --git a/gsf-gnome/gsf-output-gnomevfs.c b/gsf-gnome/gsf-output-gnomevfs.c new file mode 100644 index 0000000..bd4ea6d --- /dev/null +++ b/gsf-gnome/gsf-output-gnomevfs.c @@ -0,0 +1,286 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-gnomevfs.c: gnomevfs based output + * + * Copyright (C) 2002-2004 Dom Lachowicz (cinamod@hotmail.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include + +#ifdef LIBGSF_GNOMEVFS_VIA_GIO +#include +#define GnomeVFSHandle void +#define GnomeVFSURI void +#endif + +#include +#include +#include + + +struct _GsfOutputGnomeVFS { + GsfOutput output; + + GnomeVFSHandle *handle; +}; + +typedef struct { + GsfOutputClass output_class; +} GsfOutputGnomeVFSClass; + +#ifdef LIBGSF_GNOMEVFS_VIA_GIO + +GType +gsf_output_gnomevfs_get_type (void) +{ + return gsf_output_gio_get_type (); +} + +GsfOutput * +gsf_output_gnomevfs_new (char const *uri, GError **error) +{ + return gsf_output_gio_new_for_uri (uri, error); +} + +GsfOutput * +gsf_output_gnomevfs_new_uri (GnomeVFSURI *uri, GError **error) +{ + static gboolean tried = FALSE; + static char * (*h_g_vfs_uri_to_string) (const GnomeVFSURI *uri, int); + + if (!tried) { + gpointer p; + GModule *module; + + tried = TRUE; + module = g_module_open (NULL, 0); + if (module) { + if (g_module_symbol (module, "gnome_vfs_uri_to_string", + &p)) + h_g_vfs_uri_to_string = p; + g_module_close (module); + } + } + + if (h_g_vfs_uri_to_string) { + char *uritxt = h_g_vfs_uri_to_string (uri, 0); + GsfOutput *res = gsf_output_gio_new_for_uri (uritxt, error); + g_free (uritxt); + return res; + } + + g_set_error (error, gsf_output_error_id (), 0, + "Failed to interface to gnome-vfs"); + return NULL; +} + +#else + +/** + * gsf_output_gnomevfs_new : + * @text_uri : in utf8. + * @err : optionally %NULL. + * + * Returns: a new file or %NULL. + **/ +GsfOutput * +gsf_output_gnomevfs_new (char const *text_uri, GError **err) +{ + GnomeVFSURI *uri = gnome_vfs_uri_new (text_uri); + GsfOutput *res = gsf_output_gnomevfs_new_uri (uri, err); + gnome_vfs_uri_unref (uri); + return res; +} + +/** + * gsf_output_gnomevfs_new_uri : + * @uri : resource indicator + * @err : optionally %NULL. + * + * Returns: a new file or %NULL. + **/ +GsfOutput * +gsf_output_gnomevfs_new_uri (GnomeVFSURI * uri, GError **err) +{ + GsfOutputGnomeVFS *output; + GnomeVFSHandle *handle; + GnomeVFSResult res; + int perms = -1; + + if (uri == NULL) { + g_set_error (err, gsf_output_error_id (), 0, + "Filename/URI cannot be NULL"); + return NULL; + } + + if (gnome_vfs_uri_exists (uri)) { + /* see bug 159442 - if the file exists, we want to do our best to preserve existing + * pemissions AND truncate the file. that is, we want to emulate truncate() in case + * a gnomevfs backend doesn't support it */ + GnomeVFSFileInfo *info; + + info = gnome_vfs_file_info_new (); + res = gnome_vfs_get_file_info_uri (uri, + info, + GNOME_VFS_FILE_INFO_FOLLOW_LINKS|GNOME_VFS_FILE_INFO_GET_ACCESS_RIGHTS); + + if ((res == GNOME_VFS_OK) && (info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_PERMISSIONS)) { + perms = info->permissions; + } + + gnome_vfs_file_info_unref (info); + } + + if (perms == -1) { + /* we didn't get the permissions, but calling open_uri() with OPEN_WRITE set will create the file for us. + * if the uri_exists(), let's hope that truncate() works. */ + res = gnome_vfs_open_uri (&handle, uri, GNOME_VFS_OPEN_WRITE|GNOME_VFS_OPEN_RANDOM); + + if (res != GNOME_VFS_OK) { + res = gnome_vfs_create_uri (&handle, uri, GNOME_VFS_OPEN_WRITE|GNOME_VFS_OPEN_RANDOM, FALSE, 0644); + } + } else { + /* we got the permissions, so let's call create() with the existing permissions instead of open() since + * create() will truncate the file for us. */ + res = gnome_vfs_create_uri (&handle, uri, GNOME_VFS_OPEN_WRITE|GNOME_VFS_OPEN_RANDOM, FALSE, perms); + + if (res != GNOME_VFS_OK) { + /* create() failed. let's see if we can open_uri() instead and hope that truncate works. */ + res = gnome_vfs_open_uri (&handle, uri, GNOME_VFS_OPEN_WRITE|GNOME_VFS_OPEN_RANDOM); + } + } + + if (res != GNOME_VFS_OK) { + g_set_error (err, gsf_output_error_id (), (gint) res, + gnome_vfs_result_to_string (res)); + return NULL; + } + + /* truncate the file to length 0 so if we overwrite a file smaller than + * it was before, it doesn't show the rest of the old file (Bug: 159442). + * for many gnomevfs backends, this might actually be a noop */ + gnome_vfs_truncate_handle(handle, 0); + + output = g_object_new (GSF_OUTPUT_GNOMEVFS_TYPE, NULL); + if (G_UNLIKELY (NULL == output)) { + if (handle != NULL) + gnome_vfs_close (handle); + return NULL; + } + output->handle = handle; + + return GSF_OUTPUT (output); +} + +static gboolean +gsf_output_gnomevfs_close (GsfOutput *output) +{ + GsfOutputGnomeVFS *vfs = GSF_OUTPUT_GNOMEVFS (output); + gboolean res = FALSE; + + if (vfs->handle != NULL) { + res = (GNOME_VFS_OK == gnome_vfs_close (vfs->handle)); + vfs->handle = NULL; + } + + return res; +} + +static void +gsf_output_gnomevfs_finalize (GObject *obj) +{ + GObjectClass *parent_class; + GsfOutput *output = (GsfOutput *)obj; + + gsf_output_gnomevfs_close (output); + + parent_class = g_type_class_peek (GSF_OUTPUT_TYPE); + if (parent_class && parent_class->finalize) + parent_class->finalize (obj); +} + +static gboolean +gsf_output_gnomevfs_seek (GsfOutput *output, gsf_off_t offset, + GSeekType whence) +{ + GsfOutputGnomeVFS const *vfs = GSF_OUTPUT_GNOMEVFS (output); + GnomeVFSSeekPosition vfs_whence = 0; /* make compiler shut up */ + GnomeVFSResult res; + + g_return_val_if_fail (vfs->handle != NULL, + gsf_output_set_error (output, 0, "missing handle")); + + switch (whence) { + case G_SEEK_SET : vfs_whence = GNOME_VFS_SEEK_START; break; + case G_SEEK_CUR : vfs_whence = GNOME_VFS_SEEK_CURRENT; break; + case G_SEEK_END : vfs_whence = GNOME_VFS_SEEK_END; break; + default : + break; /*checked in GsfOutput wrapper */ + } + + res = gnome_vfs_seek (vfs->handle, vfs_whence, + (GnomeVFSFileOffset) offset); + if (GNOME_VFS_OK == res) + return TRUE; + return gsf_output_set_error (output, 0, + gnome_vfs_result_to_string (res)); +} + +static gboolean +gsf_output_gnomevfs_write (GsfOutput *output, + size_t num_bytes, + guint8 const *buffer) +{ + GsfOutputGnomeVFS *vfs = GSF_OUTPUT_GNOMEVFS (output); + GnomeVFSFileSize nwritten = 0, total_written = 0; + GnomeVFSResult res = GNOME_VFS_OK; + + g_return_val_if_fail (vfs != NULL, FALSE); + g_return_val_if_fail (vfs->handle != NULL, FALSE); + + while ((res == GNOME_VFS_OK) && (total_written < num_bytes)) + { + res = gnome_vfs_write (vfs->handle, (gconstpointer)(buffer + total_written), + (GnomeVFSFileSize)(num_bytes - total_written), &nwritten); + total_written += nwritten; + } + return (res == GNOME_VFS_OK && total_written == num_bytes); +} + +static void +gsf_output_gnomevfs_init (GObject *obj) +{ + GsfOutputGnomeVFS *vfs = GSF_OUTPUT_GNOMEVFS (obj); + + vfs->handle = NULL; +} + +static void +gsf_output_gnomevfs_class_init (GObjectClass *gobject_class) +{ + GsfOutputClass *output_class = GSF_OUTPUT_CLASS (gobject_class); + + gobject_class->finalize = gsf_output_gnomevfs_finalize; + output_class->Close = gsf_output_gnomevfs_close; + output_class->Seek = gsf_output_gnomevfs_seek; + output_class->Write = gsf_output_gnomevfs_write; +} + +GSF_CLASS (GsfOutputGnomeVFS, gsf_output_gnomevfs, + gsf_output_gnomevfs_class_init, gsf_output_gnomevfs_init, GSF_OUTPUT_TYPE) + +#endif diff --git a/gsf-gnome/gsf-output-gnomevfs.h b/gsf-gnome/gsf-output-gnomevfs.h new file mode 100644 index 0000000..d1594e8 --- /dev/null +++ b/gsf-gnome/gsf-output-gnomevfs.h @@ -0,0 +1,49 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-gnomevfs.h: gnomevfs based output + * + * Copyright (C) 2002-2003 Dom Lachowicz (cinamod@hotmail.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_OUTPUT_GNOMEVFS_H +#define GSF_OUTPUT_GNOMEVFS_H + +#include + +#ifndef LIBGSF_GNOMEVFS_VIA_GIO +/* + * The installed version will always do this. For our emulation layer, we + * want to avoid it. + */ +#include +#endif + +G_BEGIN_DECLS + +#define GSF_OUTPUT_GNOMEVFS_TYPE (gsf_output_gnomevfs_get_type ()) +#define GSF_OUTPUT_GNOMEVFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTPUT_GNOMEVFS_TYPE, GsfOutputGnomeVFS)) +#define GSF_IS_OUTPUT_GNOMEVFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTPUT_GNOMEVFS_TYPE)) + +typedef struct _GsfOutputGnomeVFS GsfOutputGnomeVFS; + +GType gsf_output_gnomevfs_get_type (void); +GsfOutput *gsf_output_gnomevfs_new (char const *filename, GError **err); +GsfOutput *gsf_output_gnomevfs_new_uri (GnomeVFSURI * uri, GError **err); + +G_END_DECLS + +#endif /* GSF_OUTPUT_GNOMEVFS_H */ diff --git a/gsf-gnome/gsf-shared-bonobo-stream.c b/gsf-gnome/gsf-shared-bonobo-stream.c new file mode 100644 index 0000000..776549b --- /dev/null +++ b/gsf-gnome/gsf-shared-bonobo-stream.c @@ -0,0 +1,72 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-shared-bonobo-stream.h: helper class for gsf-input-bonobo + * + * Copyright (C) 2002-2003 Jon K Hellan (hellan@acm.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include + +typedef struct { + GObjectClass g_object_class; +} GsfSharedBonoboStreamClass; + +static GObjectClass *parent_class; + +GsfSharedBonoboStream * +gsf_shared_bonobo_stream_new (Bonobo_Stream stream) +{ + GsfSharedBonoboStream *bst = + g_object_new (GSF_SHARED_BONOBO_STREAM_TYPE, NULL); + if (G_UNLIKELY (NULL == bst)) return NULL; + bst->stream = stream; + return bst; +} + +static void +gsf_shared_bonobo_stream_finalize (GObject *obj) +{ + GsfSharedBonoboStream *bst = (GsfSharedBonoboStream *) (obj); + + if (bst->stream != NULL) { + } + + G_OBJECT_CLASS (parent_class)->finalize (obj); +} + +static void +gsf_shared_bonobo_stream_init (GObject *obj) +{ + GsfSharedBonoboStream *bst = (GsfSharedBonoboStream *) (obj); + bst->stream = NULL; + bst->pos = 0; +} + +static void +gsf_shared_bonobo_stream_class_init (GObjectClass *gobject_class) +{ + parent_class = g_type_class_peek_parent (gobject_class); + + gobject_class->finalize = gsf_shared_bonobo_stream_finalize; +} + +GSF_CLASS (GsfSharedBonoboStream, gsf_shared_bonobo_stream, + gsf_shared_bonobo_stream_class_init, + gsf_shared_bonobo_stream_init, + G_TYPE_OBJECT) diff --git a/gsf-gnome/gsf-shared-bonobo-stream.h b/gsf-gnome/gsf-shared-bonobo-stream.h new file mode 100644 index 0000000..865dee3 --- /dev/null +++ b/gsf-gnome/gsf-shared-bonobo-stream.h @@ -0,0 +1,47 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-shared-bonobo-stream.h: helper class for gsf-input-bonobo + * + * Copyright (C) 2002-2003 Jon K Hellan (hellan@acm.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_SHARED_BONOBO_STREAM_H +#define GSF_SHARED_BONOBO_STREAM_H + +#include +#include +#include + +G_BEGIN_DECLS + +#define GSF_SHARED_BONOBO_STREAM_TYPE (gsf_shared_bonobo_stream_get_type ()) +#define GSF_SHARED_BONOBO_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_SHARED_BONOBO_STREAM_TYPE, GsfSharedBonoboStream)) +#define GSF_IS_SHARED_BONOBO_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_SHARED_BONOBO_STREAM_TYPE)) + +typedef struct _GsfSharedBonoboStream GsfSharedBonoboStream; +struct _GsfSharedBonoboStream { + GObject g_object; + Bonobo_Stream stream; + CORBA_long pos; +}; + +GType gsf_shared_bonobo_stream_get_type (void); +GsfSharedBonoboStream *gsf_shared_bonobo_stream_new (Bonobo_Stream stream); + +G_END_DECLS + +#endif /* GSF_SHARED_BONOBO_STREAM_H */ diff --git a/gsf-win32/Makefile.am b/gsf-win32/Makefile.am new file mode 100644 index 0000000..3b26f1a --- /dev/null +++ b/gsf-win32/Makefile.am @@ -0,0 +1,37 @@ +AM_CPPFLAGS = -I$(top_srcdir) $(LIBGSF_CFLAGS) + +if WITH_WIN32 + +lib_LTLIBRARIES = libgsf-win32-1.la + +libgsf_win32_1_la_DEPENDENCIES = lib.def +libgsf_win32_1_la_LIBADD = $(LIBGSF_LIBS) $(top_builddir)/gsf/libgsf-1.la +libgsf_win32_1_la_LDFLAGS = -version-info $(VERSION_INFO) -no-undefined -export-symbols lib.def +libgsf_win32_1_la_SOURCES = \ + gsf-input-win32.c \ + gsf-output-win32.c + +## But headers are installed on all systems: +libgsf_win32_1_includedir = $(includedir)/libgsf-1/gsf-win32 +libgsf_win32_1_include_HEADERS = $(gsf_win32_headers) +else +EXTRA_DIST = $(gsf_win32_headers) +endif + +gsf_win32_headers = \ + gsf-input-win32.h \ + gsf-output-win32.h + +include $(top_srcdir)/gsf.mk +LIB_PUBLIC_HDRS = $(libgsf_win32_1_include_HEADERS) + +if HAVE_LIBEXE +gsf_win32_mslibdir = $(DESTDIR)$(libdir) +gsf_win32_mslib_DATA = gsf-win32-1.lib + +gsf-win32-1.lib: libgsf-win32-1.la lib.def + lib -name:libgsf-win32-1-$(CURRENT_MINUS_AGE).dll -def:lib.def -out:$@ + +CLEANFILES = gsf-win32-1.exp gsf-win32-1.lib +endif + diff --git a/gsf-win32/Makefile.in b/gsf-win32/Makefile.in new file mode 100644 index 0000000..787b50c --- /dev/null +++ b/gsf-win32/Makefile.in @@ -0,0 +1,721 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(am__libgsf_win32_1_include_HEADERS_DIST) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/gsf.mk +subdir = gsf-win32 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/gsf-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" \ + "$(DESTDIR)$(gsf_win32_mslibdir)" \ + "$(DESTDIR)$(libgsf_win32_1_includedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +am__DEPENDENCIES_1 = +am__libgsf_win32_1_la_SOURCES_DIST = gsf-input-win32.c \ + gsf-output-win32.c +@WITH_WIN32_TRUE@am_libgsf_win32_1_la_OBJECTS = gsf-input-win32.lo \ +@WITH_WIN32_TRUE@ gsf-output-win32.lo +libgsf_win32_1_la_OBJECTS = $(am_libgsf_win32_1_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +libgsf_win32_1_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(libgsf_win32_1_la_LDFLAGS) $(LDFLAGS) \ + -o $@ +@WITH_WIN32_TRUE@am_libgsf_win32_1_la_rpath = -rpath $(libdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libgsf_win32_1_la_SOURCES) +DIST_SOURCES = $(am__libgsf_win32_1_la_SOURCES_DIST) +DATA = $(gsf_win32_mslib_DATA) $(noinst_DATA) +am__libgsf_win32_1_include_HEADERS_DIST = gsf-input-win32.h \ + gsf-output-win32.h +HEADERS = $(libgsf_win32_1_include_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BONOBO_REQ = @BONOBO_REQ@ +BZ2_LIBS = @BZ2_LIBS@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURRENT_MINUS_AGE = @CURRENT_MINUS_AGE@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ +GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GNOMEVFS_REQ = @GNOMEVFS_REQ@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEXE = @LIBEXE@ +LIBGSF_BONOBO_CFLAGS = @LIBGSF_BONOBO_CFLAGS@ +LIBGSF_BONOBO_LIBS = @LIBGSF_BONOBO_LIBS@ +LIBGSF_CFLAGS = @LIBGSF_CFLAGS@ +LIBGSF_GIO_CFLAGS = @LIBGSF_GIO_CFLAGS@ +LIBGSF_GIO_LIBS = @LIBGSF_GIO_LIBS@ +LIBGSF_GNOME_CFLAGS = @LIBGSF_GNOME_CFLAGS@ +LIBGSF_GNOME_LIBS = @LIBGSF_GNOME_LIBS@ +LIBGSF_LIBS = @LIBGSF_LIBS@ +LIBGSF_MAJOR_VERSION = @LIBGSF_MAJOR_VERSION@ +LIBGSF_MICRO_VERSION = @LIBGSF_MICRO_VERSION@ +LIBGSF_MINOR_VERSION = @LIBGSF_MINOR_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +PYGTK_CFLAGS = @PYGTK_CFLAGS@ +PYGTK_CODEGEN = @PYGTK_CODEGEN@ +PYGTK_LIBS = @PYGTK_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +WARN_CFLAGS = @WARN_CFLAGS@ +WINDRES = @WINDRES@ +XGETTEXT = @XGETTEXT@ +Z_CPPFLAGS = @Z_CPPFLAGS@ +Z_LIBS = @Z_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CPPFLAGS = -I$(top_srcdir) $(LIBGSF_CFLAGS) +@WITH_WIN32_TRUE@lib_LTLIBRARIES = libgsf-win32-1.la +@WITH_WIN32_TRUE@libgsf_win32_1_la_DEPENDENCIES = lib.def +@WITH_WIN32_TRUE@libgsf_win32_1_la_LIBADD = $(LIBGSF_LIBS) $(top_builddir)/gsf/libgsf-1.la +@WITH_WIN32_TRUE@libgsf_win32_1_la_LDFLAGS = -version-info $(VERSION_INFO) -no-undefined -export-symbols lib.def +@WITH_WIN32_TRUE@libgsf_win32_1_la_SOURCES = \ +@WITH_WIN32_TRUE@ gsf-input-win32.c \ +@WITH_WIN32_TRUE@ gsf-output-win32.c + +@WITH_WIN32_TRUE@libgsf_win32_1_includedir = $(includedir)/libgsf-1/gsf-win32 +@WITH_WIN32_TRUE@libgsf_win32_1_include_HEADERS = $(gsf_win32_headers) +@WITH_WIN32_FALSE@EXTRA_DIST = $(gsf_win32_headers) +gsf_win32_headers = \ + gsf-input-win32.h \ + gsf-output-win32.h + +@WITH_WIN32_TRUE@noinst_DATA = lib.def +@HAVE_LIBEXE_TRUE@CLEANFILES = gsf-win32-1.exp gsf-win32-1.lib +@WITH_WIN32_TRUE@CLEANFILES = lib.def stamp-lib.def +LIB_PUBLIC_HDRS = $(libgsf_win32_1_include_HEADERS) +@HAVE_LIBEXE_TRUE@gsf_win32_mslibdir = $(DESTDIR)$(libdir) +@HAVE_LIBEXE_TRUE@gsf_win32_mslib_DATA = gsf-win32-1.lib +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gsf.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gsf-win32/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu gsf-win32/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; 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 +libgsf-win32-1.la: $(libgsf_win32_1_la_OBJECTS) $(libgsf_win32_1_la_DEPENDENCIES) + $(AM_V_CCLD)$(libgsf_win32_1_la_LINK) $(am_libgsf_win32_1_la_rpath) $(libgsf_win32_1_la_OBJECTS) $(libgsf_win32_1_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-input-win32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-output-win32.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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 +install-gsf_win32_mslibDATA: $(gsf_win32_mslib_DATA) + @$(NORMAL_INSTALL) + test -z "$(gsf_win32_mslibdir)" || $(MKDIR_P) "$(DESTDIR)$(gsf_win32_mslibdir)" + @list='$(gsf_win32_mslib_DATA)'; test -n "$(gsf_win32_mslibdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gsf_win32_mslibdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(gsf_win32_mslibdir)" || exit $$?; \ + done + +uninstall-gsf_win32_mslibDATA: + @$(NORMAL_UNINSTALL) + @list='$(gsf_win32_mslib_DATA)'; test -n "$(gsf_win32_mslibdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(gsf_win32_mslibdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(gsf_win32_mslibdir)" && rm -f $$files +install-libgsf_win32_1_includeHEADERS: $(libgsf_win32_1_include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(libgsf_win32_1_includedir)" || $(MKDIR_P) "$(DESTDIR)$(libgsf_win32_1_includedir)" + @list='$(libgsf_win32_1_include_HEADERS)'; test -n "$(libgsf_win32_1_includedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libgsf_win32_1_includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(libgsf_win32_1_includedir)" || exit $$?; \ + done + +uninstall-libgsf_win32_1_includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(libgsf_win32_1_include_HEADERS)'; test -n "$(libgsf_win32_1_includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(libgsf_win32_1_includedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(libgsf_win32_1_includedir)" && rm -f $$files + +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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + 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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + 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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(gsf_win32_mslibdir)" "$(DESTDIR)$(libgsf_win32_1_includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(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 . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-gsf_win32_mslibDATA \ + install-libgsf_win32_1_includeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-gsf_win32_mslibDATA uninstall-libLTLIBRARIES \ + uninstall-libgsf_win32_1_includeHEADERS + +.MAKE: install-am install-strip + +.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-dvi \ + install-dvi-am install-exec install-exec-am \ + install-gsf_win32_mslibDATA install-html install-html-am \ + install-info install-info-am install-libLTLIBRARIES \ + install-libgsf_win32_1_includeHEADERS install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-gsf_win32_mslibDATA \ + uninstall-libLTLIBRARIES \ + uninstall-libgsf_win32_1_includeHEADERS + + +@WITH_WIN32_TRUE@lib.def: stamp-lib.def +@WITH_WIN32_TRUE@ @true + +@WITH_WIN32_TRUE@stamp-lib.def: $(LIB_PUBLIC_HDRS) Makefile $(top_srcdir)/dumpdef.pl +@WITH_WIN32_TRUE@ hdrs='$(LIB_PUBLIC_HDRS)'; \ +@WITH_WIN32_TRUE@ hdrs_list=''; \ +@WITH_WIN32_TRUE@ for hdr in $$hdrs; do \ +@WITH_WIN32_TRUE@ if test -f $(srcdir)/$$hdr; then \ +@WITH_WIN32_TRUE@ hdrs_list="$$hdrs_list $(srcdir)/$$hdr"; \ +@WITH_WIN32_TRUE@ else \ +@WITH_WIN32_TRUE@ hdrs_list="$$hdrs_list $$hdr"; \ +@WITH_WIN32_TRUE@ fi; \ +@WITH_WIN32_TRUE@ done; \ +@WITH_WIN32_TRUE@ cat $(top_builddir)/gsf-config.h $$hdrs_list | \ +@WITH_WIN32_TRUE@ sed -e 's/^#[ \t]*include[ \t]\+.*$$//g' | \ +@WITH_WIN32_TRUE@ $(CPP) $(AM_CPPFLAGS) $(CPP_CFLAGS) -P - > xgen-libdef.1 && \ +@WITH_WIN32_TRUE@ echo EXPORTS> xgen-libdef.2 && \ +@WITH_WIN32_TRUE@ perl $(top_srcdir)/dumpdef.pl \ +@WITH_WIN32_TRUE@ xgen-libdef.1 >> xgen-libdef.2 \ +@WITH_WIN32_TRUE@ && (cmp -s xgen-libdef.2 lib.def || \ +@WITH_WIN32_TRUE@ cp xgen-libdef.2 lib.def) \ +@WITH_WIN32_TRUE@ && rm -f xgen-libdef.1 xgen-libdef.2 \ +@WITH_WIN32_TRUE@ && echo timestamp > $@ + +@HAVE_LIBEXE_TRUE@gsf-win32-1.lib: libgsf-win32-1.la lib.def +@HAVE_LIBEXE_TRUE@ lib -name:libgsf-win32-1-$(CURRENT_MINUS_AGE).dll -def:lib.def -out:$@ + +# 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/gsf-win32/gsf-input-win32.c b/gsf-win32/gsf-input-win32.c new file mode 100644 index 0000000..2e1b5fa --- /dev/null +++ b/gsf-win32/gsf-input-win32.c @@ -0,0 +1,281 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-win32.c: + * + * Copyright (C) 2003-2004 Dom Lachowicz + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include + +struct _GsfInputIStream { + GsfInput input; + IStream * stream; + guint8 *buf; + size_t buf_size; +}; + +typedef struct { + GsfInputClass input_class; +} GsfInputIStreamClass; + +#define NEED_ISTREAM_MACROS + +#ifdef NEED_ISTREAM_MACROS +#define IStream_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IStream_Clone(This,ppstm) (This)->lpVtbl->Clone(This,ppstm) +#define IStream_Read(This,pv,cb,pcbRead) (This)->lpVtbl->Read(This,pv,cb,pcbRead) +#define IStream_Release(This) (This)->lpVtbl->Release(This) +#define IStream_Seek(This,dlibMove,dwOrigin,plibNewPosition) (This)->lpVtbl->Seek(This,dlibMove,dwOrigin,plibNewPosition) +#define IStream_Stat(This,pstatstg,grfStatFlag) (This)->lpVtbl->Stat(This,pstatstg,grfStatFlag) +#endif + +gchar * gsf_win32_hresult_to_utf8 (HRESULT hr); + +gchar * +gsf_win32_hresult_to_utf8 (HRESULT hr) +{ + void * pMsgBuf; + gchar * utf8_msg; + + if (SUCCEEDED (hr)) + return NULL; + + FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM, NULL, hr, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&pMsgBuf, 0, NULL); + + utf8_msg = g_locale_to_utf8 ((char const *)pMsgBuf, -1, NULL, NULL, NULL); + if (utf8_msg == NULL) + utf8_msg = g_strdup ("!SUCCEEDED (hr)"); + + LocalFree(pMsgBuf); + + return utf8_msg; +} + +static void +hresult_to_gerror (HRESULT hr, GError ** err) +{ + if (err) { + gchar * msg; + + msg = gsf_win32_hresult_to_utf8 (hr); + + if (msg) { + *err = g_error_new (gsf_input_error_id (), 0, msg); + g_free (msg); + } + } +} + +static char * +lpwstr_to_utf8 (LPWSTR str) +{ + if (str) + return g_utf16_to_utf8 (str, -1, NULL, NULL, NULL); + return NULL; +} + +/** + * gsf_input_istream_new : + * @stream : IStream stream + * @err : optionally %NULL. + * + * Returns: a new input object or %NULL. + **/ +GsfInput * +gsf_input_istream_new (IStream * stream, GError **err) +{ + GsfInputIStream *input; + STATSTG statbuf; + HRESULT hr; + char * name; + + if (stream == NULL) { + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "stream is NULL"); + return NULL; + } + + if (FAILED (hr = IStream_Stat (stream, &statbuf, STATFLAG_DEFAULT))) { + hresult_to_gerror (hr, err); + return NULL; + } + + input = g_object_new (GSF_INPUT_ISTREAM_TYPE, NULL); + if (G_UNLIKELY (NULL == input)) { + IStream_Release (stream); + return NULL; + } + + input->stream = stream; + input->buf = NULL; + input->buf_size = 0; + + IStream_AddRef (input->stream); + + /* LowPart and HiPart are the low and high 32 bit UINT parts. The MSDN documentation + says to use QuadPart if your compiler supports 64 bit ints. gsf_off_t is a gint64 value. + http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/large_integer_str.asp + */ + gsf_input_set_size (GSF_INPUT (input), (gsf_off_t) statbuf.cbSize.QuadPart); + + name = lpwstr_to_utf8 (statbuf.pwcsName); + if (name) { + gsf_input_set_name (GSF_INPUT (input), name); + g_free (name); + } + + return GSF_INPUT(input); +} + +static void +gsf_input_istream_finalize (GObject *obj) +{ + GObjectClass *parent_class; + GsfInputIStream *input = (GsfInputIStream *)obj; + + IStream_Release (input->stream); + input->stream = NULL; + + if (input->buf != NULL) { + g_free (input->buf); + input->buf = NULL; + input->buf_size = 0; + } + + parent_class = g_type_class_peek (GSF_INPUT_TYPE); + if (parent_class && parent_class->finalize) + parent_class->finalize (obj); +} + +static GsfInput * +gsf_input_istream_dup (GsfInput *src_input, GError **err) +{ + GsfInputIStream const *src = (GsfInputIStream *)src_input; + GsfInput *dst; + HRESULT hr; + IStream * clone; + + g_return_val_if_fail (src_input != NULL, NULL); + g_return_val_if_fail (src->stream != NULL, NULL); + + if (SUCCEEDED (hr = IStream_Clone (src->stream, &clone))) { + dst = gsf_input_istream_new (clone, NULL); + IStream_Release (clone); /* gsf_input_istream_new() adds a ref */ + return dst; + } + + hresult_to_gerror (hr, err); + return NULL; +} + +static guint8 const * +gsf_input_istream_read (GsfInput *input, size_t num_bytes, + guint8 *buffer) +{ + GsfInputIStream *istm = GSF_INPUT_ISTREAM (input); + HRESULT hr; + ULONG nread, total_read = 0; + + g_return_val_if_fail (istm != NULL, NULL); + g_return_val_if_fail (istm->stream != NULL, NULL); + + if (buffer == NULL) { + if (istm->buf_size < num_bytes) { + istm->buf_size = num_bytes; + g_free (istm->buf); + istm->buf = g_new (guint8, istm->buf_size); + } + buffer = istm->buf; + } + + while (1) + { + hr = IStream_Read (istm->stream, (buffer + total_read), (ULONG)(num_bytes - total_read), &nread); + + if (SUCCEEDED (hr)) { + total_read += nread; + if ((size_t) total_read == num_bytes) { + return buffer; + } + } else + break; + } + + g_warning ("IStream read failed\n"); + return NULL; +} + +static gboolean +gsf_input_istream_seek (GsfInput *input, gsf_off_t offset, GSeekType whence) +{ + GsfInputIStream *istm = GSF_INPUT_ISTREAM (input); + DWORD dwhence; + + g_return_val_if_fail (istm != NULL, TRUE); + g_return_val_if_fail (istm->stream != NULL, TRUE); + + switch (whence) { + case G_SEEK_SET : + dwhence = STREAM_SEEK_SET; + break; + case G_SEEK_CUR : + dwhence = STREAM_SEEK_CUR; + break; + case G_SEEK_END : + dwhence = STREAM_SEEK_END; + break; + default: + return TRUE; + } + + if(SUCCEEDED (IStream_Seek (istm->stream, *(LARGE_INTEGER *) &offset, dwhence, NULL))) + return FALSE; + return TRUE; +} + +static void +gsf_input_istream_init (GObject *obj) +{ + GsfInputIStream *istm = GSF_INPUT_ISTREAM (obj); + + istm->stream = NULL; + istm->buf = NULL; + istm->buf_size = 0; +} + +static void +gsf_input_istream_class_init (GObjectClass *gobject_class) +{ + GsfInputClass *input_class = GSF_INPUT_CLASS (gobject_class); + + gobject_class->finalize = gsf_input_istream_finalize; + input_class->Dup = gsf_input_istream_dup; + input_class->Read = gsf_input_istream_read; + input_class->Seek = gsf_input_istream_seek; +} + +GSF_CLASS (GsfInputIStream, gsf_input_istream, + gsf_input_istream_class_init, gsf_input_istream_init, GSF_INPUT_TYPE) + +/***************************************************************************/ +/***************************************************************************/ diff --git a/gsf-win32/gsf-input-win32.h b/gsf-win32/gsf-input-win32.h new file mode 100644 index 0000000..6052c15 --- /dev/null +++ b/gsf-win32/gsf-input-win32.h @@ -0,0 +1,41 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-win32.h: + * + * Copyright (C) 2003 Dom Lachowicz + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_INPUT_WIN32_H +#define GSF_INPUT_WIN32_H + +#include +#include + +G_BEGIN_DECLS + +#define GSF_INPUT_ISTREAM_TYPE (gsf_input_istream_get_type ()) +#define GSF_INPUT_ISTREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_INPUT_ISTREAM_TYPE, GsfInputIStream)) +#define GSF_IS_INPUT_ISTREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_INPUT_ISTREAM_TYPE)) + +typedef struct _GsfInputIStream GsfInputIStream; + +GType gsf_input_istream_get_type (void); +GsfInput *gsf_input_istream_new (IStream * stream, GError **err); + +G_END_DECLS + +#endif /* GSF_INPUT_ISTREAM_H */ diff --git a/gsf-win32/gsf-output-win32.c b/gsf-win32/gsf-output-win32.c new file mode 100644 index 0000000..eaa2efd --- /dev/null +++ b/gsf-win32/gsf-output-win32.c @@ -0,0 +1,200 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-win32.c: + * + * Copyright (C) 2003-2004 Dom Lachowicz + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include + +struct _GsfOutputIStream { + GsfOutput output; + IStream * stream; +}; + +typedef struct { + GsfOutputClass output_class; +} GsfOutputIStreamClass; + +#define NEED_ISTREAM_MACROS + +#ifdef NEED_ISTREAM_MACROS +#define IStream_AddRef(This) (This)->lpVtbl->AddRef(This) +#define IStream_Write(This,pv,cb,pcbRead) (This)->lpVtbl->Read(This,pv,cb,pcbRead) +#define IStream_Release(This) (This)->lpVtbl->Release(This) +#define IStream_Seek(This,dlibMove,dwOrigin,plibNewPosition) (This)->lpVtbl->Seek(This,dlibMove,dwOrigin,plibNewPosition) +#endif + +/* declared in gsf-input-win32.c */ +extern gchar * gsf_win32_hresult_to_utf8 (HRESULT hr); + +static gboolean +gsf_output_istream_set_error (GsfOutput * output, HRESULT hr) +{ + if (!SUCCEEDED (hr)) { + gchar * msg; + + msg = gsf_win32_hresult_to_utf8 (hr); + if (msg) { + gsf_output_set_error (output, 0, msg); + g_free (msg); + } /* "else" case should never happen */ + + return FALSE; + } + + return TRUE; +} + +/** + * gsf_output_istream_new : + * @stream : IStream stream + * + * Returns: a new output object or %NULL. + **/ +GsfOutput * +gsf_output_istream_new (IStream * stream) +{ + GsfOutputIStream *output; + + g_return_val_if_fail (stream != NULL, NULL); + + output = g_object_new (GSF_OUTPUT_ISTREAM_TYPE, NULL); + if (G_UNLIKELY (NULL == output)) return NULL; + + output->stream = stream; + IStream_AddRef (output->stream); + + return GSF_OUTPUT(output); +} + +static gboolean +gsf_output_istream_close (GsfOutput *output) +{ + GsfOutputIStream *istream = GSF_OUTPUT_ISTREAM (output); + gboolean res = FALSE; + + if (istream->stream != NULL) { + IStream_Release (istream->stream); + istream->stream = NULL; + res = TRUE; + } + + return res; +} + +static void +gsf_output_istream_finalize (GObject *obj) +{ + GObjectClass *parent_class; + GsfOutputIStream *output = (GsfOutputIStream *)obj; + + gsf_output_istream_close (GSF_OUTPUT(output)); + + parent_class = g_type_class_peek (GSF_OUTPUT_TYPE); + if (parent_class && parent_class->finalize) + parent_class->finalize (obj); +} + +static gboolean +gsf_output_istream_write (GsfOutput *output, + size_t num_bytes, + guint8 const *buffer) +{ + GsfOutputIStream *istm = GSF_OUTPUT_ISTREAM (output); + HRESULT hr; + ULONG nwritten, total_written = 0; + + g_return_val_if_fail (istm != NULL, FALSE); + g_return_val_if_fail (istm->stream != NULL, FALSE); + + while (1) { + hr = IStream_Write (istm->stream, (guint8 *)(buffer + total_written), (ULONG)(num_bytes - total_written), &nwritten); + + if (SUCCEEDED (hr)) { + total_written += nwritten; + if ((size_t)total_written == num_bytes) + return TRUE; + } else { + return gsf_output_istream_set_error (output, hr); + } + } + + return TRUE; +} + +static gboolean +gsf_output_istream_seek (GsfOutput *output, gsf_off_t offset, GSeekType whence) +{ + GsfOutputIStream *istm = GSF_OUTPUT_ISTREAM (output); + DWORD dwhence = STREAM_SEEK_SET; + HRESULT hr; + + g_return_val_if_fail (istm != NULL, gsf_output_set_error (output, 0, "missing handle")); + g_return_val_if_fail (istm->stream != NULL, gsf_output_set_error (output, 0, "missing handle")); + + switch (whence) { + case G_SEEK_SET : + dwhence = STREAM_SEEK_SET; + break; + case G_SEEK_CUR : + dwhence = STREAM_SEEK_CUR; + break; + case G_SEEK_END : + dwhence = STREAM_SEEK_END; + break; + default: + break; /* checked in parent wrapper */ + } + + hr = IStream_Seek (istm->stream, *(LARGE_INTEGER *) &offset, dwhence, NULL); + + if (SUCCEEDED (hr)) + return TRUE; + + return gsf_output_istream_set_error (output, hr); +} + +static void +gsf_output_istream_init (GObject *obj) +{ + GsfOutputIStream *istm = GSF_OUTPUT_ISTREAM (obj); + + istm->stream = NULL; +} + +static void +gsf_output_istream_class_init (GObjectClass *gobject_class) +{ + GsfOutputClass *output_class = GSF_OUTPUT_CLASS (gobject_class); + + gobject_class->finalize = gsf_output_istream_finalize; + output_class->Close = gsf_output_istream_close; + output_class->Write = gsf_output_istream_write; + output_class->Seek = gsf_output_istream_seek; +} + +GSF_CLASS (GsfOutputIStream, gsf_output_istream, + gsf_output_istream_class_init, gsf_output_istream_init, GSF_OUTPUT_TYPE) + +/***************************************************************************/ +/***************************************************************************/ diff --git a/gsf-win32/gsf-output-win32.h b/gsf-win32/gsf-output-win32.h new file mode 100644 index 0000000..038a015 --- /dev/null +++ b/gsf-win32/gsf-output-win32.h @@ -0,0 +1,41 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-outut-win32.h: + * + * Copyright (C) 2003 Dom Lachowicz + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_OUTPUT_WIN32_H +#define GSF_OUTPUT_WIN32_H + +#include +#include + +G_BEGIN_DECLS + +#define GSF_OUTPUT_ISTREAM_TYPE (gsf_output_istream_get_type ()) +#define GSF_OUTPUT_ISTREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTPUT_ISTREAM_TYPE, GsfOutputIStream)) +#define GSF_IS_OUTPUT_ISTREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTPUT_ISTREAM_TYPE)) + +typedef struct _GsfOutputIStream GsfOutputIStream; + +GType gsf_output_istream_get_type (void); +GsfOutput *gsf_output_istream_new (IStream * stream); + +G_END_DECLS + +#endif /* GSF_OUTPUT_ISTREAM_H */ diff --git a/gsf.mk b/gsf.mk new file mode 100644 index 0000000..8956efa --- /dev/null +++ b/gsf.mk @@ -0,0 +1,31 @@ +if WITH_WIN32 + +noinst_DATA = lib.def + +lib.def: stamp-lib.def + @true + +stamp-lib.def: $(LIB_PUBLIC_HDRS) Makefile $(top_srcdir)/dumpdef.pl + hdrs='$(LIB_PUBLIC_HDRS)'; \ + hdrs_list=''; \ + for hdr in $$hdrs; do \ + if test -f $(srcdir)/$$hdr; then \ + hdrs_list="$$hdrs_list $(srcdir)/$$hdr"; \ + else \ + hdrs_list="$$hdrs_list $$hdr"; \ + fi; \ + done; \ + cat $(top_builddir)/gsf-config.h $$hdrs_list | \ + sed -e 's/^#[ \t]*include[ \t]\+.*$$//g' | \ + $(CPP) $(AM_CPPFLAGS) $(CPP_CFLAGS) -P - > xgen-libdef.1 && \ + echo EXPORTS> xgen-libdef.2 && \ + perl $(top_srcdir)/dumpdef.pl \ + xgen-libdef.1 >> xgen-libdef.2 \ + && (cmp -s xgen-libdef.2 lib.def || \ + cp xgen-libdef.2 lib.def) \ + && rm -f xgen-libdef.1 xgen-libdef.2 \ + && echo timestamp > $@ + +CLEANFILES = lib.def stamp-lib.def + +endif diff --git a/gsf/Makefile.am b/gsf/Makefile.am new file mode 100644 index 0000000..b09a2fe --- /dev/null +++ b/gsf/Makefile.am @@ -0,0 +1,150 @@ +AM_CPPFLAGS = -I$(top_srcdir) $(LIBGSF_CFLAGS) $(Z_CPPFLAGS) $(LIBGSF_GIO_CFLAGS) \ + -DGNOMELOCALEDIR=\"$(datadir)/locale\" + +lib_LTLIBRARIES = libgsf-1.la + +if WITH_GIO +gioc=gsf-input-gio.c gsf-output-gio.c +gioh=gsf-input-gio.h gsf-output-gio.h +giola=$(LIBGSF_GIO_LIBS) +else +gioc= +gioh= +giola= +endif + + +libgsf_1_la_LIBADD = $(LIBGSF_LIBS) $(Z_LIBS) $(BZ2_LIBS) $(giola) +libgsf_1_la_LDFLAGS = -version-info $(VERSION_INFO) +if WITH_WIN32 + libgsf_1_la_DEPENDENCIES = lib.def + libgsf_1_la_LDFLAGS += -no-undefined -export-symbols lib.def +endif + +libgsf_1_la_SOURCES = \ + gsf-utils.c \ + gsf-libxml.c \ + gsf-doc-meta-data.c \ + gsf-docprop-vector.c \ + gsf-msole-impl.h \ + gsf-msole-utils.c \ + gsf-open-pkg-utils.c \ + gsf-opendoc-utils.c \ + gsf-timestamp.c \ + gsf-zip-impl.h \ + gsf-zip-utils.c \ + \ + gsf-input.c \ + gsf-input-bzip.c \ + gsf-input-gzip.c \ + gsf-input-http.c \ + gsf-input-iochannel.c \ + gsf-input-memory.c \ + gsf-input-proxy.c \ + gsf-input-stdio.c \ + gsf-input-textline.c \ + \ + gsf-infile.c \ + gsf-infile-msole.c \ + gsf-infile-msvba.c \ + gsf-infile-stdio.c \ + gsf-infile-tar.c \ + gsf-infile-zip.c \ + \ + gsf-output.c \ + gsf-output-bzip.c \ + gsf-output-csv.c \ + gsf-output-gzip.c \ + gsf-output-iconv.c \ + gsf-output-iochannel.c \ + gsf-output-memory.c \ + gsf-output-stdio.c \ + \ + gsf-outfile.c \ + gsf-outfile-msole.c \ + gsf-outfile-stdio.c \ + gsf-outfile-zip.c \ + \ + gsf-shared-memory.c \ + gsf-structured-blob.c \ + gsf-blob.c \ + gsf-clip-data.c \ + \ + $(gioc) \ + version.c +# gsf-output-transaction.c \ +# gsf-command-context.c \ +# gsf-io-context.c + +libgsf_1_includedir = $(includedir)/libgsf-1/gsf +libgsf_1_include_HEADERS = \ + gsf.h \ + gsf-utils.h \ + gsf-libxml.h \ + gsf-impl-utils.h \ + gsf-doc-meta-data.h \ + gsf-docprop-vector.h \ + gsf-msole-utils.h \ + gsf-open-pkg-utils.h \ + gsf-opendoc-utils.h \ + gsf-timestamp.h \ + \ + gsf-input.h \ + gsf-input-impl.h \ + gsf-input-bzip.h \ + gsf-input-gzip.h \ + gsf-input-http.h \ + gsf-input-iochannel.h \ + gsf-input-memory.h \ + gsf-input-proxy.h \ + gsf-input-stdio.h \ + gsf-input-textline.h \ + \ + gsf-infile.h \ + gsf-infile-impl.h \ + gsf-infile-msole.h \ + gsf-infile-msvba.h \ + gsf-infile-stdio.h \ + gsf-infile-tar.h \ + gsf-infile-zip.h \ + \ + gsf-output.h \ + gsf-output-impl.h \ + gsf-output-bzip.h \ + gsf-output-csv.h \ + gsf-output-gzip.h \ + gsf-output-iconv.h \ + gsf-output-iochannel.h \ + gsf-output-memory.h \ + gsf-output-stdio.h \ + \ + gsf-outfile.h \ + gsf-outfile-impl.h \ + gsf-outfile-msole.h \ + gsf-outfile-stdio.h \ + gsf-outfile-zip.h \ + \ + gsf-shared-memory.h \ + gsf-structured-blob.h \ + gsf-meta-names.h \ + gsf-blob.h \ + gsf-clip-data.h \ + \ + $(gioh) +# gsf-command-context.h \ +# gsf-io-context.h + +include $(top_srcdir)/gsf.mk +CPP_CFLAGS = -DGLIB_CHECK_VERSION\(x,y,z\) +LIB_PUBLIC_HDRS = $(libgsf_1_include_HEADERS) + +if HAVE_LIBEXE +gsf_mslibdir = $(DESTDIR)$(libdir) +gsf_mslib_DATA = gsf-1.lib + +gsf-1.lib: libgsf-1.la lib.def + lib -name:libgsf-1-$(CURRENT_MINUS_AGE).dll -def:lib.def -out:$@ + +CLEANFILES = gsf-1.exp gsf-1.lib +endif + diff --git a/gsf/Makefile.in b/gsf/Makefile.in new file mode 100644 index 0000000..ccb90ae --- /dev/null +++ b/gsf/Makefile.in @@ -0,0 +1,916 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@WITH_WIN32_FALSE@libgsf_1_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@WITH_WIN32_FALSE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@WITH_WIN32_FALSE@ $(am__DEPENDENCIES_2) +@WITH_WIN32_TRUE@am__append_1 = -no-undefined -export-symbols lib.def +DIST_COMMON = $(am__libgsf_1_include_HEADERS_DIST) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/version.c.in $(top_srcdir)/gsf.mk +subdir = gsf +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/gsf-config.h +CONFIG_CLEAN_FILES = version.c +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(gsf_mslibdir)" \ + "$(DESTDIR)$(libgsf_1_includedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +am__DEPENDENCIES_1 = +@WITH_GIO_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) +am__libgsf_1_la_SOURCES_DIST = gsf-utils.c gsf-libxml.c \ + gsf-doc-meta-data.c gsf-docprop-vector.c gsf-msole-impl.h \ + gsf-msole-utils.c gsf-open-pkg-utils.c gsf-opendoc-utils.c \ + gsf-timestamp.c gsf-zip-impl.h gsf-zip-utils.c gsf-input.c \ + gsf-input-bzip.c gsf-input-gzip.c gsf-input-http.c \ + gsf-input-iochannel.c gsf-input-memory.c gsf-input-proxy.c \ + gsf-input-stdio.c gsf-input-textline.c gsf-infile.c \ + gsf-infile-msole.c gsf-infile-msvba.c gsf-infile-stdio.c \ + gsf-infile-tar.c gsf-infile-zip.c gsf-output.c \ + gsf-output-bzip.c gsf-output-csv.c gsf-output-gzip.c \ + gsf-output-iconv.c gsf-output-iochannel.c gsf-output-memory.c \ + gsf-output-stdio.c gsf-outfile.c gsf-outfile-msole.c \ + gsf-outfile-stdio.c gsf-outfile-zip.c gsf-shared-memory.c \ + gsf-structured-blob.c gsf-blob.c gsf-clip-data.c \ + gsf-input-gio.c gsf-output-gio.c version.c +@WITH_GIO_TRUE@am__objects_1 = gsf-input-gio.lo gsf-output-gio.lo +am_libgsf_1_la_OBJECTS = gsf-utils.lo gsf-libxml.lo \ + gsf-doc-meta-data.lo gsf-docprop-vector.lo gsf-msole-utils.lo \ + gsf-open-pkg-utils.lo gsf-opendoc-utils.lo gsf-timestamp.lo \ + gsf-zip-utils.lo gsf-input.lo gsf-input-bzip.lo \ + gsf-input-gzip.lo gsf-input-http.lo gsf-input-iochannel.lo \ + gsf-input-memory.lo gsf-input-proxy.lo gsf-input-stdio.lo \ + gsf-input-textline.lo gsf-infile.lo gsf-infile-msole.lo \ + gsf-infile-msvba.lo gsf-infile-stdio.lo gsf-infile-tar.lo \ + gsf-infile-zip.lo gsf-output.lo gsf-output-bzip.lo \ + gsf-output-csv.lo gsf-output-gzip.lo gsf-output-iconv.lo \ + gsf-output-iochannel.lo gsf-output-memory.lo \ + gsf-output-stdio.lo gsf-outfile.lo gsf-outfile-msole.lo \ + gsf-outfile-stdio.lo gsf-outfile-zip.lo gsf-shared-memory.lo \ + gsf-structured-blob.lo gsf-blob.lo gsf-clip-data.lo \ + $(am__objects_1) version.lo +libgsf_1_la_OBJECTS = $(am_libgsf_1_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +libgsf_1_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libgsf_1_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libgsf_1_la_SOURCES) +DIST_SOURCES = $(am__libgsf_1_la_SOURCES_DIST) +DATA = $(gsf_mslib_DATA) $(noinst_DATA) +am__libgsf_1_include_HEADERS_DIST = gsf.h gsf-utils.h gsf-libxml.h \ + gsf-impl-utils.h gsf-doc-meta-data.h gsf-docprop-vector.h \ + gsf-msole-utils.h gsf-open-pkg-utils.h gsf-opendoc-utils.h \ + gsf-timestamp.h gsf-input.h gsf-input-impl.h gsf-input-bzip.h \ + gsf-input-gzip.h gsf-input-http.h gsf-input-iochannel.h \ + gsf-input-memory.h gsf-input-proxy.h gsf-input-stdio.h \ + gsf-input-textline.h gsf-infile.h gsf-infile-impl.h \ + gsf-infile-msole.h gsf-infile-msvba.h gsf-infile-stdio.h \ + gsf-infile-tar.h gsf-infile-zip.h gsf-output.h \ + gsf-output-impl.h gsf-output-bzip.h gsf-output-csv.h \ + gsf-output-gzip.h gsf-output-iconv.h gsf-output-iochannel.h \ + gsf-output-memory.h gsf-output-stdio.h gsf-outfile.h \ + gsf-outfile-impl.h gsf-outfile-msole.h gsf-outfile-stdio.h \ + gsf-outfile-zip.h gsf-shared-memory.h gsf-structured-blob.h \ + gsf-meta-names.h gsf-blob.h gsf-clip-data.h gsf-input-gio.h \ + gsf-output-gio.h +HEADERS = $(libgsf_1_include_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BONOBO_REQ = @BONOBO_REQ@ +BZ2_LIBS = @BZ2_LIBS@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURRENT_MINUS_AGE = @CURRENT_MINUS_AGE@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ +GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GNOMEVFS_REQ = @GNOMEVFS_REQ@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEXE = @LIBEXE@ +LIBGSF_BONOBO_CFLAGS = @LIBGSF_BONOBO_CFLAGS@ +LIBGSF_BONOBO_LIBS = @LIBGSF_BONOBO_LIBS@ +LIBGSF_CFLAGS = @LIBGSF_CFLAGS@ +LIBGSF_GIO_CFLAGS = @LIBGSF_GIO_CFLAGS@ +LIBGSF_GIO_LIBS = @LIBGSF_GIO_LIBS@ +LIBGSF_GNOME_CFLAGS = @LIBGSF_GNOME_CFLAGS@ +LIBGSF_GNOME_LIBS = @LIBGSF_GNOME_LIBS@ +LIBGSF_LIBS = @LIBGSF_LIBS@ +LIBGSF_MAJOR_VERSION = @LIBGSF_MAJOR_VERSION@ +LIBGSF_MICRO_VERSION = @LIBGSF_MICRO_VERSION@ +LIBGSF_MINOR_VERSION = @LIBGSF_MINOR_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +PYGTK_CFLAGS = @PYGTK_CFLAGS@ +PYGTK_CODEGEN = @PYGTK_CODEGEN@ +PYGTK_LIBS = @PYGTK_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +WARN_CFLAGS = @WARN_CFLAGS@ +WINDRES = @WINDRES@ +XGETTEXT = @XGETTEXT@ +Z_CPPFLAGS = @Z_CPPFLAGS@ +Z_LIBS = @Z_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CPPFLAGS = -I$(top_srcdir) $(LIBGSF_CFLAGS) $(Z_CPPFLAGS) $(LIBGSF_GIO_CFLAGS) \ + -DGNOMELOCALEDIR=\"$(datadir)/locale\" + +lib_LTLIBRARIES = libgsf-1.la +@WITH_GIO_FALSE@gioc = +@WITH_GIO_TRUE@gioc = gsf-input-gio.c gsf-output-gio.c +@WITH_GIO_FALSE@gioh = +@WITH_GIO_TRUE@gioh = gsf-input-gio.h gsf-output-gio.h +@WITH_GIO_FALSE@giola = +@WITH_GIO_TRUE@giola = $(LIBGSF_GIO_LIBS) +libgsf_1_la_LIBADD = $(LIBGSF_LIBS) $(Z_LIBS) $(BZ2_LIBS) $(giola) +libgsf_1_la_LDFLAGS = -version-info $(VERSION_INFO) $(am__append_1) +@WITH_WIN32_TRUE@libgsf_1_la_DEPENDENCIES = lib.def +libgsf_1_la_SOURCES = \ + gsf-utils.c \ + gsf-libxml.c \ + gsf-doc-meta-data.c \ + gsf-docprop-vector.c \ + gsf-msole-impl.h \ + gsf-msole-utils.c \ + gsf-open-pkg-utils.c \ + gsf-opendoc-utils.c \ + gsf-timestamp.c \ + gsf-zip-impl.h \ + gsf-zip-utils.c \ + \ + gsf-input.c \ + gsf-input-bzip.c \ + gsf-input-gzip.c \ + gsf-input-http.c \ + gsf-input-iochannel.c \ + gsf-input-memory.c \ + gsf-input-proxy.c \ + gsf-input-stdio.c \ + gsf-input-textline.c \ + \ + gsf-infile.c \ + gsf-infile-msole.c \ + gsf-infile-msvba.c \ + gsf-infile-stdio.c \ + gsf-infile-tar.c \ + gsf-infile-zip.c \ + \ + gsf-output.c \ + gsf-output-bzip.c \ + gsf-output-csv.c \ + gsf-output-gzip.c \ + gsf-output-iconv.c \ + gsf-output-iochannel.c \ + gsf-output-memory.c \ + gsf-output-stdio.c \ + \ + gsf-outfile.c \ + gsf-outfile-msole.c \ + gsf-outfile-stdio.c \ + gsf-outfile-zip.c \ + \ + gsf-shared-memory.c \ + gsf-structured-blob.c \ + gsf-blob.c \ + gsf-clip-data.c \ + \ + $(gioc) \ + version.c + +# gsf-output-transaction.c \ +# gsf-command-context.c \ +# gsf-io-context.c +libgsf_1_includedir = $(includedir)/libgsf-1/gsf +libgsf_1_include_HEADERS = \ + gsf.h \ + gsf-utils.h \ + gsf-libxml.h \ + gsf-impl-utils.h \ + gsf-doc-meta-data.h \ + gsf-docprop-vector.h \ + gsf-msole-utils.h \ + gsf-open-pkg-utils.h \ + gsf-opendoc-utils.h \ + gsf-timestamp.h \ + \ + gsf-input.h \ + gsf-input-impl.h \ + gsf-input-bzip.h \ + gsf-input-gzip.h \ + gsf-input-http.h \ + gsf-input-iochannel.h \ + gsf-input-memory.h \ + gsf-input-proxy.h \ + gsf-input-stdio.h \ + gsf-input-textline.h \ + \ + gsf-infile.h \ + gsf-infile-impl.h \ + gsf-infile-msole.h \ + gsf-infile-msvba.h \ + gsf-infile-stdio.h \ + gsf-infile-tar.h \ + gsf-infile-zip.h \ + \ + gsf-output.h \ + gsf-output-impl.h \ + gsf-output-bzip.h \ + gsf-output-csv.h \ + gsf-output-gzip.h \ + gsf-output-iconv.h \ + gsf-output-iochannel.h \ + gsf-output-memory.h \ + gsf-output-stdio.h \ + \ + gsf-outfile.h \ + gsf-outfile-impl.h \ + gsf-outfile-msole.h \ + gsf-outfile-stdio.h \ + gsf-outfile-zip.h \ + \ + gsf-shared-memory.h \ + gsf-structured-blob.h \ + gsf-meta-names.h \ + gsf-blob.h \ + gsf-clip-data.h \ + \ + $(gioh) + +@WITH_WIN32_TRUE@noinst_DATA = lib.def +@HAVE_LIBEXE_TRUE@CLEANFILES = gsf-1.exp gsf-1.lib +@WITH_WIN32_TRUE@CLEANFILES = lib.def stamp-lib.def +# gsf-command-context.h \ +# gsf-io-context.h +CPP_CFLAGS = -DGLIB_CHECK_VERSION\(x,y,z\) +LIB_PUBLIC_HDRS = $(libgsf_1_include_HEADERS) +@HAVE_LIBEXE_TRUE@gsf_mslibdir = $(DESTDIR)$(libdir) +@HAVE_LIBEXE_TRUE@gsf_mslib_DATA = gsf-1.lib +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gsf.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gsf/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu gsf/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +version.c: $(top_builddir)/config.status $(srcdir)/version.c.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; 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 +libgsf-1.la: $(libgsf_1_la_OBJECTS) $(libgsf_1_la_DEPENDENCIES) + $(AM_V_CCLD)$(libgsf_1_la_LINK) -rpath $(libdir) $(libgsf_1_la_OBJECTS) $(libgsf_1_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-blob.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-clip-data.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-doc-meta-data.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-docprop-vector.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-infile-msole.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-infile-msvba.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-infile-stdio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-infile-tar.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-infile-zip.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-infile.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-input-bzip.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-input-gio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-input-gzip.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-input-http.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-input-iochannel.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-input-memory.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-input-proxy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-input-stdio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-input-textline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-input.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-libxml.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-msole-utils.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-open-pkg-utils.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-opendoc-utils.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-outfile-msole.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-outfile-stdio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-outfile-zip.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-outfile.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-output-bzip.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-output-csv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-output-gio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-output-gzip.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-output-iconv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-output-iochannel.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-output-memory.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-output-stdio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-output.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-shared-memory.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-structured-blob.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-timestamp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-utils.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-zip-utils.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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 +install-gsf_mslibDATA: $(gsf_mslib_DATA) + @$(NORMAL_INSTALL) + test -z "$(gsf_mslibdir)" || $(MKDIR_P) "$(DESTDIR)$(gsf_mslibdir)" + @list='$(gsf_mslib_DATA)'; test -n "$(gsf_mslibdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gsf_mslibdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(gsf_mslibdir)" || exit $$?; \ + done + +uninstall-gsf_mslibDATA: + @$(NORMAL_UNINSTALL) + @list='$(gsf_mslib_DATA)'; test -n "$(gsf_mslibdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(gsf_mslibdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(gsf_mslibdir)" && rm -f $$files +install-libgsf_1_includeHEADERS: $(libgsf_1_include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(libgsf_1_includedir)" || $(MKDIR_P) "$(DESTDIR)$(libgsf_1_includedir)" + @list='$(libgsf_1_include_HEADERS)'; test -n "$(libgsf_1_includedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libgsf_1_includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(libgsf_1_includedir)" || exit $$?; \ + done + +uninstall-libgsf_1_includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(libgsf_1_include_HEADERS)'; test -n "$(libgsf_1_includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(libgsf_1_includedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(libgsf_1_includedir)" && rm -f $$files + +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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + 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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + 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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(gsf_mslibdir)" "$(DESTDIR)$(libgsf_1_includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(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 . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-gsf_mslibDATA install-libgsf_1_includeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-gsf_mslibDATA uninstall-libLTLIBRARIES \ + uninstall-libgsf_1_includeHEADERS + +.MAKE: install-am install-strip + +.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-dvi \ + install-dvi-am install-exec install-exec-am \ + install-gsf_mslibDATA install-html install-html-am \ + install-info install-info-am install-libLTLIBRARIES \ + install-libgsf_1_includeHEADERS install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-gsf_mslibDATA \ + uninstall-libLTLIBRARIES uninstall-libgsf_1_includeHEADERS + + +@WITH_WIN32_TRUE@lib.def: stamp-lib.def +@WITH_WIN32_TRUE@ @true + +@WITH_WIN32_TRUE@stamp-lib.def: $(LIB_PUBLIC_HDRS) Makefile $(top_srcdir)/dumpdef.pl +@WITH_WIN32_TRUE@ hdrs='$(LIB_PUBLIC_HDRS)'; \ +@WITH_WIN32_TRUE@ hdrs_list=''; \ +@WITH_WIN32_TRUE@ for hdr in $$hdrs; do \ +@WITH_WIN32_TRUE@ if test -f $(srcdir)/$$hdr; then \ +@WITH_WIN32_TRUE@ hdrs_list="$$hdrs_list $(srcdir)/$$hdr"; \ +@WITH_WIN32_TRUE@ else \ +@WITH_WIN32_TRUE@ hdrs_list="$$hdrs_list $$hdr"; \ +@WITH_WIN32_TRUE@ fi; \ +@WITH_WIN32_TRUE@ done; \ +@WITH_WIN32_TRUE@ cat $(top_builddir)/gsf-config.h $$hdrs_list | \ +@WITH_WIN32_TRUE@ sed -e 's/^#[ \t]*include[ \t]\+.*$$//g' | \ +@WITH_WIN32_TRUE@ $(CPP) $(AM_CPPFLAGS) $(CPP_CFLAGS) -P - > xgen-libdef.1 && \ +@WITH_WIN32_TRUE@ echo EXPORTS> xgen-libdef.2 && \ +@WITH_WIN32_TRUE@ perl $(top_srcdir)/dumpdef.pl \ +@WITH_WIN32_TRUE@ xgen-libdef.1 >> xgen-libdef.2 \ +@WITH_WIN32_TRUE@ && (cmp -s xgen-libdef.2 lib.def || \ +@WITH_WIN32_TRUE@ cp xgen-libdef.2 lib.def) \ +@WITH_WIN32_TRUE@ && rm -f xgen-libdef.1 xgen-libdef.2 \ +@WITH_WIN32_TRUE@ && echo timestamp > $@ + +@HAVE_LIBEXE_TRUE@gsf-1.lib: libgsf-1.la lib.def +@HAVE_LIBEXE_TRUE@ lib -name:libgsf-1-$(CURRENT_MINUS_AGE).dll -def:lib.def -out:$@ + +# 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/gsf/gsf-blob.c b/gsf/gsf-blob.c new file mode 100644 index 0000000..66b88ab --- /dev/null +++ b/gsf/gsf-blob.c @@ -0,0 +1,171 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-blob.c: a chunk of data + * + * Copyright (C) 2006 Novell Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "gsf-config.h" +#include "gsf-blob.h" + +#include "gsf-utils.h" +#include "gsf-impl-utils.h" + +#include +#include + +/* Private part of the GsfBlob structure */ +struct _GsfBlobPrivate { + gsize size; + gpointer data; +}; + +static GObjectClass *gsf_blob_parent_class; +static void +gsf_blob_finalize (GObject *object) +{ + GsfBlob *blob; + GsfBlobPrivate *priv; + + blob = GSF_BLOB (object); + priv = blob->priv; + + g_free (priv->data); + g_free (priv); + + gsf_blob_parent_class->finalize (object); +} + +static void +gsf_blob_class_init (GObjectClass *gobject_class) +{ + gobject_class->finalize = gsf_blob_finalize; + + gsf_blob_parent_class = g_type_class_peek_parent (gobject_class); +} + +static void +gsf_blob_init (GsfBlob *blob) +{ + GsfBlobPrivate *priv; + + priv = g_new0 (GsfBlobPrivate, 1); + blob->priv = priv; +} + +GSF_CLASS (GsfBlob, gsf_blob, + gsf_blob_class_init, gsf_blob_init, + G_TYPE_OBJECT); + + +/** + * gsf_blob_new: + * @size: Size of the data in bytes. + * @data_to_copy: Data which will be copied into the blob, or %NULL if @size is zero. + * @error: location to store error, or %NULL. + * + * Creates a new #GsfBlob object to hold the specified data. The blob can then + * be used as a facility for reference-counting for the data. The data is + * copied internally, so the blob does not hold references to external chunks + * of memory. + * + * Return value: A newly-created #GsfBlob, or %NULL if the data could not be copied. + * + * Error domain: #GSF_ERROR + * + * Possible errors: #GSF_ERROR_OUT_OF_MEMORY if the @data_to_copy could not be copied. + **/ +GsfBlob * +gsf_blob_new (gsize size, gconstpointer data_to_copy, GError **error) +{ + GsfBlob *blob; + GsfBlobPrivate *priv; + gpointer data; + + g_return_val_if_fail ((size > 0 && data_to_copy != NULL) || (size == 0 && data_to_copy == NULL), NULL); + g_return_val_if_fail (error == NULL || *error == NULL, NULL); + + if (data_to_copy) { + data = g_try_malloc (size); + if (!data) { + gchar *size_str; + + size_str = g_strdup_printf ("%" G_GSIZE_FORMAT, size); + g_set_error (error, + GSF_ERROR, + GSF_ERROR_OUT_OF_MEMORY, + _("Not enough memory to copy %s bytes of data"), + size_str); + g_free (size_str); + return NULL; + } + + memcpy (data, data_to_copy, size); + } else + data = NULL; + + blob = g_object_new (GSF_TYPE_BLOB, NULL); + if (G_UNLIKELY (NULL == blob)) return NULL; + + priv = blob->priv; + + priv->size = size; + priv->data = data; + + return blob; +} + +/** + * gsf_blob_get_size: + * @blob: A #GsfBlob. + * + * Queries the size in bytes of the data stored in the blob. + * + * Return value: Size in bytes, or 0 if the data is %NULL. + **/ +gsize +gsf_blob_get_size (GsfBlob const *blob) +{ + GsfBlobPrivate *priv; + + g_return_val_if_fail (GSF_IS_BLOB (blob), 0); + + priv = blob->priv; + return priv->size; +} + +/** + * gsf_blob_peek_data: + * @blob: A #GsfBlob. + * + * Queries a pointer to the data stored in the blob. This does not copy the data + * for you; it returns a pointer to the actual buffer which the blob uses internally, + * so you should not free this buffer on your own. + * + * Return value: Pointer to the data stored in the blob, or %NULL if the size + * of the data is zero. + **/ +gconstpointer +gsf_blob_peek_data (GsfBlob const *blob) +{ + GsfBlobPrivate *priv; + + g_return_val_if_fail (GSF_IS_BLOB (blob), NULL); + + priv = blob->priv; + return priv->data; +} diff --git a/gsf/gsf-blob.h b/gsf/gsf-blob.h new file mode 100644 index 0000000..b278928 --- /dev/null +++ b/gsf/gsf-blob.h @@ -0,0 +1,45 @@ +#ifndef GSF_BLOB_H +#define GSF_BLOB_H + +#include +#include + +G_BEGIN_DECLS + +#define GSF_BLOB_TYPE (gsf_blob_get_type ()) +#define GSF_BLOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSF_BLOB_TYPE, GsfBlob)) +#define GSF_BLOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSF_BLOB_TYPE, GsfBlobClass)) +#define GSF_IS_BLOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSF_BLOB_TYPE)) +#define GSF_IS_BLOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSF_BLOB_TYPE)) +#define GSF_BLOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSF_BLOB_TYPE, GsfBlobClass)) + +/* Deprecated old typo */ +#define GSF_TYPE_BLOB (gsf_blob_get_type ()) + +typedef struct _GsfBlob GsfBlob; +typedef struct _GsfBlobClass GsfBlobClass; +typedef struct _GsfBlobPrivate GsfBlobPrivate; + +struct _GsfBlob { + GObject object; + GsfBlobPrivate *priv; +}; + +struct _GsfBlobClass { + GObjectClass parent_class; +}; + +GType gsf_blob_get_type (void) G_GNUC_CONST; +/* void gsf_blob_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfBlob *gsf_blob_new (gsize size, + gconstpointer data_to_copy, + GError **error); + +gsize gsf_blob_get_size (GsfBlob const *blob); + +gconstpointer gsf_blob_peek_data (GsfBlob const *blob); + +G_END_DECLS + +#endif diff --git a/gsf/gsf-clip-data.c b/gsf/gsf-clip-data.c new file mode 100644 index 0000000..bd7f8ad --- /dev/null +++ b/gsf/gsf-clip-data.c @@ -0,0 +1,329 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-clip-data.c: clipboard data + * + * Copyright (C) 2006 Novell Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include "gsf-config.h" +#include +#include "gsf-clip-data.h" +#include "gsf-utils.h" +#include "gsf-impl-utils.h" + +/* Private part of the GsfClipData structure */ +struct _GsfClipDataPrivate { + GsfClipFormat format; + GsfBlob *data_blob; +}; + +static GObjectClass *gsf_clip_data_parent_class; +static void +gsf_clip_data_finalize (GObject *object) +{ + GsfClipData *clip_data; + GsfClipDataPrivate *priv; + + clip_data = GSF_CLIP_DATA (object); + priv = clip_data->priv; + + if (priv->data_blob) + g_object_unref (priv->data_blob); + + g_free (priv); + + gsf_clip_data_parent_class->finalize (object); +} + +static void +gsf_clip_data_init (GsfClipData *clip_data) +{ + GsfClipDataPrivate *priv; + + priv = g_new0 (GsfClipDataPrivate, 1); + clip_data->priv = priv; +} +static void +gsf_clip_data_class_init (GObjectClass *gobject_class) +{ + gobject_class->finalize = gsf_clip_data_finalize; + + gsf_clip_data_parent_class = g_type_class_peek_parent (gobject_class); +} + + +GSF_CLASS (GsfClipData, gsf_clip_data, + gsf_clip_data_class_init, gsf_clip_data_init, + G_TYPE_OBJECT); + +/** + * gsf_clip_data_new: + * @format: Format for the data inside the @data_blob + * @data_blob: Object which holds the binary contents for the #GsfClipData + * + * Creates a new #GsfClipData object. This function acquires a reference to the + * @data_blob, so you should unref the blob on your own if you no longer need it + * directly. + * + * Return value: A newly-created #GsfClipData. + **/ +GsfClipData * +gsf_clip_data_new (GsfClipFormat format, GsfBlob *data_blob) +{ + GsfClipData *clip_data; + GsfClipDataPrivate *priv; + + g_return_val_if_fail (GSF_IS_BLOB (data_blob), NULL); + + clip_data = g_object_new (GSF_TYPE_CLIP_DATA, NULL); + if (G_UNLIKELY (NULL == clip_data)) return NULL; + + priv = clip_data->priv; + + priv->format = format; + priv->data_blob = g_object_ref (data_blob); + + return clip_data; +} + +/** + * gsf_clip_data_get_format: + * @clip_data: A #GsfClipData. + * + * Queries the clipboard data format of a #GsfClipData. The format refers to the data + * blob inside the @clip_data; use gsf_clip_data_get_data_blob() to get that data blob. + * + * Return value: The format in which the #GsfClipData's data blob is stored. + **/ +GsfClipFormat +gsf_clip_data_get_format (GsfClipData *clip_data) +{ + GsfClipDataPrivate *priv; + + g_return_val_if_fail (GSF_IS_CLIP_DATA (clip_data), GSF_CLIP_FORMAT_UNKNOWN); + + priv = clip_data->priv; + return priv->format; +} + +/** + * gsf_clip_data_get_data_blob: + * @clip_data: A #GsfClipData. + * + * Queries the data blob that actually stores a #GsfClipData's binary data. + * + * Return value: A new reference to the #GsfBlob that stores this @clip_data's + * binary data. You must use g_object_unref() to dispose of that data blob when + * you are done with it. + **/ +GsfBlob * +gsf_clip_data_get_data_blob (GsfClipData *clip_data) +{ + GsfClipDataPrivate *priv; + + g_return_val_if_fail (GSF_IS_CLIP_DATA (clip_data), NULL); + + priv = clip_data->priv; + return g_object_ref (priv->data_blob); +} + +static void +set_error_missing_clipboard_data (GError **error, const char *format_name, gsize at_least_size) +{ + gchar *size_str; + + size_str = g_strdup_printf ("%" G_GSIZE_FORMAT, at_least_size); + g_set_error (error, + GSF_ERROR, + GSF_ERROR_INVALID_DATA, + _("The clip_data is in %s, but it is smaller than " + "at least %s bytes"), + format_name, + size_str); + g_free (size_str); +} + +static gsize +get_windows_clipboard_data_offset (GsfClipFormatWindows format) +{ + struct format_offset_pair { + GsfClipFormatWindows format; + gsize offset; + }; + + static const struct format_offset_pair pairs[] = { + { GSF_CLIP_FORMAT_WINDOWS_UNKNOWN, 4 }, + { GSF_CLIP_FORMAT_WINDOWS_METAFILE, 12 }, + { GSF_CLIP_FORMAT_WINDOWS_DIB, 4 }, + { GSF_CLIP_FORMAT_WINDOWS_ENHANCED_METAFILE, 4 } /* FIXME: does this have a PACKEDMETA in front + * as well, similar to GSF_CLIP_FORMAT_WINDOWS_METAFILE? */ + }; + static const int num_pairs = G_N_ELEMENTS (pairs); + + int i; + + for (i = 0; i < num_pairs; i++) + if (pairs[i].format == format) + return pairs[i].offset; + + g_assert_not_reached (); + return 0; +} + +/** + * check_format_windows: + * @format : #GsfClipFormatWindows + * @format_name : const char * + * @blob_size : #gsize + * @error :#GError + * + * Checks that the specified blob size matches the expected size for the format. + * + * Returns: the same format if the size is correct, or + * GSF_CLIP_FORMAT_WINDOWS_ERROR if the size is too small. + **/ +static GsfClipFormatWindows +check_format_windows (GsfClipFormatWindows format, const char *format_name, gsize blob_size, GError **error) +{ + gsize offset; + + offset = get_windows_clipboard_data_offset (format); + if (blob_size <= offset) { + set_error_missing_clipboard_data (error, format_name, offset + 1); + format = GSF_CLIP_FORMAT_WINDOWS_ERROR; + } + + return format; +} + +/** + * gsf_clip_data_get_windows_clipboard_format: + * @clip_data: A #GsfClipData. + * @error: Location to store error, or %NULL + * + * Queries the Windows clipboard data format for a #GsfClipData. The @clip_data must + * have been created with #GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD. + * + * Returns: A #GsfClipFormatWindows value. + * + * Possible errors: #GSF_ERROR_INVALID_DATA if the data blob in the @clip_data is + * smaller than it should be; in this case GSF_CLIP_FORMAT_WINDOWS_ERROR will be returned. + **/ +GsfClipFormatWindows +gsf_clip_data_get_windows_clipboard_format (GsfClipData *clip_data, GError **error) +{ + GsfClipDataPrivate *priv; + gsize size; + guint32 value; + gconstpointer data; + GsfClipFormatWindows format; + + g_return_val_if_fail (GSF_IS_CLIP_DATA (clip_data), GSF_CLIP_FORMAT_WINDOWS_ERROR); + g_return_val_if_fail (error == NULL || *error == NULL, GSF_CLIP_FORMAT_WINDOWS_ERROR); + + priv = clip_data->priv; + g_return_val_if_fail (priv->format == GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD, GSF_CLIP_FORMAT_WINDOWS_ERROR); + + size = gsf_blob_get_size (priv->data_blob); + + if (size < 4) { + g_set_error (error, + GSF_ERROR, + GSF_ERROR_INVALID_DATA, + _("The clip_data is in Windows clipboard format, but it is smaller than " + "the required 4 bytes.")); + return GSF_CLIP_FORMAT_WINDOWS_ERROR; + } + + data = gsf_blob_peek_data (priv->data_blob); + + value = GSF_LE_GET_GUINT32 (data); + + switch (value) { + case GSF_CLIP_FORMAT_WINDOWS_METAFILE: + format = check_format_windows (GSF_CLIP_FORMAT_WINDOWS_METAFILE, _("Windows Metafile format"), + size, error); + break; + + case GSF_CLIP_FORMAT_WINDOWS_DIB: + case 2: /* CF_BITMAP */ + format = check_format_windows (GSF_CLIP_FORMAT_WINDOWS_DIB, _("Windows DIB or BITMAP format"), + size, error); + break; + + case GSF_CLIP_FORMAT_WINDOWS_ENHANCED_METAFILE: + format = check_format_windows (GSF_CLIP_FORMAT_WINDOWS_ENHANCED_METAFILE, _("Windows Enhanced Metafile format"), + size, error); + break; + + default: + format = GSF_CLIP_FORMAT_WINDOWS_UNKNOWN; + break; + } + + return format; +} + +/** + * gsf_clip_data_peek_real_data: + * @clip_data: A #GsfClipData. + * @ret_size: Location to return the size of the returned data buffer. + * @error: Location to store error, or %NULL. + * + * Queries a pointer directly to the clipboard data of a #GsfClipData. The + * resulting pointer is not necessarily the same data pointer that was passed to + * gsf_blob_new() prior to creating the @clip_data. For example, if the data is + * in #GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD format, then it will have extra header + * bytes in front of the actual metafile data. This function will skip over + * those header bytes if necessary and return a pointer to the "real" data. + * + * Return value: Pointer to the real clipboard data. The size in bytes of this + * buffer is returned in the @ret_size argument. + **/ +gconstpointer +gsf_clip_data_peek_real_data (GsfClipData *clip_data, gsize *ret_size, GError **error) +{ + GsfClipDataPrivate *priv; + gconstpointer data; + gsize offset; + + g_return_val_if_fail (GSF_IS_CLIP_DATA (clip_data), NULL); + g_return_val_if_fail (ret_size != NULL, NULL); + g_return_val_if_fail (error == NULL || *error == NULL, NULL); + + priv = clip_data->priv; + + data = gsf_blob_peek_data (priv->data_blob); + + if (priv->format == GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD) { + GsfClipFormatWindows win_format; + + win_format = gsf_clip_data_get_windows_clipboard_format (clip_data, error); + if (win_format == GSF_CLIP_FORMAT_WINDOWS_ERROR) + return NULL; + + /* gsf_clip_data_get_windows_clipboard_format() already did the size checks for us, + * so we can jump to the offset right away without doing extra checks. + */ + + offset = get_windows_clipboard_data_offset (win_format); + } else + offset = 0; + + *ret_size = gsf_blob_get_size (priv->data_blob) - offset; + return (char *) data + offset; /* cast to avoid warning about void pointer arithmetic */ +} diff --git a/gsf/gsf-clip-data.h b/gsf/gsf-clip-data.h new file mode 100644 index 0000000..5a90794 --- /dev/null +++ b/gsf/gsf-clip-data.h @@ -0,0 +1,76 @@ +#ifndef GSF_CLIP_DATA_H +#define GSF_CLIP_DATA_H + +#include + +G_BEGIN_DECLS + +/** + * GsfClipFormat: + * @GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD: Windows clipboard format + * @GSF_CLIP_FORMAT_MACINTOSH_CLIPBOARD: Macintosh clipboard format + * @GSF_CLIP_FORMAT_GUID: GUID that contains a format identifier + * @GSF_CLIP_FORMAT_NO_DATA: No clipboard data + * @GSF_CLIP_FORMAT_CLIPBOARD_FORMAT_NAME: Custom clipboard format + * @GSF_CLIP_FORMAT_UNKNOWN: Unknown clipboard type or invalid data + */ + +typedef enum { + GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD = -1, + GSF_CLIP_FORMAT_MACINTOSH_CLIPBOARD = -2, + GSF_CLIP_FORMAT_GUID = -3, + GSF_CLIP_FORMAT_NO_DATA = 0, + GSF_CLIP_FORMAT_CLIPBOARD_FORMAT_NAME = 1, /* in the file it's actually any positive integer */ + GSF_CLIP_FORMAT_UNKNOWN /* this is our own value for unknown types or invalid data */ +} GsfClipFormat; + +typedef enum { + GSF_CLIP_FORMAT_WINDOWS_ERROR = -1, /* our own value */ + GSF_CLIP_FORMAT_WINDOWS_UNKNOWN = -2, /* our own value */ + GSF_CLIP_FORMAT_WINDOWS_METAFILE = 3, /* CF_METAFILEPICT */ + GSF_CLIP_FORMAT_WINDOWS_DIB = 8, /* CF_DIB */ + GSF_CLIP_FORMAT_WINDOWS_ENHANCED_METAFILE = 14 /* CF_ENHMETAFILE */ +} GsfClipFormatWindows; + +#define GSF_TYPE_CLIP_DATA (gsf_clip_data_get_type ()) +#define GSF_CLIP_DATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSF_TYPE_CLIP_DATA, GsfClipData)) +#define GSF_CLIP_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSF_TYPE_CLIP_DATA, GsfClipDataClass)) +#define GSF_IS_CLIP_DATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSF_TYPE_CLIP_DATA)) +#define GSF_IS_CLIP_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSF_TYPE_CLIP_DATA)) +#define GSF_CLIP_DATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSF_TYPE_CLIP_DATA, GsfClipDataClass)) + +typedef struct _GsfClipData GsfClipData; +typedef struct _GsfClipDataClass GsfClipDataClass; +typedef struct _GsfClipDataPrivate GsfClipDataPrivate; + +struct _GsfClipData { + GObject object; + + GsfClipDataPrivate *priv; +}; + +struct _GsfClipDataClass { + GObjectClass parent_class; +}; + +GType gsf_clip_data_get_type (void) G_GNUC_CONST; +/* void gsf_clip_data_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfClipData *gsf_clip_data_new (GsfClipFormat format, + GsfBlob *data_blob); + +GsfClipFormat gsf_clip_data_get_format (GsfClipData *clip_data); + +GsfBlob *gsf_clip_data_get_data_blob (GsfClipData *clip_data); + +GsfClipFormatWindows gsf_clip_data_get_windows_clipboard_format (GsfClipData *clip_data, + GError **error); + +gconstpointer gsf_clip_data_peek_real_data (GsfClipData *clip_data, + gsize *ret_size, + GError **error); + + +G_END_DECLS + +#endif /* GSF_CLIP_DATA_H */ diff --git a/gsf/gsf-doc-meta-data.c b/gsf/gsf-doc-meta-data.c new file mode 100644 index 0000000..8331c9c --- /dev/null +++ b/gsf/gsf-doc-meta-data.c @@ -0,0 +1,431 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-doc-meta-data.c: + * + * Copyright (C) 2002-2006 Dom Lachowicz (cinamod@hotmail.com) + * Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include + +struct _GsfDocMetaData { + GObject base; + + GHashTable *table; +}; +typedef GObjectClass GsfDocMetaDataClass; + +struct _GsfDocProp { + char *name; + GValue *val; + char *linked_to; /* optionally NULL */ +}; + +static GObjectClass *parent_class; + +static void +gsf_doc_meta_data_finalize (GObject *obj) +{ + g_hash_table_destroy (GSF_DOC_META_DATA (obj)->table); + parent_class->finalize (obj); +} + +static void +gsf_doc_meta_data_init (GObject *obj) +{ + GsfDocMetaData *meta = GSF_DOC_META_DATA (obj); + meta->table = g_hash_table_new_full (g_str_hash, g_str_equal, + NULL, (GDestroyNotify) gsf_doc_prop_free); +} + +static void +gsf_doc_meta_data_class_init (GObjectClass *gobject_class) +{ + gobject_class->finalize = gsf_doc_meta_data_finalize; + parent_class = g_type_class_peek_parent (gobject_class); +} + +GSF_CLASS(GsfDocMetaData, gsf_doc_meta_data, + gsf_doc_meta_data_class_init, gsf_doc_meta_data_init, + G_TYPE_OBJECT) + +/**********************************************************************/ + +/** + * gsf_doc_meta_data_new : + * + * Returns: a new metadata property collection + **/ +GsfDocMetaData * +gsf_doc_meta_data_new (void) +{ + return g_object_new (GSF_DOC_META_DATA_TYPE, NULL); +} + +/** + * gsf_doc_meta_data_lookup : + * @meta : #GsfDocMetaData + * @name : + * + * Returns: the property with name @id in @meta. The caller can modify the + * property value and link but not the name. + **/ +GsfDocProp * +gsf_doc_meta_data_lookup (GsfDocMetaData const *meta, char const *name) +{ + g_return_val_if_fail (IS_GSF_DOC_META_DATA (meta), NULL); + g_return_val_if_fail (name != NULL, NULL); + return g_hash_table_lookup (meta->table, name); +} + +/** + * gsf_doc_meta_data_insert : + * @meta : #GsfDocMetaData + * @name : the id. + * @value : #GValue + * + * Take ownership of @name and @value and insert a property into @meta. + * If a property exists with @name, it is replaced (The link is lost) + **/ +void +gsf_doc_meta_data_insert (GsfDocMetaData *meta, char *name, GValue *value) +{ + GsfDocProp *prop; + + g_return_if_fail (IS_GSF_DOC_META_DATA (meta)); + g_return_if_fail (name != NULL); + prop = g_new (GsfDocProp, 1); + prop->name = name; + prop->val = value; + prop->linked_to = NULL; + g_hash_table_replace (meta->table, prop->name, prop); +} + +/** + * gsf_doc_meta_data_remove : + * @meta : the collection + * @name : the non-null string name of the property + * + * If @name does not exist in the collection, do nothing. If @name does exist, + * remove it and its value from the collection + **/ +void +gsf_doc_meta_data_remove (GsfDocMetaData *meta, char const *name) +{ + g_return_if_fail (IS_GSF_DOC_META_DATA (meta)); + g_return_if_fail (name != NULL); + g_hash_table_remove (meta->table, name); +} + +/** + * gsf_doc_meta_data_store : + * @meta : #GsfDocMetaData + * @name : + * + **/ +GsfDocProp * +gsf_doc_meta_data_steal (GsfDocMetaData *meta, char const *name) +{ + GsfDocProp *prop; + g_return_val_if_fail (IS_GSF_DOC_META_DATA (meta), NULL); + g_return_val_if_fail (name != NULL, NULL); + prop = g_hash_table_lookup (meta->table, name); + if (NULL != prop) + g_hash_table_steal (meta->table, name); + return prop; +} + +/** + * gsf_doc_meta_data_store : + * @meta : #GsfDocMetaData + * @prop : #GsfDocProp + * + **/ +void +gsf_doc_meta_data_store (GsfDocMetaData *meta, GsfDocProp *prop) +{ + g_return_if_fail (IS_GSF_DOC_META_DATA (meta)); + g_return_if_fail (prop != NULL); + g_return_if_fail (prop != g_hash_table_lookup (meta->table, prop->name)); + g_hash_table_replace (meta->table, prop->name, prop); +} + +static void +cb_collect_pairs (char *prop_name, GsfDocProp *prop, GPtrArray *pairs) +{ + g_ptr_array_add (pairs, prop_name); + g_ptr_array_add (pairs, prop); +} + +static int +deref_strcmp (const char **a, const char **b) +{ + return strcmp (*a, *b); +} + +/** + * gsf_doc_meta_data_foreach : + * @meta : the collection + * @func : the function called once for each element in the collection + * @user_data : any supplied user data or %NULL + * + * Iterate through each (key, value) pair in this collection + **/ +void +gsf_doc_meta_data_foreach (GsfDocMetaData const *meta, GHFunc func, gpointer user_data) +{ + GPtrArray *pairs; + unsigned ui; + + g_return_if_fail (IS_GSF_DOC_META_DATA (meta)); + + if (g_hash_table_size (meta->table) == 0) + return; + + /* Sort the pairs by property name in order to generate consistent + files. */ + pairs = g_ptr_array_new (); + g_hash_table_foreach (meta->table, (GHFunc)cb_collect_pairs, pairs); + + qsort (&g_ptr_array_index (pairs, 0), + pairs->len / 2, + 2 * sizeof (gpointer), + (GCompareFunc)deref_strcmp); + + for (ui = 0; ui < pairs->len; ui += 2) + func (g_ptr_array_index (pairs, ui), + g_ptr_array_index (pairs, ui + 1), + user_data); + + g_ptr_array_free (pairs, TRUE); +} + +/** + * gsf_doc_meta_data_size : + * @meta : the collection + * + * Returns: the number of items in this collection + **/ +gsize +gsf_doc_meta_data_size (GsfDocMetaData const *meta) +{ + g_return_val_if_fail (meta != NULL, 0); + return (gsize) g_hash_table_size (meta->table); +} + +static void +cb_print_property (G_GNUC_UNUSED char const *name, + GsfDocProp const *prop) +{ + if (gsf_doc_prop_get_link (prop) != NULL) + g_print ("prop '%s' LINKED TO -> '%s'\n", + name, gsf_doc_prop_get_link (prop)); + else + g_print ("prop '%s'\n", name); + + gsf_doc_prop_dump (prop); +} + +/** + * gsf_doc_meta_dump : + * @meta : #GsfDocMetaData + * + * A debugging utility to dump the content of @meta via g_print + **/ +void +gsf_doc_meta_dump (GsfDocMetaData const *meta) +{ + gsf_doc_meta_data_foreach (meta, + (GHFunc) cb_print_property, NULL); +} + +/**********************************************************************/ + +/** + * gsf_doc_prop_new : + * @name : + * + * Returns: a new #GsfDocProp which the caller is responsible for freeing. + * Takes ownership of @name. + **/ +GsfDocProp * +gsf_doc_prop_new (char *name) +{ + GsfDocProp *prop; + + g_return_val_if_fail (name != NULL, NULL); + + prop = g_new (GsfDocProp, 1); + prop->name = name; + prop->val = NULL; + prop->linked_to = NULL; + + return prop; +} + +/** + * gsf_doc_prop_free : + * @prop : #GsfDocProp + * + * If @prop is non %NULL free the memory associated with it + **/ +void +gsf_doc_prop_free (GsfDocProp *prop) +{ + if (NULL != prop) { + g_free (prop->linked_to); + + if (prop->val) { + g_value_unset (prop->val); + g_free (prop->val); + } + g_free (prop->name); + g_free (prop); + } +} + +/** + * gsf_doc_prop_get_name : + * @prop : #GsfDocProp + * + * Returns: the name of the property, the caller should not modify the result. + **/ +char const * +gsf_doc_prop_get_name (GsfDocProp const *prop) +{ + g_return_val_if_fail (prop != NULL, NULL); + return prop->name; +} + +/** + * gsf_doc_prop_get_val : + * @prop : the property + * + * Returns: the value of the property, the caller should not modify the result. + **/ +GValue const * +gsf_doc_prop_get_val (GsfDocProp const *prop) +{ + g_return_val_if_fail (prop != NULL, NULL); + return prop->val; +} + +/** + * gsf_doc_prop_set_val : + * @prop : #GsfDocProp + * @val : #GValue + * + * Assigns @val to @prop, and unsets and frees the current value. + **/ +void +gsf_doc_prop_set_val (GsfDocProp *prop, GValue *val) +{ + g_return_if_fail (prop != NULL); + + if (val != prop->val) { + if (prop->val != NULL) { + g_value_unset (prop->val); + g_free (prop->val); + } + prop->val = val; + } +} + +/** + * gsf_doc_prop_swap_val : + * @prop : #GsfDocProp + * @val : #GValue + * + * Returns: the current value of @prop, and replaces it with @val + * Caller is responsible for unsetting and freeing the result. + **/ +GValue * +gsf_doc_prop_swap_val (GsfDocProp *prop, GValue *val) +{ + GValue *old_val; + g_return_val_if_fail (prop != NULL, NULL); + + old_val = prop->val; + prop->val = val; + return old_val; +} + +/** + * gsf_doc_prop_get_link : + * @prop : #GsfDocProp + * + * Returns: the current link descriptor of @prop. The result should not be + * freed or modified. + **/ +char const * +gsf_doc_prop_get_link (GsfDocProp const *prop) +{ + g_return_val_if_fail (prop != NULL, NULL); + return prop->linked_to; +} + +/** + * gsf_doc_prop_set_link : + * @prop : #GsfDocProp + * @link : optionally %NULL + * + * Sets @prop's link to @link + **/ +void +gsf_doc_prop_set_link (GsfDocProp *prop, char *link) +{ + g_return_if_fail (prop != NULL); + + if (link != prop->linked_to) { + g_free (prop->linked_to); + prop->linked_to = link; + } +} + +/** + * gsf_doc_prop_dump : + * @prop : #GsfDocProp + * + * A debugging utility to dump @prop as text via g_print + * New in 1.14.2 + **/ +void +gsf_doc_prop_dump (GsfDocProp const *prop) +{ + GValue const *val = gsf_doc_prop_get_val (prop); + char *tmp; + if (VAL_IS_GSF_DOCPROP_VECTOR ((GValue *)val)) { + GValueArray *va = gsf_value_get_docprop_varray (val); + unsigned i; + + for (i = 0 ; i < va->n_values; i++) { + tmp = g_strdup_value_contents ( + g_value_array_get_nth (va, i)); + g_print ("\t[%u] = %s\n", i, tmp); + g_free (tmp); + } + } else { + tmp = g_strdup_value_contents (val); + g_print ("\t= %s\n", tmp); + g_free (tmp); + } +} diff --git a/gsf/gsf-doc-meta-data.h b/gsf/gsf-doc-meta-data.h new file mode 100644 index 0000000..9f1e4ed --- /dev/null +++ b/gsf/gsf-doc-meta-data.h @@ -0,0 +1,67 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-doc-meta-data.h: get, set, remove custom meta properties associated with documents + * + * Copyright (C) 2002-2006 Dom Lachowicz (cinamod@hotmail.com) + * Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_DOC_META_DATA_H +#define GSF_DOC_META_DATA_H + +#include +#include +#include + +G_BEGIN_DECLS + +#define GSF_DOC_META_DATA_TYPE (gsf_doc_meta_data_get_type ()) +#define GSF_DOC_META_DATA(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_DOC_META_DATA_TYPE, GsfDocMetaData)) +#define IS_GSF_DOC_META_DATA(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_DOC_META_DATA_TYPE)) + +GType gsf_doc_meta_data_get_type (void) G_GNUC_CONST; +/* void gsf_doc_meta_data_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfDocMetaData *gsf_doc_meta_data_new (void); +GsfDocProp *gsf_doc_meta_data_lookup (GsfDocMetaData const *meta, + char const *name); +void gsf_doc_meta_data_insert (GsfDocMetaData *meta, + char *name, GValue *value); +void gsf_doc_meta_data_remove (GsfDocMetaData *meta, + char const *name); +GsfDocProp *gsf_doc_meta_data_steal (GsfDocMetaData *meta, + char const *name); +void gsf_doc_meta_data_store (GsfDocMetaData *meta, + GsfDocProp *prop); +void gsf_doc_meta_data_foreach (GsfDocMetaData const *meta, + GHFunc func, gpointer user_data); +gsize gsf_doc_meta_data_size (GsfDocMetaData const *meta); +void gsf_doc_meta_dump (GsfDocMetaData const *meta); + +GsfDocProp *gsf_doc_prop_new (char *name); +void gsf_doc_prop_free (GsfDocProp *prop); +char const *gsf_doc_prop_get_name (GsfDocProp const *prop); +GValue const *gsf_doc_prop_get_val (GsfDocProp const *prop); +void gsf_doc_prop_set_val (GsfDocProp *prop, GValue *val); +GValue *gsf_doc_prop_swap_val (GsfDocProp *prop, GValue *val); +char const *gsf_doc_prop_get_link (GsfDocProp const *prop); +void gsf_doc_prop_set_link (GsfDocProp *prop, char *link); +void gsf_doc_prop_dump (GsfDocProp const *prop); + +G_END_DECLS + +#endif /* GSF_DOC_META_DATA_H */ diff --git a/gsf/gsf-docprop-vector.c b/gsf/gsf-docprop-vector.c new file mode 100644 index 0000000..8e6464d --- /dev/null +++ b/gsf/gsf-docprop-vector.c @@ -0,0 +1,157 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-docprop-vector.c: A type implementing OLE Document Property vectors using a GValueArray + * + * Copyright (C) 2004-2006 Frank Chiulli (fc-linux@cox.net) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include + +struct _GsfDocPropVector { + GObject parent; + + GValueArray *gva; +}; +typedef GObjectClass GsfDocPropVectorClass; + +#define GSF_DOCPROP_VECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GSF_DOCPROP_VECTOR_TYPE, GsfDocPropVectorClass)) +#define GSF_DOCPROP_VECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GSF_DOCPROP_VECTOR_TYPE, GsfDocPropVectorClass)) +#define IS_GSF_DOCPROP_VECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GSF_DOCPROP_VECTOR_TYPE)) + +static GObjectClass *parent_class; + +GValueArray * +gsf_value_get_docprop_varray (GValue const *value) +{ + GsfDocPropVector *v = gsf_value_get_docprop_vector (value); + return v ? v->gva : NULL; +} + +/** + * gsf_docprop_value_get_vector + * @value: A GValue of type #GsfDocPropVector. + * + * This function returns a pointer to the GsfDocPropVector structure in @value. + * No additional references are created. + * + * Returns: A pointer to the #GsfDocPropVector structure in @value + **/ +GsfDocPropVector * +gsf_value_get_docprop_vector (GValue const *value) +{ + g_return_val_if_fail (VAL_IS_GSF_DOCPROP_VECTOR (value), NULL); + + return (GsfDocPropVector *) g_value_get_object (value); +} + +/** + * gsf_docprop_vector_append + * @vector: The vector to which the GValue will be added + * @value: The GValue to add to @vector + * + * Insert a copy of @value as the last element of @vector. + **/ +void +gsf_docprop_vector_append (GsfDocPropVector *vector, GValue *value) +{ + g_return_if_fail (vector != NULL); + g_return_if_fail (value != NULL); + + if (G_IS_VALUE (value)) + vector->gva = g_value_array_append (vector->gva, value); +} + +/** + * gsf_docprop_vector_as_string + * @vector: The #GsfDocPropVector from which GValues will be extracted. + * + * This function returns a string which represents all the GValues in @vector. + * The caller is responsible for freeing the result. + * + * Returns: a string of comma-separated values + **/ +gchar* +gsf_docprop_vector_as_string (GsfDocPropVector const *vector) +{ + gchar *rstring; + + guint i; + guint num_values; + + g_return_val_if_fail (vector != NULL, NULL); + g_return_val_if_fail (vector->gva != NULL, NULL); + + rstring = g_new0 (gchar, 1); + num_values = vector->gva->n_values; + + for (i = 0; i < num_values; i++) { + char *str; + GValue *v; + + v = g_value_array_get_nth (vector->gva, i); + str = g_strdup_value_contents (v); + rstring = g_strconcat (rstring, str, ",", NULL); + g_free (str); + } + + return rstring; +} + +static void +gsf_docprop_vector_finalize (GObject *obj) +{ + GsfDocPropVector *vector = (GsfDocPropVector *) obj; + if (vector->gva != NULL) { + g_value_array_free (vector->gva); + vector->gva = NULL; + } + parent_class->finalize (obj); +} + +static void +gsf_docprop_vector_class_init (GObjectClass *gobject_class) +{ + parent_class = g_type_class_peek (G_TYPE_OBJECT); + gobject_class->finalize = gsf_docprop_vector_finalize; +} + +static void +gsf_docprop_vector_init (GsfDocPropVector *vector) +{ + vector->gva = g_value_array_new (0); +} + +GSF_CLASS (GsfDocPropVector, gsf_docprop_vector, + gsf_docprop_vector_class_init, gsf_docprop_vector_init, + G_TYPE_OBJECT) + +/** + * gsf_docprop_vector_new + * + * This function creates a new gsf_docprop_vector object. + * + * Returns: GsfDocPropVector* + **/ +GsfDocPropVector* +gsf_docprop_vector_new (void) +{ + return g_object_new (GSF_DOCPROP_VECTOR_TYPE, NULL); +} + diff --git a/gsf/gsf-docprop-vector.h b/gsf/gsf-docprop-vector.h new file mode 100644 index 0000000..20592c6 --- /dev/null +++ b/gsf/gsf-docprop-vector.h @@ -0,0 +1,48 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-docprop-vectors.h: A type implementing OLE Document Property vectors + * + * Copyright (C) 2004-2006 Frank Chiulli (fc-linux@cox.net) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_DOCPROP_VECTOR_H +#define GSF_DOCPROP_VECTOR_H + +#include +#include + +G_BEGIN_DECLS + +#define GSF_DOCPROP_VECTOR_TYPE (gsf_docprop_vector_get_type ()) +#define GSF_DOCPROP_VECTOR(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GSF_DOCPROP_VECTOR, GsfDocPropVector)) +#define IS_GSF_DOCPROP_VECTOR(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GSF_DOCPROP_VECTOR_TYPE)) + +typedef struct _GsfDocPropVector GsfDocPropVector; +GType gsf_docprop_vector_get_type (void) G_GNUC_CONST; +/* void gsf_docprop_vector_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfDocPropVector *gsf_docprop_vector_new (void); +void gsf_docprop_vector_append (GsfDocPropVector *vector, GValue *value); +gchar *gsf_docprop_vector_as_string (GsfDocPropVector const *vector); + +#define VAL_IS_GSF_DOCPROP_VECTOR(v) (G_TYPE_CHECK_VALUE_TYPE((v), GSF_DOCPROP_VECTOR_TYPE)) +GsfDocPropVector *gsf_value_get_docprop_vector (GValue const *value); +GValueArray *gsf_value_get_docprop_varray (GValue const *value); + +G_END_DECLS + +#endif /* GSF_DOCPROP_VECTOR_H */ diff --git a/gsf/gsf-impl-utils.h b/gsf/gsf-impl-utils.h new file mode 100644 index 0000000..9a62aa1 --- /dev/null +++ b/gsf/gsf-impl-utils.h @@ -0,0 +1,156 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-impl-utils.h: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_IMPL_UTILS_H +#define GSF_IMPL_UTILS_H + +#include +#include + +G_BEGIN_DECLS + +/* We need to do this with a version check as this header gets installed. + * + * DEPRECATED in favour of G_PARAM_STATIC_STRINGS + **/ +#if GLIB_CHECK_VERSION(2,7,0) +#define GSF_PARAM_STATIC (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB) +#else +#define GSF_PARAM_STATIC 0 +#endif + +/*************************************************************************/ + +#define GSF_CLASS_FULL(name, prefix, base_init, base_finalize, \ + class_init, class_finalize, instance_init, parent_type, \ + abstract, interface_decl) \ +GType \ +prefix ## _get_type (void) \ +{ \ + static GType type = 0; \ + if (G_UNLIKELY (type == 0)) { \ + static GTypeInfo const object_info = { \ + sizeof (name ## Class), \ + (GBaseInitFunc) base_init, \ + (GBaseFinalizeFunc) base_finalize, \ + (GClassInitFunc) class_init, \ + (GClassFinalizeFunc) class_finalize, \ + NULL, /* class_data */ \ + sizeof (name), \ + 0, /* n_preallocs */ \ + (GInstanceInitFunc) instance_init, \ + NULL \ + }; \ + type = g_type_register_static (parent_type, #name, \ + &object_info, (GTypeFlags) abstract); \ + interface_decl \ + } \ + return type; \ +} + +/** + * GSF_CLASS: + * @name: (string) Name of the class. + * @prefix: (string) Prefix designating the namespace to be used for + * implementing the class. + * @class_init: (#GClassInitFunc) Initialisation function for the class. + * @instance_init: (#GInstanceInitFunc) Initialisation (constructor) function + * for an instance of the class. + * @parent: Parent class to this class. + * + * Set up a GSF class. + * + */ +#define GSF_CLASS(name, prefix, class_init, instance_init, parent) \ + GSF_CLASS_FULL(name, prefix, NULL, NULL, class_init, NULL, \ + instance_init, parent, 0, {}) +#define GSF_CLASS_ABSTRACT(name, prefix, class_init, instance_init, parent) \ + GSF_CLASS_FULL(name, prefix, NULL, NULL, class_init, NULL, \ + instance_init, parent, G_TYPE_FLAG_ABSTRACT, {}) + +#define GSF_INTERFACE_FULL(type, init_func, iface_type) { \ + static GInterfaceInfo const iface = { \ + (GInterfaceInitFunc) init_func, NULL, NULL }; \ + g_type_add_interface_static (type, iface_type, &iface); \ +} + +#define GSF_INTERFACE(init_func, iface_type) \ + GSF_INTERFACE_FULL(type, init_func, iface_type) + +/*************************************************************************/ + +#define GSF_DYNAMIC_CLASS_FULL(name, prefix, base_init, base_finalize, \ + class_init, class_finalize, instance_init, parent_type, \ + abstract, interface_decl) \ +static GType prefix ## _type; \ + \ +GType prefix ## _get_type (void); \ +void prefix ## _register_type (GTypeModule *module); \ + \ +GType \ +prefix ## _get_type (void) \ +{ \ + g_return_val_if_fail (prefix ## _type != 0, 0); \ + return prefix ## _type; \ +} \ +void \ +prefix ## _register_type (GTypeModule *module) \ +{ \ + GTypeInfo const type_info = { \ + sizeof (name ## Class), \ + (GBaseInitFunc) base_init, \ + (GBaseFinalizeFunc) base_finalize, \ + (GClassInitFunc) class_init, \ + (GClassFinalizeFunc) class_finalize, \ + NULL, /* class_data */ \ + sizeof (name), \ + 0, /* n_preallocs */ \ + (GInstanceInitFunc) instance_init, \ + NULL \ + }; \ + GType type; \ + \ + g_return_if_fail (prefix ## _type == 0); \ + \ + prefix ## _type = type = g_type_module_register_type (module, \ + parent_type, #name, &type_info, (GTypeFlags) abstract); \ + interface_decl \ +} + +#define GSF_DYNAMIC_CLASS(name, prefix, class_init, instance_init, parent) \ + GSF_DYNAMIC_CLASS_FULL(name, prefix, NULL, NULL, class_init, NULL, \ + instance_init, parent, 0, {}) +#define GSF_DYNAMIC_CLASS_ABSTRACT(name, prefix, class_init, instance_init, parent) \ + GSF_DYNAMIC_CLASS_FULL(name, prefix, NULL, NULL, class_init, NULL, \ + instance_init, parent, G_TYPE_FLAG_ABSTRACT, {}) + +#define GSF_DYNAMIC_INTERFACE_FULL(type, init_func, iface_type, module) { \ + GInterfaceInfo const iface = { \ + (GInterfaceInitFunc) init_func, NULL, NULL }; \ + g_type_module_add_interface (module, type, iface_type, &iface); \ +} + +#define GSF_DYNAMIC_INTERFACE(init_func, iface_type, module) \ + GSF_DYNAMIC_INTERFACE_FULL(type, init_func, iface_type, module) + +G_END_DECLS + +#endif /* GSF_IMPL_UTILS_H */ diff --git a/gsf/gsf-infile-impl.h b/gsf/gsf-infile-impl.h new file mode 100644 index 0000000..bea59b1 --- /dev/null +++ b/gsf/gsf-infile-impl.h @@ -0,0 +1,50 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-infile-impl.h: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_INFILE_IMPL_H +#define GSF_INFILE_IMPL_H + +#include +#include +#include + +G_BEGIN_DECLS + +struct _GsfInfile { + GsfInput parent; +}; + +typedef struct { + GsfInputClass input_class; + int (*num_children) (GsfInfile *infile); + char const *(*name_by_index) (GsfInfile *infile, int i); + GsfInput *(*child_by_index) (GsfInfile *infile, + int i, GError **err); + GsfInput *(*child_by_name) (GsfInfile *infile, + char const *name, GError **err); +} GsfInfileClass; + +#define GSF_INFILE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSF_INFILE_TYPE, GsfInfileClass)) +#define GSF_IS_INFILE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSF_INFILE_TYPE)) + +G_END_DECLS + +#endif /* GSF_INFILE_IMPL_H */ diff --git a/gsf/gsf-infile-msole.c b/gsf/gsf-infile-msole.c new file mode 100644 index 0000000..82cb59e --- /dev/null +++ b/gsf/gsf-infile-msole.c @@ -0,0 +1,972 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-infile-msole.c : + * + * Copyright (C) 2002-2004 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +/* Lots of useful information in + * http://www.aafassociation.org/html/specs/aafcontainerspec-v1.0.1.pdf + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#undef G_LOG_DOMAIN +#define G_LOG_DOMAIN "libgsf:msole" + +static GObjectClass *parent_class; + +typedef struct { + guint32 *block; + guint32 num_blocks; +} MSOleBAT; + +typedef struct { + char *name; + char *collation_name; + int index; + size_t size; + gboolean use_sb; + guint32 first_block; + gboolean is_directory; + GList *children; + unsigned char clsid[16]; /* 16 byte GUID used by some apps */ +} MSOleDirent; + +typedef struct { + struct { + MSOleBAT bat; + unsigned shift; + unsigned filter; + size_t size; + } bb, sb; + gsf_off_t max_block; + guint32 threshold; /* transition between small and big blocks */ + guint32 sbat_start, num_sbat; + + MSOleDirent *root_dir; + GsfInput *sb_file; + + int ref_count; +} MSOleInfo; + +struct _GsfInfileMSOle { + GsfInfile parent; + + GsfInput *input; + MSOleInfo *info; + MSOleDirent *dirent; + MSOleBAT bat; + gsf_off_t cur_block; + + struct { + guint8 *buf; + size_t buf_size; + } stream; +}; + +typedef struct { + GsfInfileClass parent_class; +} GsfInfileMSOleClass; + +#define GSF_INFILE_MSOLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSF_INFILE_MSOLE_TYPE, GsfInfileMSOleClass)) +#define GSF_IS_INFILE_MSOLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSF_INFILE_MSOLE_TYPE)) + +/* utility macros */ +#define OLE_BIG_BLOCK(index, ole) ((index) >> ole->info->bb.shift) + +static GsfInput *gsf_infile_msole_new_child (GsfInfileMSOle *parent, + MSOleDirent *dirent, GError **err); +static void ole_info_unref (MSOleInfo *info); + +/** + * ole_get_block : + * @ole: the infile + * @block: block number + * @buffer: optionally NULL + * + * Read a block of data from the underlying input. + * Be really anal. + * + * Returns: pointer to the buffer or NULL if there is an error or 0 bytes are + * requested. + **/ +static guint8 const * +ole_get_block (GsfInfileMSOle const *ole, guint32 block, guint8 *buffer) +{ + g_return_val_if_fail (block < ole->info->max_block, NULL); + + /* OLE_HEADER_SIZE is fixed at 512, but the sector containing the + * header is padded out to bb.size (sector size) when bb.size > 512. */ + if (gsf_input_seek (ole->input, + (gsf_off_t)(MAX (OLE_HEADER_SIZE, ole->info->bb.size) + (block << ole->info->bb.shift)), + G_SEEK_SET) < 0) + return NULL; + + return gsf_input_read (ole->input, ole->info->bb.size, buffer); +} + +/** + * ole_make_bat : + * @metabat: a meta bat to connect to the raw blocks (small or large) + * @size_guess: An optional guess as to how many blocks are in the file + * @block: The first block in the list. + * @res: where to store the result. + * + * Walk the linked list of the supplied block allocation table and build up a + * table for the list starting in @block. + * + * Returns: TRUE on error. + **/ +static gboolean +ole_make_bat (MSOleBAT const *metabat, size_t size_guess, guint32 block, + MSOleBAT *res) +{ + /* NOTE : Only use size as a suggestion, sometimes it is wrong */ + GArray *bat = g_array_sized_new (FALSE, FALSE, + sizeof (guint32), size_guess); + + guint8 *used = (guint8*)g_alloca (1 + metabat->num_blocks / 8); + memset (used, 0, 1 + metabat->num_blocks / 8); + + if (block < metabat->num_blocks) + do { + /* Catch cycles in the bat list */ + if (used[block/8] & (1 << (block & 0x7))) + break; + used[block/8] |= 1 << (block & 0x7); + + g_array_append_val (bat, block); + block = metabat->block [block]; + } while (block < metabat->num_blocks); + + res->block = NULL; + + res->num_blocks = bat->len; + res->block = (guint32 *) (gpointer) g_array_free (bat, FALSE); + + if (block != BAT_MAGIC_END_OF_CHAIN) { + g_warning ("This OLE2 file is invalid.\n" + "The Block Allocation Table for one of the streams had %x instead of a terminator (%x).\n" + "We might still be able to extract some data, but you'll want to check the file.", + block, BAT_MAGIC_END_OF_CHAIN); + } + + return FALSE; +} + +static void +ols_bat_release (MSOleBAT *bat) +{ + if (bat->block != NULL) { + bat->num_blocks = 0; + g_free (bat->block); + bat->block = NULL; + } +} + +/* A small utility routine to read a set of references to bat blocks + * either from the OLE header, or a meta-bat block. + * Returns: a pointer to the element after the last position filled. */ +static guint32 * +ole_info_read_metabat (GsfInfileMSOle *ole, guint32 *bats, guint32 max_bat, + guint32 const *metabat, guint32 const *metabat_end) +{ + guint8 const *bat, *end; + + for (; metabat < metabat_end; metabat++) { + if (*metabat != BAT_MAGIC_UNUSED) { + bat = ole_get_block (ole, *metabat, NULL); + if (bat == NULL) + return NULL; + end = bat + ole->info->bb.size; + for ( ; bat < end ; bat += BAT_INDEX_SIZE, bats++) { + *bats = GSF_LE_GET_GUINT32 (bat); + if (*bats >= max_bat && *bats < BAT_MAGIC_METABAT) { + g_warning ("Invalid metabat item %08x", + *bats); + return NULL; + } + } + } else { + /* Looks like something in the wild sometimes creates + * 'unused' entries in the metabat. Let's assume that + * corresponds to lots of unused blocks + * http://bugzilla.gnome.org/show_bug.cgi?id=336858 */ + unsigned i = ole->info->bb.size / BAT_INDEX_SIZE; + while (i-- > 0) + *bats++ = BAT_MAGIC_UNUSED; + } + } + return bats; +} + +/* Copy some some raw data into an array of guint32. */ +static void +gsf_ole_get_guint32s (guint32 *dst, guint8 const *src, int num_bytes) +{ + for (; (num_bytes -= BAT_INDEX_SIZE) >= 0 ; src += BAT_INDEX_SIZE) + *dst++ = GSF_LE_GET_GUINT32 (src); +} + +static GsfInput * +ole_info_get_sb_file (GsfInfileMSOle *parent) +{ + MSOleBAT meta_sbat; + + if (parent->info->sb_file != NULL) + return parent->info->sb_file; + + parent->info->sb_file = gsf_infile_msole_new_child (parent, + parent->info->root_dir, NULL); + if (!parent->info->sb_file) + return NULL; + + /* avoid creating a circular reference */ + ole_info_unref (((GsfInfileMSOle *)parent->info->sb_file)->info); + + g_return_val_if_fail (parent->info->sb.bat.block == NULL, NULL); + + if (ole_make_bat (&parent->info->bb.bat, + parent->info->num_sbat, parent->info->sbat_start, &meta_sbat)) + return NULL; + + parent->info->sb.bat.num_blocks = meta_sbat.num_blocks * (parent->info->bb.size / BAT_INDEX_SIZE); + parent->info->sb.bat.block = g_new0 (guint32, parent->info->sb.bat.num_blocks); + ole_info_read_metabat (parent, parent->info->sb.bat.block, + parent->info->sb.bat.num_blocks, + meta_sbat.block, meta_sbat.block + meta_sbat.num_blocks); + ols_bat_release (&meta_sbat); + + return parent->info->sb_file; +} + +static gint +ole_dirent_cmp (MSOleDirent const *a, MSOleDirent const *b) +{ + g_return_val_if_fail (a, 0); + g_return_val_if_fail (b, 0); + + g_return_val_if_fail (a->collation_name, 0); + g_return_val_if_fail (b->collation_name, 0); + + return strcmp (b->collation_name, a->collation_name); +} + +/* Parse dirent number @entry and recursively handle its siblings and children. + * parent is optional. */ +static MSOleDirent * +ole_dirent_new (GsfInfileMSOle *ole, guint32 entry, MSOleDirent *parent, + guint8 *seen_before) +{ + MSOleDirent *dirent; + guint32 block, next, prev, child, size; + guint8 const *data; + guint8 type; + guint16 name_len; + + if (entry >= DIRENT_MAGIC_END) + return NULL; + + g_return_val_if_fail (entry <= G_MAXUINT / DIRENT_SIZE, NULL); + + block = OLE_BIG_BLOCK (entry * DIRENT_SIZE, ole); + g_return_val_if_fail (block < ole->bat.num_blocks, NULL); + + g_return_val_if_fail (!seen_before[entry], NULL); + seen_before[entry] = TRUE; + + data = ole_get_block (ole, ole->bat.block [block], NULL); + if (data == NULL) + return NULL; + data += (DIRENT_SIZE * entry) % ole->info->bb.size; + + type = GSF_LE_GET_GUINT8 (data + DIRENT_TYPE); + if (type != DIRENT_TYPE_DIR && + type != DIRENT_TYPE_FILE && + type != DIRENT_TYPE_ROOTDIR) { + g_warning ("Unknown stream type 0x%x", type); + return NULL; + } + if (!parent && type != DIRENT_TYPE_ROOTDIR) { + /* See bug 346118. */ + g_warning ("Root directory is not marked as such."); + type = DIRENT_TYPE_ROOTDIR; + } + + /* It looks like directory (and root directory) sizes are sometimes bogus */ + size = GSF_LE_GET_GUINT32 (data + DIRENT_FILE_SIZE); + g_return_val_if_fail (type == DIRENT_TYPE_DIR || type == DIRENT_TYPE_ROOTDIR || + size <= (guint32)ole->input->size, NULL); + + dirent = g_new0 (MSOleDirent, 1); + dirent->index = entry; + dirent->size = size; + /* Store the class id which is 16 byte identifier used by some apps */ + memcpy(dirent->clsid, data + DIRENT_CLSID, sizeof(dirent->clsid)); + + /* root dir is always big block */ + dirent->use_sb = parent && (size < ole->info->threshold); + dirent->first_block = (GSF_LE_GET_GUINT32 (data + DIRENT_FIRSTBLOCK)); + dirent->is_directory = (type != DIRENT_TYPE_FILE); + dirent->children = NULL; + prev = GSF_LE_GET_GUINT32 (data + DIRENT_PREV); + next = GSF_LE_GET_GUINT32 (data + DIRENT_NEXT); + child = GSF_LE_GET_GUINT32 (data + DIRENT_CHILD); + name_len = GSF_LE_GET_GUINT16 (data + DIRENT_NAME_LEN); + dirent->name = NULL; + if (0 < name_len && name_len <= DIRENT_MAX_NAME_SIZE) { + gunichar2 uni_name [DIRENT_MAX_NAME_SIZE+1]; + gchar const *end; + int i; + + /* !#%!@$#^ + * Sometimes, rarely, people store the stream name as ascii + * rather than utf16. Do a validation first just in case. + */ + if (!g_utf8_validate (data, -1, &end) || + ((guint8 const *)end - data + 1) != name_len) { + /* be wary about endianness */ + for (i = 0 ; i < name_len ; i += 2) + uni_name [i/2] = GSF_LE_GET_GUINT16 (data + i); + uni_name [i/2] = 0; + + dirent->name = g_utf16_to_utf8 (uni_name, -1, NULL, NULL, NULL); + } else + dirent->name = g_strndup ((gchar *)data, (gsize)((guint8 const *)end - data + 1)); + } + /* be really anal in the face of screwups */ + if (dirent->name == NULL) + dirent->name = g_strdup (""); + dirent->collation_name = g_utf8_collate_key (dirent->name, -1); + +#if 0 + printf ("%c '%s' :\tsize = %d\tfirst_block = 0x%x\n", + dirent->is_directory ? 'd' : ' ', + dirent->name, dirent->size, dirent->first_block); +#endif + + if (parent != NULL) + parent->children = g_list_insert_sorted (parent->children, + dirent, (GCompareFunc)ole_dirent_cmp); + + /* NOTE : These links are a tree, not a linked list */ + ole_dirent_new (ole, prev, parent, seen_before); + ole_dirent_new (ole, next, parent, seen_before); + + if (dirent->is_directory) + ole_dirent_new (ole, child, dirent, seen_before); + else if (child != DIRENT_MAGIC_END) + g_warning ("A non directory stream with children ?"); + + return dirent; +} + +static void +ole_dirent_free (MSOleDirent *dirent) +{ + GList *tmp; + g_return_if_fail (dirent != NULL); + + g_free (dirent->name); + g_free (dirent->collation_name); + + for (tmp = dirent->children; tmp; tmp = tmp->next) + ole_dirent_free ((MSOleDirent *)tmp->data); + g_list_free (dirent->children); + g_free (dirent); +} + +/*****************************************************************************/ + +static void +ole_info_unref (MSOleInfo *info) +{ + if (info->ref_count-- != 1) + return; + + ols_bat_release (&info->bb.bat); + ols_bat_release (&info->sb.bat); + if (info->root_dir != NULL) { + ole_dirent_free (info->root_dir); + info->root_dir = NULL; + } + if (info->sb_file != NULL) { + g_object_unref (G_OBJECT (info->sb_file)); + info->sb_file = NULL; + } + g_free (info); +} + +static MSOleInfo * +ole_info_ref (MSOleInfo *info) +{ + info->ref_count++; + return info; +} + +/* Utility routine to _partially_ replicate a file. It does NOT copy the bat + * blocks, or init the dirent. */ +static GsfInfileMSOle * +ole_dup (GsfInfileMSOle const *src, GError **err) +{ + GsfInfileMSOle *dst; + GsfInput *input; + + g_return_val_if_fail (src != NULL, NULL); + + input = gsf_input_dup (src->input, err); + if (input == NULL) { + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "Failed to duplicate input stream"); + return NULL; + } + + dst = (GsfInfileMSOle *)g_object_new (GSF_INFILE_MSOLE_TYPE, NULL); + if (G_UNLIKELY (NULL == dst)) return NULL; + + dst->input = input; + dst->info = ole_info_ref (src->info); + /* buf and buf_size are initialized to NULL */ + + return dst; +} + +/* Read an OLE header and do some sanity checking + * along the way. + * Returns: %TRUE on error setting @err if it is supplied. */ +static gboolean +ole_init_info (GsfInfileMSOle *ole, GError **err) +{ + static guint8 const signature[] = + { 0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1 }; + guint8 *seen_before; + guint8 const *header, *tmp; + guint32 *metabat = NULL; + MSOleInfo *info; + guint32 bb_shift, sb_shift, num_bat, num_metabat, last, dirent_start; + guint32 metabat_block, *ptr; + gboolean fail; + + /* check the header */ + if (gsf_input_seek (ole->input, 0, G_SEEK_SET) || + NULL == (header = gsf_input_read (ole->input, OLE_HEADER_SIZE, NULL)) || + 0 != memcmp (header, signature, sizeof (signature))) { + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "No OLE2 signature"); + return TRUE; + } + + bb_shift = GSF_LE_GET_GUINT16 (header + OLE_HEADER_BB_SHIFT); + sb_shift = GSF_LE_GET_GUINT16 (header + OLE_HEADER_SB_SHIFT); + num_bat = GSF_LE_GET_GUINT32 (header + OLE_HEADER_NUM_BAT); + dirent_start = GSF_LE_GET_GUINT32 (header + OLE_HEADER_DIRENT_START); + metabat_block = GSF_LE_GET_GUINT32 (header + OLE_HEADER_METABAT_BLOCK); + num_metabat = GSF_LE_GET_GUINT32 (header + OLE_HEADER_NUM_METABAT); + + /* Some sanity checks + * 1) There should always be at least 1 BAT block + * 2) It makes no sense to have a block larger than 2^31 for now. + * Maybe relax this later, but not much. + */ + if (6 > bb_shift || bb_shift >= 31 || sb_shift > bb_shift || + (gsf_input_size (ole->input) >> bb_shift) < 1) { + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "Unreasonable block sizes"); + return TRUE; + } + + info = g_new0 (MSOleInfo, 1); + ole->info = info; + + info->ref_count = 1; + info->bb.shift = bb_shift; + info->bb.size = 1 << info->bb.shift; + info->bb.filter = info->bb.size - 1; + info->sb.shift = sb_shift; + info->sb.size = 1 << info->sb.shift; + info->sb.filter = info->sb.size - 1; + info->threshold = GSF_LE_GET_GUINT32 (header + OLE_HEADER_THRESHOLD); + info->sbat_start = GSF_LE_GET_GUINT32 (header + OLE_HEADER_SBAT_START); + info->num_sbat = GSF_LE_GET_GUINT32 (header + OLE_HEADER_NUM_SBAT); + info->max_block = (gsf_input_size (ole->input) - OLE_HEADER_SIZE) / info->bb.size; + info->sb_file = NULL; + + if (info->num_sbat == 0 && + info->sbat_start != BAT_MAGIC_END_OF_CHAIN && + info->sbat_start != BAT_MAGIC_UNUSED) { + g_warning ("There are not supposed to be any blocks in the small block allocation table, yet there is a link to some. Ignoring it."); + } + + /* very rough heuristic, just in case */ + if (num_bat < info->max_block && info->num_sbat < info->max_block) { + info->bb.bat.num_blocks = num_bat * (info->bb.size / BAT_INDEX_SIZE); + info->bb.bat.block = g_new0 (guint32, info->bb.bat.num_blocks); + + metabat = g_try_new (guint32, MAX (info->bb.size, OLE_HEADER_SIZE)); + if (!metabat) { + g_free (info); + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "Insufficient memory"); + return TRUE; + } + + /* Reading the elements invalidates this memory, make copy */ + gsf_ole_get_guint32s (metabat, header + OLE_HEADER_START_BAT, + OLE_HEADER_SIZE - OLE_HEADER_START_BAT); + last = num_bat; + if (last > OLE_HEADER_METABAT_SIZE) + last = OLE_HEADER_METABAT_SIZE; + + ptr = ole_info_read_metabat (ole, info->bb.bat.block, + info->bb.bat.num_blocks, metabat, metabat + last); + num_bat -= last; + } else + ptr = NULL; + + last = (info->bb.size - BAT_INDEX_SIZE) / BAT_INDEX_SIZE; + while (ptr != NULL && num_metabat-- > 0) { + tmp = ole_get_block (ole, metabat_block, NULL); + if (tmp == NULL) { + ptr = NULL; + break; + } + + /* Reading the elements invalidates this memory, make copy */ + gsf_ole_get_guint32s (metabat, tmp, (int)info->bb.size); + + if (num_metabat == 0) { + if (last < num_bat) { + /* there should be less that a full metabat block + * remaining */ + ptr = NULL; + break; + } + last = num_bat; + } else if (num_metabat > 0) { + metabat_block = metabat[last]; + if (num_bat < last) { + /* ::num_bat and ::num_metabat are + * inconsistent. There are too many metabats + * for the bat count in the header. */ + ptr = NULL; + break; + } + num_bat -= last; + } + + ptr = ole_info_read_metabat (ole, ptr, + info->bb.bat.num_blocks, metabat, metabat + last); + } + fail = (ptr == NULL); + + g_free (metabat); + metabat = ptr = NULL; + + if (fail) { + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "Inconsistent block allocation table"); + return TRUE; + } + + /* Read the directory's bat, we do not know the size */ + if (ole_make_bat (&info->bb.bat, 0, dirent_start, &ole->bat)) { + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "Problems making block allocation table"); + return TRUE; + } + + /* Read the directory */ + seen_before = g_malloc0 ((ole->bat.num_blocks << info->bb.shift) * DIRENT_SIZE + 1); + ole->dirent = info->root_dir = + ole_dirent_new (ole, 0, NULL, seen_before); + g_free (seen_before); + if (ole->dirent == NULL) { + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "Problems reading directory"); + return TRUE; + } + + return FALSE; +} + +static void +gsf_infile_msole_finalize (GObject *obj) +{ + GsfInfileMSOle *ole = GSF_INFILE_MSOLE (obj); + + if (ole->input != NULL) { + g_object_unref (G_OBJECT (ole->input)); + ole->input = NULL; + } + if (ole->info != NULL && + ole->info->sb_file != (GsfInput *)ole) { + ole_info_unref (ole->info); + ole->info = NULL; + } + ols_bat_release (&ole->bat); + + g_free (ole->stream.buf); + + parent_class->finalize (obj); +} + +static GsfInput * +gsf_infile_msole_dup (GsfInput *src_input, GError **err) +{ + GsfInfileMSOle const *src = GSF_INFILE_MSOLE (src_input); + GsfInfileMSOle *dst = ole_dup (src, err); + + if (dst == NULL) + return NULL; + + if (src->bat.block != NULL) { + dst->bat.block = g_new (guint32, src->bat.num_blocks), + memcpy (dst->bat.block, src->bat.block, + sizeof (guint32) * src->bat.num_blocks); + } + dst->bat.num_blocks = src->bat.num_blocks; + dst->dirent = src->dirent; + + return GSF_INPUT (dst); +} + +static guint8 const * +gsf_infile_msole_read (GsfInput *input, size_t num_bytes, guint8 *buffer) +{ + GsfInfileMSOle *ole = GSF_INFILE_MSOLE (input); + gsf_off_t first_block, last_block, raw_block, offset, i; + guint8 const *data; + guint8 *ptr; + size_t count; + + /* small block files are preload */ + if (ole->dirent != NULL && ole->dirent->use_sb) { + if (buffer != NULL) { + memcpy (buffer, ole->stream.buf + input->cur_offset, num_bytes); + return buffer; + } + return ole->stream.buf + input->cur_offset; + } + + /* GsfInput guarantees that num_bytes > 0 */ + first_block = OLE_BIG_BLOCK (input->cur_offset, ole); + last_block = OLE_BIG_BLOCK (input->cur_offset + num_bytes - 1, ole); + offset = input->cur_offset & ole->info->bb.filter; + + /* optimization : are all the raw blocks contiguous */ + i = first_block; + raw_block = ole->bat.block [i]; + while (++i <= last_block && ++raw_block == ole->bat.block [i]) + ; + if (i > last_block) { + /* optimization don't seek if we don't need to */ + if (ole->cur_block != first_block) { + if (gsf_input_seek (ole->input, + (gsf_off_t)(MAX (OLE_HEADER_SIZE, ole->info->bb.size) + (ole->bat.block [first_block] << ole->info->bb.shift) + offset), + G_SEEK_SET) < 0) + return NULL; + } + ole->cur_block = last_block; + return gsf_input_read (ole->input, num_bytes, buffer); + } + + /* damn, we need to copy it block by block */ + if (buffer == NULL) { + if (ole->stream.buf_size < num_bytes) { + g_free (ole->stream.buf); + ole->stream.buf_size = num_bytes; + ole->stream.buf = g_new (guint8, num_bytes); + } + buffer = ole->stream.buf; + } + + ptr = buffer; + for (i = first_block ; i <= last_block ; i++ , ptr += count, num_bytes -= count) { + count = ole->info->bb.size - offset; + if (count > num_bytes) + count = num_bytes; + data = ole_get_block (ole, ole->bat.block [i], NULL); + if (data == NULL) + return NULL; + + /* TODO : this could be optimized to avoid the copy */ + memcpy (ptr, data + offset, count); + offset = 0; + } + ole->cur_block = BAT_MAGIC_UNUSED; + + return buffer; +} + +static gboolean +gsf_infile_msole_seek (GsfInput *input, gsf_off_t offset, GSeekType whence) +{ + GsfInfileMSOle *ole = GSF_INFILE_MSOLE (input); + + (void) offset; + (void) whence; + + ole->cur_block = BAT_MAGIC_UNUSED; + return FALSE; +} + +static GsfInput * +gsf_infile_msole_new_child (GsfInfileMSOle *parent, + MSOleDirent *dirent, GError **err) +{ + GsfInfileMSOle *child; + MSOleInfo *info; + MSOleBAT const *metabat; + GsfInput *sb_file = NULL; + size_t size_guess; + + child = ole_dup (parent, err); + if (!child) + return NULL; + + child->dirent = dirent; + gsf_input_set_size (GSF_INPUT (child), (gsf_off_t) dirent->size); + + /* The root dirent defines the small block file */ + if (dirent->index != 0) { + gsf_input_set_name (GSF_INPUT (child), dirent->name); + gsf_input_set_container (GSF_INPUT (child), GSF_INFILE (parent)); + + if (dirent->is_directory) { + /* be wary. It seems as if some implementations pretend that the + * directories contain data */ + gsf_input_set_size (GSF_INPUT (child), 0); + return GSF_INPUT (child); + } + } + + info = parent->info; + + /* build the bat */ + if (dirent->use_sb) { + metabat = &info->sb.bat; + size_guess = dirent->size >> info->sb.shift; + sb_file = ole_info_get_sb_file (parent); + if (!sb_file) { + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "Failed to access child"); + g_object_unref (G_OBJECT (child)); + return NULL; + } + } else { + metabat = &info->bb.bat; + size_guess = dirent->size >> info->bb.shift; + } + if (ole_make_bat (metabat, size_guess + 1, dirent->first_block, &child->bat)) { + g_object_unref (G_OBJECT (child)); + return NULL; + } + + if (dirent->use_sb) { + unsigned int i; + int remaining; + guint8 const *data; + + g_return_val_if_fail (sb_file != NULL, NULL); + + child->stream.buf_size = remaining = dirent->size; + child->stream.buf = g_new (guint8, child->stream.buf_size); + + for (i = 0 ; remaining > 0 && i < child->bat.num_blocks; i++, remaining -= info->sb.size) + if (gsf_input_seek (GSF_INPUT (sb_file), + (gsf_off_t)(child->bat.block [i] << info->sb.shift), G_SEEK_SET) < 0 || + (data = gsf_input_read (GSF_INPUT (sb_file), + MIN (remaining, (int)info->sb.size), + child->stream.buf + (i << info->sb.shift))) == NULL) { + + g_warning ("failure reading block %d for '%s'", i, dirent->name); + if (err) *err = g_error_new (gsf_input_error_id (), 0, "failure reading block"); + g_object_unref (G_OBJECT (child)); + return NULL; + } + + if (remaining > 0) { + if (err) *err = g_error_new (gsf_input_error_id (), 0, "insufficient blocks"); + g_warning ("Small-block file '%s' has insufficient blocks (%u) for the stated size (%lu)", dirent->name, child->bat.num_blocks, (long)dirent->size); + g_object_unref (G_OBJECT (child)); + return NULL; + } + } + + return GSF_INPUT (child); +} + +static GsfInput * +gsf_infile_msole_child_by_index (GsfInfile *infile, int target, GError **err) +{ + GsfInfileMSOle *ole = GSF_INFILE_MSOLE (infile); + GList *p; + + for (p = ole->dirent->children; p != NULL ; p = p->next) + if (target-- <= 0) + return gsf_infile_msole_new_child (ole, + (MSOleDirent *)p->data, err); + return NULL; +} + +static char const * +gsf_infile_msole_name_by_index (GsfInfile *infile, int target) +{ + GsfInfileMSOle *ole = GSF_INFILE_MSOLE (infile); + GList *p; + + for (p = ole->dirent->children; p != NULL ; p = p->next) + if (target-- <= 0) + return ((MSOleDirent *)p->data)->name; + return NULL; +} + +static GsfInput * +gsf_infile_msole_child_by_name (GsfInfile *infile, char const *name, GError **err) +{ + GsfInfileMSOle *ole = GSF_INFILE_MSOLE (infile); + GList *p; + + for (p = ole->dirent->children; p != NULL ; p = p->next) { + MSOleDirent *dirent = p->data; + if (dirent->name != NULL && !strcmp (name, dirent->name)) + return gsf_infile_msole_new_child (ole, dirent, err); + } + return NULL; +} + +static int +gsf_infile_msole_num_children (GsfInfile *infile) +{ + GsfInfileMSOle *ole = GSF_INFILE_MSOLE (infile); + + g_return_val_if_fail (ole->dirent != NULL, -1); + + if (!ole->dirent->is_directory) + return -1; + return g_list_length (ole->dirent->children); +} + +static void +gsf_infile_msole_init (GObject *obj) +{ + GsfInfileMSOle *ole = GSF_INFILE_MSOLE (obj); + + ole->input = NULL; + ole->info = NULL; + ole->bat.block = NULL; + ole->bat.num_blocks = 0; + ole->cur_block = BAT_MAGIC_UNUSED; + ole->stream.buf = NULL; + ole->stream.buf_size = 0; +} + +static void +gsf_infile_msole_class_init (GObjectClass *gobject_class) +{ + GsfInputClass *input_class = GSF_INPUT_CLASS (gobject_class); + GsfInfileClass *infile_class = GSF_INFILE_CLASS (gobject_class); + + gobject_class->finalize = gsf_infile_msole_finalize; + input_class->Dup = gsf_infile_msole_dup; + input_class->Read = gsf_infile_msole_read; + input_class->Seek = gsf_infile_msole_seek; + infile_class->num_children = gsf_infile_msole_num_children; + infile_class->name_by_index = gsf_infile_msole_name_by_index; + infile_class->child_by_index = gsf_infile_msole_child_by_index; + infile_class->child_by_name = gsf_infile_msole_child_by_name; + + parent_class = g_type_class_peek_parent (gobject_class); +} + +GSF_CLASS (GsfInfileMSOle, gsf_infile_msole, + gsf_infile_msole_class_init, gsf_infile_msole_init, + GSF_INFILE_TYPE) + +/** + * gsf_infile_msole_new : + * @source: #GsfInput + * @err: optional place to store an error + * + * Opens the root directory of an MS OLE file. + * This adds a reference to @source. + * + * Returns: the new ole file handler + **/ +GsfInfile * +gsf_infile_msole_new (GsfInput *source, GError **err) +{ + GsfInfileMSOle *ole; + gsf_off_t calling_pos; + + g_return_val_if_fail (GSF_IS_INPUT (source), NULL); + + ole = (GsfInfileMSOle *)g_object_new (GSF_INFILE_MSOLE_TYPE, NULL); + if (G_UNLIKELY (NULL == ole)) return NULL; + + ole->input = gsf_input_proxy_new (source); + gsf_input_set_size (GSF_INPUT (ole), 0); + + calling_pos = gsf_input_tell (source); + if (ole_init_info (ole, err)) { + /* We do this so other kinds of archives can be tried. */ + (void)gsf_input_seek (source, calling_pos, G_SEEK_SET); + + g_object_unref (G_OBJECT (ole)); + return NULL; + } + + return GSF_INFILE (ole); +} + +/** + * gsf_infile_msole_get_class_id : + * @ole: a #GsfInfileMSOle + * @res: 16 byte identifier (often a GUID in MS Windows apps) + * + * Retrieves the 16 byte indentifier (often a GUID in MS Windows apps) + * stored within the directory associated with @ole and stores it in @res. + * + * Returns: TRUE on success + **/ +gboolean +gsf_infile_msole_get_class_id (GsfInfileMSOle const *ole, guint8 *res) +{ + g_return_val_if_fail (ole != NULL && ole->dirent != NULL, FALSE); + + memcpy (res, ole->dirent->clsid, + sizeof(ole->dirent->clsid)); + return TRUE; +} diff --git a/gsf/gsf-infile-msole.h b/gsf/gsf-infile-msole.h new file mode 100644 index 0000000..0820da3 --- /dev/null +++ b/gsf/gsf-infile-msole.h @@ -0,0 +1,45 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-infile-msole.h: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_INFILE_MSOLE_H +#define GSF_INFILE_MSOLE_H + +#include +#include + +G_BEGIN_DECLS + +typedef struct _GsfInfileMSOle GsfInfileMSOle; + +#define GSF_INFILE_MSOLE_TYPE (gsf_infile_msole_get_type ()) +#define GSF_INFILE_MSOLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_INFILE_MSOLE_TYPE, GsfInfileMSOle)) +#define GSF_IS_INFILE_MSOLE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_INFILE_MSOLE_TYPE)) + +GType gsf_infile_msole_get_type (void) G_GNUC_CONST; +/* void gsf_infile_msole_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfInfile *gsf_infile_msole_new (GsfInput *source, GError **err); +gboolean gsf_infile_msole_get_class_id (GsfInfileMSOle const *ole, + guint8 *res); + +G_END_DECLS + +#endif /* GSF_INFILE_MSOLE_H */ diff --git a/gsf/gsf-infile-msvba.c b/gsf/gsf-infile-msvba.c new file mode 100644 index 0000000..de73dc4 --- /dev/null +++ b/gsf/gsf-infile-msvba.c @@ -0,0 +1,545 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-infile-msvba.c : + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +/* Info extracted from + * svx/source/msfilter/msvbasic.cxx + * Costin Raiu, Kaspersky Labs, 'Apple of Discord' + * Virus bulletin's bontchev.pdf, svajcer.pdf + * + * and lots and lots of reading. There are lots of pieces missing still + * but the structure seems to hold together. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +static GObjectClass *parent_class; + +struct _GsfInfileMSVBA { + GsfInfile parent; + + GsfInfile *source; + GList *children; + + GHashTable *modules; +}; +typedef GsfInfileClass GsfInfileMSVBAClass; + +#define GSF_INFILE_MSVBA_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSF_INFILE_MSVBA_TYPE, GsfInfileMSVBAClass)) +#define GSF_IS_INFILE_MSVBA_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSF_INFILE_MSVBA_TYPE)) + +static guint8 * +gsf_vba_inflate (GsfInput *input, gsf_off_t offset, int *size, gboolean add_null_terminator) +{ + GByteArray *res = gsf_msole_inflate (input, offset + 3); + if (res == NULL) + return NULL; + *size = res->len; + if (add_null_terminator) + g_byte_array_append (res, "", 1); + return g_byte_array_free (res, FALSE); +} + +static void +vba_extract_module_source (GsfInfileMSVBA *vba, char const *name, guint32 src_offset) +{ + GsfInput *module; + guint8 *code; + int inflated_size; + + g_return_if_fail (name != NULL); + + module = gsf_infile_child_by_name (vba->source, name); + if (module == NULL) + return; + + code = gsf_vba_inflate (module, (gsf_off_t) src_offset, &inflated_size, TRUE); + if (code != NULL) { + if (NULL == vba->modules) + vba->modules = g_hash_table_new_full (g_str_hash, g_str_equal, + (GDestroyNotify)g_free, (GDestroyNotify)g_free); + g_hash_table_insert (vba->modules, g_strdup (name), code); + } else + g_warning ("Problems extracting the source for %s @ %u", name, src_offset); + + g_object_unref (module); +} + +/** + * vba_dir_read : + * @vba : #GsfInfileMSVBA + * @err : optionally NULL + * + * Read an VBA dirctory and its project file. + * along the way. + * + * Returns: %FALSE on error setting @err if it is supplied. + **/ +static gboolean +vba_dir_read (GsfInfileMSVBA *vba, GError **err) +{ + int inflated_size, element_count = -1; + char const *msg = NULL; + char *name, *elem_stream = NULL; + guint32 len; + guint16 tag; + guint8 *inflated_data, *end, *ptr; + GsfInput *dir; + gboolean failed = TRUE; + + /* 0. get the stream */ + dir = gsf_infile_child_by_name (vba->source, "dir"); + if (dir == NULL) { + msg = "Can't find the VBA directory stream."; + goto fail_stream; + } + + /* 1. decompress it */ + ptr = inflated_data = gsf_vba_inflate (dir, 0, &inflated_size, FALSE); + if (inflated_data == NULL) + goto fail_compression; + end = inflated_data + inflated_size; + + /* 2. GUESS : based on several xls with macros and XL8GARY this looks like a + * series of sized records. Be _extra_ careful */ + do { + /* I have seen + * type len data + * 1 4 1 0 0 0 + * 2 4 9 4 0 0 + * 3 2 4 e4 + * 4 project name + * 5 0 + * 6 0 + * 7 4 + * 8 4 + * 0x3d 0 + * 0x40 0 + * 0x14 4 9 4 0 0 + * + * 0x0f == number of elements + * 0x1c == (Size 0) + * 0x1e == (Size 4) + * 0x48 == (Size 0) + * 0x31 == stream offset of the compressed source ! + * + * 0x16 == an ascii dependency name + * 0x3e == a unicode dependency name + * 0x33 == a classid for a dependency with no trialing data + * + * 0x2f == a dummy classid + * 0x30 == a classid + * 0x0d == the classid + * 0x2f, and 0x0d appear contain + * uint32 classid_size; + * + * 00 00 00 00 00 00 + * and sometimes some trailing junk + **/ + if ((ptr + 6) > end) { + msg = "vba project header problem"; + goto fail_content; + } + tag = GSF_LE_GET_GUINT16 (ptr); + len = GSF_LE_GET_GUINT32 (ptr + 2); + + ptr += 6; + if ((ptr + len) > end) { + msg = "vba project header problem"; + goto fail_content; + } + + switch (tag) { + case 4: + name = g_strndup (ptr, len); +#ifdef OLD_VBA_DUMP + puts (""); + printf ("", name); +#endif + g_free (name); + break; + case 9: + /* this seems to have an extra two bytes that are not + * part of the length ..?? */ + len += 2; + break; + case 0xf : + if (len != 2) { + g_warning ("element count is not what we expected"); + break; + } + if (element_count >= 0) { + g_warning ("More than one element count ??"); + break; + } + element_count = GSF_LE_GET_GUINT16 (ptr); + break; + + /* dependencies */ + case 0x0d : break; + case 0x2f : break; + case 0x30 : break; + case 0x33 : break; + case 0x3e : break; + case 0x16: +#if 0 + name = g_strndup (ptr, len); + g_print ("Depend Name : '%s'\n", name); + g_free (name); +#endif + break; + + /* elements */ + case 0x47 : break; + case 0x32 : break; + case 0x1a: +#if 0 + name = g_strndup (ptr, len); + g_print ("Element Name : '%s'\n", name); + g_free (name); +#endif + break; + case 0x19: elem_stream = g_strndup (ptr, len); break; + + case 0x31: + if (len != 4) { + g_warning ("source offset property is not what we expected"); + break; + } + vba_extract_module_source (vba, elem_stream, + GSF_LE_GET_GUINT32 (ptr)); + g_free (elem_stream); elem_stream = NULL; + element_count--; + break; + + default : +#if 0 + g_print ("tag %hx : len %u\n", tag, len); + gsf_mem_dump (ptr, len); +#endif + break; + } + + ptr += len; + } while (tag != 0x10); + g_free (elem_stream); + + if (element_count != 0) + g_warning ("Number of elements differs from expectations"); + + failed = FALSE; + +fail_content : + g_free (inflated_data); +#ifdef OLD_VBA_DUMP + puts (""); +#endif + +fail_compression : + g_object_unref (G_OBJECT (dir)); +fail_stream : + + if (failed) { + if (err != NULL) + *err = g_error_new_literal (gsf_input_error_id (), 0, msg); + return FALSE; + } + return TRUE; +} + +#define VBA56_DIRENT_RECORD_COUNT (2 + /* magic */ \ + 4 + /* version */ \ + 2 + /* 0x00 0xff */ \ + 22) /* unknown */ +#define VBA56_DIRENT_HEADER_SIZE (VBA56_DIRENT_RECORD_COUNT + \ + 2 + /* type1 record count */ \ + 2) /* unknown */ + +#if 0 +/** + * vba_project_read : + * @vba : #GsfInfileMSVBA + * @err : optionally NULL + * + * Read an VBA dirctory and its project file. + * along the way. + * + * Returns: %FALSE on error setting @err if it is supplied. + **/ +static gboolean +vba_project_read (GsfInfileMSVBA *vba, GError **err) +{ + /* NOTE : This seems constant, find some confirmation */ + static guint8 const signature[] = { 0xcc, 0x61 }; + static struct { + guint8 const signature[4]; + char const * const name; + int const vba_version; + gboolean const is_mac; + } const versions [] = { + { { 0x5e, 0x00, 0x00, 0x01 }, "Office 97", 5, FALSE}, + { { 0x5f, 0x00, 0x00, 0x01 }, "Office 97 SR1", 5, FALSE }, + { { 0x65, 0x00, 0x00, 0x01 }, "Office 2000 alpha?", 6, FALSE }, + { { 0x6b, 0x00, 0x00, 0x01 }, "Office 2000 beta?", 6, FALSE }, + { { 0x6d, 0x00, 0x00, 0x01 }, "Office 2000", 6, FALSE }, + { { 0x6f, 0x00, 0x00, 0x01 }, "Office 2000", 6, FALSE }, + { { 0x70, 0x00, 0x00, 0x01 }, "Office XP beta 1/2", 6, FALSE }, + { { 0x73, 0x00, 0x00, 0x01 }, "Office XP", 6, FALSE }, + { { 0x76, 0x00, 0x00, 0x01 }, "Office 2003", 6, FALSE }, + { { 0x79, 0x00, 0x00, 0x01 }, "Office 2003", 6, FALSE }, + { { 0x60, 0x00, 0x00, 0x0e }, "MacOffice 98", 5, TRUE }, + { { 0x62, 0x00, 0x00, 0x0e }, "MacOffice 2001", 5, TRUE }, + { { 0x63, 0x00, 0x00, 0x0e }, "MacOffice X", 6, TRUE }, + { { 0x64, 0x00, 0x00, 0x0e }, "MacOffice 2004", 6, TRUE }, + }; + + guint8 const *data; + unsigned i, count, len; + gunichar2 *uni_name; + char *name; + GsfInput *dir; + + dir = gsf_infile_child_by_name (vba->source, "dir"); + if (dir == NULL) { + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "Can't find the VBA directory stream."); + return FALSE; + } + + if (gsf_input_seek (dir, 0, G_SEEK_SET) || + NULL == (data = gsf_input_read (dir, VBA56_DIRENT_HEADER_SIZE, NULL)) || + 0 != memcmp (data, signature, sizeof (signature))) { + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "No VBA signature"); + return FALSE; + } + + for (i = 0 ; i < G_N_ELEMENTS (versions); i++) + if (!memcmp (data+2, versions[i].signature, 4)) + break; + + if (i >= G_N_ELEMENTS (versions)) { + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "Unknown VBA version signature 0x%x%x%x%x", + data[2], data[3], data[4], data[5]); + return FALSE; + } + + puts (versions[i].name); + + /* these depend strings seem to come in 2 blocks */ + count = GSF_LE_GET_GUINT16 (data + VBA56_DIRENT_RECORD_COUNT); + for (; count > 0 ; count--) { + if (NULL == ((data = gsf_input_read (dir, 2, NULL)))) + break; + len = GSF_LE_GET_GUINT16 (data); + if (NULL == ((data = gsf_input_read (dir, len, NULL)))) { + printf ("len == 0x%x ??\n", len); + break; + } + + uni_name = g_new0 (gunichar2, len/2 + 1); + + /* be wary about endianness */ + for (i = 0 ; i < len ; i += 2) + uni_name [i/2] = GSF_LE_GET_GUINT16 (data + i); + name = g_utf16_to_utf8 (uni_name, -1, NULL, NULL, NULL); + g_free (uni_name); + + printf ("%d %s\n", count, name); + + /* ignore this blob ???? */ + if (!strncmp ("*\\G", name, 3)) { + if (NULL == ((data = gsf_input_read (dir, 12, NULL)))) { + printf ("len == 0x%x ??\n", len); + break; + } + } + + g_free (name); + } + + g_return_val_if_fail (count == 0, FALSE); + + return TRUE; +} +#endif + +static void +gsf_infile_msvba_finalize (GObject *obj) +{ + GsfInfileMSVBA *vba = GSF_INFILE_MSVBA (obj); + + if (NULL != vba->modules) { + g_hash_table_destroy (vba->modules); + vba->modules = NULL; + } + if (vba->source != NULL) { + g_object_unref (G_OBJECT (vba->source)); + vba->source = NULL; + } + parent_class->finalize (obj); +} + +static void +gsf_infile_msvba_init (GObject *obj) +{ + GsfInfileMSVBA *vba = GSF_INFILE_MSVBA (obj); + + vba->source = NULL; + vba->modules = NULL; + vba->children = NULL; +} + +static void +gsf_infile_msvba_class_init (GObjectClass *gobject_class) +{ + gobject_class->finalize = gsf_infile_msvba_finalize; + parent_class = g_type_class_peek_parent (gobject_class); +} + +GSF_CLASS (GsfInfileMSVBA, gsf_infile_msvba, + gsf_infile_msvba_class_init, gsf_infile_msvba_init, + GSF_INFILE_TYPE) + +GsfInfile * +gsf_infile_msvba_new (GsfInfile *source, GError **err) +{ + GsfInfileMSVBA *vba; + + g_return_val_if_fail (GSF_IS_INFILE (source), NULL); + + vba = g_object_new (GSF_INFILE_MSVBA_TYPE, NULL); + if (G_UNLIKELY (NULL == vba)) return NULL; + + g_object_ref (G_OBJECT (source)); + vba->source = source; + + /* vba_project_read (vba, err); */ + + /* find the name offset pairs */ + if (vba_dir_read (vba, err)) + return GSF_INFILE (vba); + + if (err != NULL && *err == NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "Unable to parse VBA header"); + + g_object_unref (G_OBJECT (vba)); + return NULL; +} + +/** + * gsf_infile_msvba_get_modules : + * @vba_stream : #GsfInfile + * + * a collection of names and source code. + * + * Returns: %NULL, or a hashtable of names and source code (unknown encoding). + **/ +GHashTable * +gsf_infile_msvba_get_modules (GsfInfileMSVBA const *vba_stream) +{ + g_return_val_if_fail (GSF_IS_INFILE_MSVBA (vba_stream), NULL); + return vba_stream->modules; +} + +/** + * gsf_infile_msvba_steal_modules : + * @vba_stream : #GsfInfile + * + * A collection of names and source code which the caller is responsible for destroying. + * + * Returns: %NULL, or a hashtable of names and source code (unknown encoding). + **/ +GHashTable * +gsf_infile_msvba_steal_modules (GsfInfileMSVBA *vba_stream) +{ + GHashTable *res; + g_return_val_if_fail (GSF_IS_INFILE_MSVBA (vba_stream), NULL); + res = vba_stream->modules; + vba_stream->modules = NULL; + return res; +} + +/** + * gsf_input_find_vba : + * @input : #GsfInput + * @err : #GError, optionally %NULL. + * + * A utility routine that attempts to find the VBA file withint a stream. + * + * Returns: a GsfInfileMSVBA *gsf_input_find_vba (GsfInput *input, GError *err); + **/ +GsfInfileMSVBA * +gsf_input_find_vba (GsfInput *input, GError **err) +{ + GsfInput *vba = NULL; + GsfInfile *infile; + + if (NULL != (infile = gsf_infile_msole_new (input, NULL))) { + /* 1) Try XLS */ + vba = gsf_infile_child_by_vname (infile, "_VBA_PROJECT_CUR", "VBA", NULL); + /* 2) DOC */ + if (NULL == vba) + vba = gsf_infile_child_by_vname (infile, "Macros", "VBA", NULL); + + /* TODO : PPT is more complex */ + + g_object_unref (G_OBJECT (infile)); + } else if (NULL != (infile = gsf_infile_zip_new (input, NULL))) { + GsfInput *main_part = gsf_open_pkg_get_rel_by_type (GSF_INPUT (infile), + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"); + + if (NULL != main_part) { + GsfInput *vba_stream = gsf_open_pkg_get_rel_by_type (main_part, + "http://schemas.microsoft.com/office/2006/relationships/vbaProject"); + if (NULL != vba_stream) { + GsfInfile *ole = gsf_infile_msole_new (vba_stream, err); + if (NULL != ole) { + vba = gsf_infile_child_by_vname (ole, "VBA", NULL); + g_object_unref (G_OBJECT (ole)); + } + g_object_unref (G_OBJECT (vba_stream)); + } + g_object_unref (G_OBJECT (main_part)); + } + g_object_unref (G_OBJECT (infile)); + } + + if (NULL != vba) + return (GsfInfileMSVBA *) + gsf_infile_msvba_new (GSF_INFILE (vba), err); + return NULL; +} diff --git a/gsf/gsf-infile-msvba.h b/gsf/gsf-infile-msvba.h new file mode 100644 index 0000000..d9ec7e1 --- /dev/null +++ b/gsf/gsf-infile-msvba.h @@ -0,0 +1,48 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-infile-msvba.h: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_INFILE_MSVBA_H +#define GSF_INFILE_MSVBA_H + +#include +#include + +G_BEGIN_DECLS + +typedef struct _GsfInfileMSVBA GsfInfileMSVBA; + +#define GSF_INFILE_MSVBA_TYPE (gsf_infile_msvba_get_type ()) +#define GSF_INFILE_MSVBA(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_INFILE_MSVBA_TYPE, GsfInfileMSVBA)) +#define GSF_IS_INFILE_MSVBA(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_INFILE_MSVBA_TYPE)) + +GType gsf_infile_msvba_get_type (void) G_GNUC_CONST; +/* void gsf_infile_msvba_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfInfile *gsf_infile_msvba_new (GsfInfile *source, GError **err); +GHashTable *gsf_infile_msvba_get_modules (GsfInfileMSVBA const *vba_stream); +GHashTable *gsf_infile_msvba_steal_modules (GsfInfileMSVBA *vba_stream); + +/* Utility */ +GsfInfileMSVBA *gsf_input_find_vba (GsfInput *input, GError **err); + +G_END_DECLS + +#endif /* GSF_INFILE_MSVBA_H */ diff --git a/gsf/gsf-infile-stdio.c b/gsf/gsf-infile-stdio.c new file mode 100644 index 0000000..09379bf --- /dev/null +++ b/gsf/gsf-infile-stdio.c @@ -0,0 +1,205 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-infile-stdio.c: read a directory tree + * + * Copyright (C) 2004-2006 Novell, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#include +#include +#include + +static GObjectClass *parent_class; + +struct _GsfInfileStdio { + GsfInfile parent; + char *root; + GList *children; +}; + +typedef GsfInfileClass GsfInfileStdioClass; + +static void +gsf_infile_stdio_finalize (GObject *obj) +{ + GsfInfileStdio *ifs = GSF_INFILE_STDIO (obj); + + g_free (ifs->root); + g_list_foreach (ifs->children, (GFunc) g_free, NULL); + g_list_free (ifs->children); + + parent_class->finalize (obj); +} + +static GsfInput * +gsf_infile_stdio_dup (GsfInput *src_input, G_GNUC_UNUSED GError **err) +{ + GList *ptr; + GsfInfileStdio *src = GSF_INFILE_STDIO (src_input); + + GsfInfileStdio *dst = g_object_new (GSF_INFILE_STDIO_TYPE, NULL); + if (G_UNLIKELY (NULL == dst)) return NULL; + + dst->root = g_strdup (src->root); + + for (ptr = src->children; ptr != NULL ; ptr = ptr->next) + dst->children = g_list_prepend (dst->children, + g_strdup (ptr->data)); + dst->children = g_list_reverse (dst->children); + return GSF_INPUT (dst); +} + +static guint8 const * +gsf_infile_stdio_read (G_GNUC_UNUSED GsfInput *input, G_GNUC_UNUSED size_t num_bytes, + G_GNUC_UNUSED guint8 *buffer) +{ + return NULL; +} + +static GsfInput * +open_child (GsfInfileStdio *ifs, char const *name, GError **err) +{ + GsfInput *child; + char *path = g_build_filename (ifs->root, name, NULL); + + if (g_file_test (path, G_FILE_TEST_IS_DIR)) + child = (GsfInput *) gsf_infile_stdio_new (path, err); + else + child = gsf_input_stdio_new (path, err); + g_free (path); + + return child; +} + +static GsfInput * +gsf_infile_stdio_child_by_index (GsfInfile *infile, int target, GError **err) +{ + GsfInfileStdio *ifs = GSF_INFILE_STDIO (infile); + char const *name = g_list_nth_data (ifs->children, target); + + if (!name) + return NULL; + + return open_child (ifs, name, err); +} + +static char const * +gsf_infile_stdio_name_by_index (GsfInfile *infile, int target) +{ + GsfInfileStdio *ifs = GSF_INFILE_STDIO (infile); + + return g_list_nth_data (ifs->children, target); +} + +static GsfInput * +gsf_infile_stdio_child_by_name (GsfInfile *infile, char const *name, GError **err) +{ + GsfInfileStdio *ifs = GSF_INFILE_STDIO (infile); + GList *ptr; + + for (ptr = ifs->children; ptr != NULL; ptr = ptr->next) + if (!strcmp (ptr->data, name)) + return open_child (ifs, name, err); + + return NULL; +} + +static int +gsf_infile_stdio_num_children (GsfInfile *infile) +{ + GsfInfileStdio *ifs = GSF_INFILE_STDIO (infile); + + return g_list_length (ifs->children); +} + +static void +gsf_infile_stdio_init (GsfInfileStdio *ifs) +{ + ifs->root = NULL; + ifs->children = NULL; +} + +static void +gsf_infile_stdio_class_init (GObjectClass *gobject_class) +{ + GsfInputClass *input_class = GSF_INPUT_CLASS (gobject_class); + GsfInfileClass *infile_class = GSF_INFILE_CLASS (gobject_class); + + parent_class = g_type_class_peek (GSF_INFILE_TYPE); + + gobject_class->finalize = gsf_infile_stdio_finalize; + input_class->Dup = gsf_infile_stdio_dup; + input_class->Read = gsf_infile_stdio_read; + input_class->Seek = NULL; + infile_class->num_children = gsf_infile_stdio_num_children; + infile_class->name_by_index = gsf_infile_stdio_name_by_index; + infile_class->child_by_index = gsf_infile_stdio_child_by_index; + infile_class->child_by_name = gsf_infile_stdio_child_by_name; +} + +GSF_CLASS (GsfInfileStdio, gsf_infile_stdio, + gsf_infile_stdio_class_init, gsf_infile_stdio_init, + GSF_INFILE_TYPE) + +/** + * gsf_infile_stdio_new : + * @root : in locale dependent encoding + * @err : optionally %NULL. + * + * Returns: a new file or %NULL. + **/ +GsfInfile * +gsf_infile_stdio_new (char const *root, GError **err) +{ + GsfInfileStdio *ifs; + GDir *dir; + char const *child; + + ifs = g_object_new (GSF_INFILE_STDIO_TYPE, NULL); + if (G_UNLIKELY (NULL == ifs)) return NULL; + + dir = g_dir_open (root, 0, err); + if (dir == NULL) + return NULL; + + ifs->root = g_strdup (root); + + while ((child = g_dir_read_name (dir))) + ifs->children = g_list_prepend (ifs->children, + g_strdup (child)); + g_dir_close (dir); + + gsf_input_set_name_from_filename (GSF_INPUT (ifs), root); + + return GSF_INFILE (ifs); +} diff --git a/gsf/gsf-infile-stdio.h b/gsf/gsf-infile-stdio.h new file mode 100644 index 0000000..8d37d8b --- /dev/null +++ b/gsf/gsf-infile-stdio.h @@ -0,0 +1,43 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-infile-stdio.h: + * + * Copyright (C) 2004-2006 Novell, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_INFILE_STDIO_H +#define GSF_INFILE_STDIO_H + +#include +#include + +G_BEGIN_DECLS + +typedef struct _GsfInfileStdio GsfInfileStdio; + +#define GSF_INFILE_STDIO_TYPE (gsf_infile_stdio_get_type ()) +#define GSF_INFILE_STDIO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_INFILE_STDIO_TYPE, GsfInfileStdio)) +#define GSF_IS_INFILE_STDIO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_INFILE_STDIO_TYPE)) + +GType gsf_infile_stdio_get_type (void) G_GNUC_CONST; +/* void gsf_infile_stdio_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfInfile *gsf_infile_stdio_new (char const *root, GError **err); + +G_END_DECLS + +#endif /* GSF_INFILE_STDIO_H */ diff --git a/gsf/gsf-infile-tar.c b/gsf/gsf-infile-tar.c new file mode 100644 index 0000000..febc9ac --- /dev/null +++ b/gsf/gsf-infile-tar.c @@ -0,0 +1,584 @@ +/* + * gsf-infile-tar.c : + * + * Copyright (C) 2008 Morten Welinder (terra@gnome.org) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 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 St, Fifth Floor, Boston, MA 02110-1301 USA + * + * TODO: + * symlinks + * hardlinks + * weird headers + */ + +#include +#include +#include +#include +#include +#include + +#include + +#undef G_LOG_DOMAIN +#define G_LOG_DOMAIN "libgsf:tar" + +static void gsf_infile_tar_set_source (GsfInfileTar *tar, GsfInput *src); + +enum { + PROP_0, + PROP_SOURCE +}; + +static GObjectClass *parent_class; + +typedef struct { + char *name; + + /* The location of data. */ + gsf_off_t offset; + gsf_off_t length; + + /* The directory object, or NULL for a data file. */ + GsfInfileTar *dir; +} TarChild; + +/* tar header from POSIX 1003.1-1990. */ +typedef struct { + char name[100]; /* 0 */ + char mode[8]; /* 100 (octal) */ + char uid[8]; /* 108 (octal) */ + char gid[8]; /* 116 (octal) */ + char size[12]; /* 124 (octal) */ + char mtime[12]; /* 136 (octal) */ + char chksum[8]; /* 148 (octal) */ + char typeflag; /* 156 */ + char linkname[100]; /* 157 */ + char magic[6]; /* 257 */ + char version[2]; /* 263 */ + char uname[32]; /* 265 */ + char gname[32]; /* 297 */ + char devmajor[8]; /* 329 (octal) */ + char devminor[8]; /* 337 (octal) */ + char prefix[155]; /* 345 */ + char filler[12]; /* 500 */ +} TarHeader; + +#define HEADER_SIZE (sizeof (TarHeader)) +#define BLOCK_SIZE 512 +#define MAGIC_LONGNAME "././@LongLink" + +struct _GsfInfileTar { + GsfInfile parent; + + GsfInput *source; + GArray *children; /* of TarChild */ + GError *err; +}; + +typedef struct { + GsfInfileClass parent_class; +} GsfInfileTarClass; + +#define GSF_INFILE_TAR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSF_INFILE_TAR_TYPE, GsfInfileTarClass)) +#define GSF_IS_INFILE_TAR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSF_INFILE_TAR_TYPE)) + +static gsf_off_t +unpack_octal (GsfInfileTar *tar, const char *s, size_t len) +{ + gsf_off_t res = 0; + + while (len--) { + unsigned char c = *s++; + if (c == 0) + break; + if (c < '0' || c > '7') { + tar->err = g_error_new (gsf_input_error_id (), 0, + "Invalid tar header"); + return 0; + } + res = (res << 3) + (c - '0'); + } + + return res; +} + + +static GsfInfileTar * +tar_create_dir (GsfInfileTar *dir, const char *name) +{ + TarChild c; + + c.offset = 0; + c.length = 0; + c.name = g_strdup (name); + c.dir = g_object_new (GSF_INFILE_TAR_TYPE, NULL); + + /* + * We set the source here, so gsf_infile_tar_constructor doesn't + * start reading the tarfile recursively. + */ + gsf_infile_tar_set_source (c.dir, dir->source); + + gsf_input_set_name (GSF_INPUT (c.dir), name); + + g_array_append_val (dir->children, c); + + return c.dir; +} + +static GsfInfileTar * +tar_directory_for_file (GsfInfileTar *dir, const char *name, gboolean last) +{ + const char *s = name; + + while (1) { + const char *s0 = s; + char *dirname; + + /* Find a directory component, if any. */ + while (1) { + if (*s == 0) { + if (last && s != s0) + break; + else + return dir; + } + /* This is deliberately slash-only. */ + if (*s == '/') + break; + s++; + } + + dirname = g_strndup (s0, s - s0); + while (*s == '/') + s++; + + if (strcmp (dirname, ".") != 0) { + GsfInput *subdir = + gsf_infile_child_by_name (GSF_INFILE (dir), + dirname); + if (subdir) { + /* Undo the ref. */ + g_object_unref (subdir); + dir = GSF_INFILE_TAR (subdir); + } else + dir = tar_create_dir (dir, dirname); + } + + g_free (dirname); + } +} + + +/*****************************************************************************/ + +/** + * tar_init_info : + * @tar : #GsfInfileTar + * + * Read tar headers and do some sanity checking + * along the way. + **/ +static void +tar_init_info (GsfInfileTar *tar) +{ + TarHeader end; + const TarHeader *header; + gsf_off_t pos0 = gsf_input_tell (tar->source); + char *pending_longname = NULL; + + memset (&end, 0, sizeof (end)); + + while (tar->err == NULL && + (header = (const TarHeader *)gsf_input_read (tar->source, + HEADER_SIZE, + NULL))) { + char *name; + gsf_off_t length; + gsf_off_t offset; + + if (memcmp (header->filler, end.filler, sizeof (end.filler))) { + tar->err = g_error_new (gsf_input_error_id (), 0, + "Invalid tar header"); + break; + } + + if (memcmp (header, &end, HEADER_SIZE) == 0) + break; + + if (pending_longname) { + name = pending_longname; + pending_longname = NULL; + } else + name = g_strndup (header->name, sizeof (header->name)); + length = unpack_octal (tar, header->size, sizeof (header->size)); + offset = gsf_input_tell (tar->source); + +#if 0 + g_printerr ("[%s]: %d\n", name, (int)length); +#endif + + switch (header->typeflag) { + case '0': case 0: { + /* Regular file. */ + GsfInfileTar *dir; + const char *n = name, *s; + TarChild c; + + /* This is deliberately slash-only. */ + while ((s = strchr (n, '/'))) + n = s + 1; + c.name = g_strdup (n); + c.offset = offset; + c.length = length; + c.dir = NULL; + dir = tar_directory_for_file (tar, name, FALSE); + g_array_append_val (dir->children, c); + break; + } + case '5': { + /* Directory */ + (void)tar_directory_for_file (tar, name, TRUE); + break; + } + case 'L': { + const char *n; + + if (pending_longname || + strcmp (name, MAGIC_LONGNAME) != 0) { + tar->err = g_error_new (gsf_input_error_id (), 0, + "Invalid longname header"); + break; + } + + n = gsf_input_read (tar->source, length, NULL); + if (!n) { + tar->err = g_error_new (gsf_input_error_id (), 0, + "Failed to read longname"); + break; + } + + pending_longname = g_strndup (n, length); + break; + } + default: + /* Other -- ignore */ + break; + } + + g_free (name); + + /* Round up to block size */ + length = (length + (BLOCK_SIZE - 1)) / BLOCK_SIZE * BLOCK_SIZE; + + if (!tar->err && + gsf_input_seek (tar->source, offset + length, G_SEEK_SET)) { + tar->err = g_error_new (gsf_input_error_id (), 0, + "Seek failed"); + break; + } + } + + if (pending_longname) { + if (!tar->err) + tar->err = g_error_new (gsf_input_error_id (), 0, + "Truncated archive"); + g_free (pending_longname); + } + + if (tar->err) + gsf_input_seek (tar->source, pos0, G_SEEK_SET); +} + + +/* GsfInput class functions */ + +static GsfInput * +gsf_infile_tar_dup (GsfInput *src_input, GError **err) +{ + GsfInfileTar *res, *src; + unsigned ui; + + src = GSF_INFILE_TAR (src_input); + if (src->err) { + if (err) + *err = g_error_copy (src->err); + return NULL; + } + + res = (GsfInfileTar *)g_object_new (GSF_INFILE_TAR_TYPE, NULL); + gsf_infile_tar_set_source (res, src->source); + + for (ui = 0; ui < src->children->len; ui++) { + /* This copies the structure. */ + TarChild c = g_array_index (src->children, TarChild, ui); + c.name = g_strdup (c.name); + if (c.dir) g_object_ref (c.dir); + g_array_append_val (res->children, c); + } + + return NULL; +} + +static guint8 const * +gsf_infile_tar_read (GsfInput *input, size_t num_bytes, guint8 *buffer) +{ + (void)input; + (void)num_bytes; + (void)buffer; + return NULL; +} + +static gboolean +gsf_infile_tar_seek (GsfInput *input, gsf_off_t offset, GSeekType whence) +{ + (void)input; + (void)offset; + (void)whence; + return FALSE; +} + +/* GsfInfile class functions */ + +/*****************************************************************************/ + +static GsfInput * +gsf_infile_tar_child_by_index (GsfInfile *infile, int target, GError **err) +{ + GsfInfileTar *tar = GSF_INFILE_TAR (infile); + const TarChild *c; + + if (err) + *err = NULL; + + if (target < 0 || (unsigned)target >= tar->children->len) + return NULL; + + c = &g_array_index (tar->children, TarChild, target); + if (c->dir) + return g_object_ref (c->dir); + else { + GsfInput *input = gsf_input_proxy_new_section (tar->source, + c->offset, + c->length); + gsf_input_set_name (input, c->name); + return input; + } +} + +static char const * +gsf_infile_tar_name_by_index (GsfInfile *infile, int target) +{ + GsfInfileTar *tar = GSF_INFILE_TAR (infile); + + if (target < 0 || (unsigned)target >= tar->children->len) + return NULL; + + return g_array_index (tar->children, TarChild, target).name; +} + +static GsfInput * +gsf_infile_tar_child_by_name (GsfInfile *infile, char const *name, GError **err) +{ + GsfInfileTar *tar = GSF_INFILE_TAR (infile); + unsigned ui; + + for (ui = 0; ui < tar->children->len; ui++) { + const TarChild *c = &g_array_index (tar->children, + TarChild, + ui); + if (strcmp (name, c->name) == 0) + return gsf_infile_tar_child_by_index (infile, ui, err); + } + + return NULL; +} + +static int +gsf_infile_tar_num_children (GsfInfile *infile) +{ + GsfInfileTar *tar = GSF_INFILE_TAR (infile); + + return tar->children->len; +} + +static void +gsf_infile_tar_finalize (GObject *obj) +{ + GsfInfileTar *tar = GSF_INFILE_TAR (obj); + + if (tar->source != NULL) { + g_object_unref (G_OBJECT (tar->source)); + tar->source = NULL; + } + + if (tar->children) { + unsigned ui; + for (ui = 0; ui < tar->children->len; ui++) { + TarChild *c = &g_array_index (tar->children, + TarChild, + ui); + g_free (c->name); + if (c->dir) + g_object_unref (c->dir); + } + g_array_free (tar->children, TRUE); + } + + g_clear_error (&tar->err); + + parent_class->finalize (obj); +} + +static GObject* +gsf_infile_tar_constructor (GType type, + guint n_construct_properties, + GObjectConstructParam *construct_params) +{ + GsfInfileTar *tar = (GsfInfileTar *) + (parent_class->constructor (type, + n_construct_properties, + construct_params)); + if (tar->source) + tar_init_info (tar); + + return (GObject *)tar; +} + + +static void +gsf_infile_tar_init (GObject *obj) +{ + GsfInfileTar *tar = (GsfInfileTar *)obj; + tar->source = NULL; + tar->children = g_array_new (FALSE, FALSE, sizeof (TarChild)); + tar->err = NULL; +} + +static void +gsf_infile_tar_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) +{ + GsfInfileTar *tar = (GsfInfileTar *)object; + + switch (property_id) { + case PROP_SOURCE: + g_value_set_object (value, tar->source); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gsf_infile_tar_set_source (GsfInfileTar *tar, GsfInput *src) +{ + if (src) + src = gsf_input_proxy_new (src); + if (tar->source) + g_object_unref (tar->source); + tar->source = src; +} + +static void +gsf_infile_tar_set_property (GObject *object, + guint property_id, + GValue const *value, + GParamSpec *pspec) +{ + GsfInfileTar *tar = (GsfInfileTar *)object; + + switch (property_id) { + case PROP_SOURCE: + gsf_infile_tar_set_source (tar, g_value_get_object (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + + +static void +gsf_infile_tar_class_init (GObjectClass *gobject_class) +{ + GsfInputClass *input_class = GSF_INPUT_CLASS (gobject_class); + GsfInfileClass *infile_class = GSF_INFILE_CLASS (gobject_class); + + gobject_class->constructor = gsf_infile_tar_constructor; + gobject_class->finalize = gsf_infile_tar_finalize; + gobject_class->get_property = gsf_infile_tar_get_property; + gobject_class->set_property = gsf_infile_tar_set_property; + + input_class->Dup = gsf_infile_tar_dup; + input_class->Read = gsf_infile_tar_read; + input_class->Seek = gsf_infile_tar_seek; + infile_class->num_children = gsf_infile_tar_num_children; + infile_class->name_by_index = gsf_infile_tar_name_by_index; + infile_class->child_by_index = gsf_infile_tar_child_by_index; + infile_class->child_by_name = gsf_infile_tar_child_by_name; + + parent_class = g_type_class_peek_parent (gobject_class); + + g_object_class_install_property + (gobject_class, + PROP_SOURCE, + g_param_spec_object ("source", + "Source", + "The archive being interpreted.", + GSF_INPUT_TYPE, + GSF_PARAM_STATIC | + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY)); +} + +GSF_CLASS (GsfInfileTar, gsf_infile_tar, + gsf_infile_tar_class_init, gsf_infile_tar_init, + GSF_INFILE_TYPE) + +/** + * gsf_infile_tar_new : + * @source: A base #GsfInput + * @err: A #GError, optionally %null + * + * Opens the root directory of a Tar file. + * This adds a reference to @source. + * + * Returns: the new tar file handler + **/ +GsfInfile * +gsf_infile_tar_new (GsfInput *source, GError **err) +{ + GsfInfileTar *tar; + + g_return_val_if_fail (GSF_IS_INPUT (source), NULL); + + tar = g_object_new (GSF_INFILE_TAR_TYPE, + "source", source, + NULL); + + if (tar->err) { + if (err) + *err = g_error_copy (tar->err); + g_object_unref (tar); + return NULL; + } + + return GSF_INFILE (tar); +} diff --git a/gsf/gsf-infile-tar.h b/gsf/gsf-infile-tar.h new file mode 100644 index 0000000..f3e91fe --- /dev/null +++ b/gsf/gsf-infile-tar.h @@ -0,0 +1,40 @@ +/* + * gsf-infile-tar.h: + * + * Copyright (C) 2008 Morten Welinder (terra@gnome.org) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 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 St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef GSF_INFILE_TAR_H +#define GSF_INFILE_TAR_H + +#include +#include + +G_BEGIN_DECLS + +typedef struct _GsfInfileTar GsfInfileTar; + +#define GSF_INFILE_TAR_TYPE (gsf_infile_tar_get_type ()) +#define GSF_INFILE_TAR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_INFILE_TAR_TYPE, GsfInfileTar)) +#define GSF_IS_INFILE_TAR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_INFILE_TAR_TYPE)) + +GType gsf_infile_tar_get_type (void) G_GNUC_CONST; +GsfInfile *gsf_infile_tar_new (GsfInput *source, GError **err); + +G_END_DECLS + +#endif /* GSF_INFILE_TAR_H */ diff --git a/gsf/gsf-infile-zip.c b/gsf/gsf-infile-zip.c new file mode 100644 index 0000000..cba7247 --- /dev/null +++ b/gsf/gsf-infile-zip.c @@ -0,0 +1,882 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-infile-zip.c : + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * Tambet Ingo (tambet@ximian.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#undef G_LOG_DOMAIN +#define G_LOG_DOMAIN "libgsf:zip" + +enum { + PROP_0, + PROP_SOURCE, + PROP_COMPRESSION_LEVEL, + PROP_INTERNAL_PARENT, +}; + +static GObjectClass *parent_class; + +typedef struct { + guint16 entries; + guint32 dir_pos; + GList *dirent_list; + GsfZipVDir *vdir; + + int ref_count; +} ZipInfo; + +struct _GsfInfileZip { + GsfInfile parent; + + GsfInput *source; + ZipInfo *info; + + GsfZipVDir *vdir; + + z_stream *stream; + guint32 restlen; + guint32 crestlen; + + guint8 *buf; + size_t buf_size; + gsf_off_t seek_skipped; + + GError *err; + GsfInfileZip *dup_parent; +}; + +typedef struct { + GsfInfileClass parent_class; +} GsfInfileZipClass; + +#define GSF_INFILE_ZIP_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSF_INFILE_ZIP_TYPE, GsfInfileZipClass)) +#define GSF_IS_INFILE_ZIP_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSF_INFILE_ZIP_TYPE)) + +static GsfZipVDir * +vdir_child_by_name (GsfZipVDir *vdir, char const *name) +{ + GSList *l; + + for (l = vdir->children; l; l = l->next) { + GsfZipVDir *child = (GsfZipVDir *) l->data; + if (strcmp (child->name, name) == 0) + return child; + } + return NULL; +} + +static GsfZipVDir * +vdir_child_by_index (GsfZipVDir *vdir, int target) +{ + return g_slist_nth_data (vdir->children, target); +} + +static void +vdir_insert (GsfZipVDir *vdir, char const * name, GsfZipDirent *dirent) +{ + char const *p; + char *dirname; + GsfZipVDir *child; + + p = strchr (name, ZIP_NAME_SEPARATOR); + if (p) { /* A directory */ + dirname = g_strndup (name, (gsize) (p - name)); + child = vdir_child_by_name (vdir, dirname); + if (!child) { + child = gsf_vdir_new (dirname, TRUE, NULL); + gsf_vdir_add_child (vdir, child); + } + g_free (dirname); + if (*(p+1) != '\0') { + name = p+1; + vdir_insert (child, name, dirent); + } + } else { /* A simple file name */ + child = gsf_vdir_new (name, FALSE, dirent); + gsf_vdir_add_child (vdir, child); + } +} + +static gsf_off_t +zip_find_trailer (GsfInfileZip *zip) +{ + static guint8 const trailer_signature[] = + { 'P', 'K', 0x05, 0x06 }; + gsf_off_t offset, trailer_offset, filesize; + gsf_off_t maplen; + guint8 const *data; + + filesize = gsf_input_size (zip->source); + if (filesize < ZIP_TRAILER_SIZE) + return -1; + + trailer_offset = filesize; + maplen = filesize & (ZIP_BUF_SIZE - 1); + if (maplen == 0) + maplen = ZIP_BUF_SIZE; + offset = filesize - maplen; /* offset is now BUFSIZ aligned */ + + while (TRUE) { + guchar *p, *s; + + if (gsf_input_seek (zip->source, offset, G_SEEK_SET)) + return -1; + + if ((data = gsf_input_read (zip->source, maplen, NULL)) == NULL) + return -1; + + p = (guchar *) data; + + for (s = p + maplen - 1; (s >= p); s--, trailer_offset--) { + if ((*s == 'P') && + (p + maplen - 1 - s > ZIP_TRAILER_SIZE - 2) && + !memcmp (s, trailer_signature, sizeof (trailer_signature))) { + return --trailer_offset; + } + } + + /* not found in currently mapped block, so update it if + * there is some room in before. The requirements are.. + * (a) mappings should overlap so that trailer can cross BUFSIZ-boundary + * (b) trailer cannot be farther away than 64K from fileend + */ + + /* outer loop cond */ + if (offset <= 0) + return -1; + + /* outer loop step */ + offset -= ZIP_BUF_SIZE / 2; + maplen = MIN (filesize - offset, ZIP_BUF_SIZE); + trailer_offset = offset + maplen; + + if (filesize - offset > 64 * 1024) + return -1; + } /*outer loop*/ + + return -1; +} + +static GsfZipDirent * +zip_dirent_new_in (GsfInfileZip *zip, gsf_off_t *offset) +{ + static guint8 const dirent_signature[] = + { 'P', 'K', 0x01, 0x02 }; + GsfZipDirent *dirent; + guint8 const *data; + guint16 name_len, extras_len, comment_len, compr_method, flags; + guint32 crc32, csize, usize, off; + gchar *name; + + /* Read data and check the header */ + if (gsf_input_seek (zip->source, *offset, G_SEEK_SET) || + NULL == (data = gsf_input_read (zip->source, ZIP_DIRENT_SIZE, NULL)) || + 0 != memcmp (data, dirent_signature, sizeof (dirent_signature))) { + return NULL; + } + + name_len = GSF_LE_GET_GUINT16 (data + ZIP_DIRENT_NAME_SIZE); + extras_len = GSF_LE_GET_GUINT16 (data + ZIP_DIRENT_EXTRAS_SIZE); + comment_len = GSF_LE_GET_GUINT16 (data + ZIP_DIRENT_COMMENT_SIZE); + + flags = GSF_LE_GET_GUINT32 (data + ZIP_DIRENT_FLAGS); + compr_method = GSF_LE_GET_GUINT16 (data + ZIP_DIRENT_COMPR_METHOD); + crc32 = GSF_LE_GET_GUINT32 (data + ZIP_DIRENT_CRC32); + csize = GSF_LE_GET_GUINT32 (data + ZIP_DIRENT_CSIZE); + usize = GSF_LE_GET_GUINT32 (data + ZIP_DIRENT_USIZE); + off = GSF_LE_GET_GUINT32 (data + ZIP_DIRENT_OFFSET); + + if ((data = gsf_input_read (zip->source, name_len, NULL)) == NULL) + return NULL; + + name = g_new (gchar, (gulong) (name_len + 1)); + memcpy (name, data, name_len); + name[name_len] = '\0'; + + dirent = gsf_zip_dirent_new (); + dirent->name = name; + + dirent->flags = flags; + dirent->compr_method = compr_method; + dirent->crc32 = crc32; + dirent->csize = csize; + dirent->usize = usize; + dirent->offset = off; +#if 0 + g_print ("%s = 0x%x @ %" GSF_OFF_T_FORMAT "\n", name, off, *offset); +#endif + + *offset += ZIP_DIRENT_SIZE + name_len + extras_len + comment_len; + + return dirent; +} + +/*****************************************************************************/ +static ZipInfo * +zip_info_ref (ZipInfo *info) +{ + info->ref_count++; + return info; +} + +static void +zip_info_unref (ZipInfo *info) +{ + GList *p; + + if (info->ref_count-- != 1) + return; + + gsf_vdir_free (info->vdir, FALSE); + for (p = info->dirent_list; p != NULL; p = p->next) + gsf_zip_dirent_free ((GsfZipDirent *) p->data); + + g_list_free (info->dirent_list); + + g_free (info); +} + +/* Returns a partial duplicate. */ +static GsfInfileZip * +zip_dup (GsfInfileZip const *src, GError **err) +{ + GsfInfileZip *dst; + + g_return_val_if_fail (src != NULL, NULL); + + dst = g_object_new (GSF_INFILE_ZIP_TYPE, + "internal-parent", src, + NULL); + if (G_UNLIKELY (NULL == dst)) return NULL; + + if (dst->err) { + if (err) + *err = g_error_copy (dst->err); + g_object_unref (dst); + return NULL; + } + + return dst; +} + +/** + * zip_read_dirents: + * @zip : #GsfInfileZip + * + * Read zip headers and do some sanity checking + * along the way. + * + * Returns: %TRUE on error setting zip->err. + **/ +static gboolean +zip_read_dirents (GsfInfileZip *zip) +{ + guint8 const *trailer; + guint16 entries, i; + guint32 dir_pos; + ZipInfo *info; + gsf_off_t offset; + + /* Find and check the trailing header */ + offset = zip_find_trailer (zip); + if (offset < 0) { + zip->err = g_error_new (gsf_input_error_id (), 0, + "No Zip trailer"); + return TRUE; + } + + if (gsf_input_seek (zip->source, offset, G_SEEK_SET) || + NULL == (trailer = gsf_input_read (zip->source, ZIP_TRAILER_SIZE, NULL))) { + zip->err = g_error_new (gsf_input_error_id (), 0, + "Error reading Zip signature"); + return TRUE; + } + + entries = GSF_LE_GET_GUINT32 (trailer + ZIP_TRAILER_ENTRIES); + dir_pos = GSF_LE_GET_GUINT32 (trailer + ZIP_TRAILER_DIR_POS); + + info = g_new0 (ZipInfo, 1); + zip->info = info; + + info->ref_count = 1; + info->entries = entries; + info->dir_pos = dir_pos; + + /* Read the directory */ + for (i = 0, offset = dir_pos; i < entries; i++) { + GsfZipDirent *d; + + d = zip_dirent_new_in (zip, &offset); + if (d == NULL) { + zip->err = g_error_new (gsf_input_error_id (), 0, + "Error reading zip dirent"); + return TRUE; + } + + info->dirent_list = g_list_append (info->dirent_list, d); + } + + return FALSE; +} + +static void +zip_build_vdirs (GsfInfileZip *zip) +{ + GList *l; + GsfZipDirent *dirent; + ZipInfo *info = zip->info; + + info->vdir = gsf_vdir_new ("", TRUE, NULL); + for (l = info->dirent_list; l; l = l->next) { + dirent = (GsfZipDirent *) l->data; + vdir_insert (info->vdir, dirent->name, dirent); + } +} + +/** + * zip_init_info : + * @zip : #GsfInfileZip + * + * Read zip headers and do some sanity checking + * along the way. + * + * Returns: TRUE on error setting zip->err. + **/ +static gboolean +zip_init_info (GsfInfileZip *zip) +{ + gboolean ret; + + ret = zip_read_dirents (zip); + if (ret != FALSE) + return ret; + zip_build_vdirs (zip); + + return FALSE; +} + +/* returns TRUE on error */ +static gboolean +zip_child_init (GsfInfileZip *child, GError **errmsg) +{ + static guint8 const header_signature[] = + { 'P', 'K', 0x03, 0x04 }; + guint8 const *data = NULL; + guint16 name_len, extras_len; + char *err = NULL; + + GsfZipDirent *dirent = child->vdir->dirent; + + /* skip local header + * should test tons of other info, but trust that those are correct + **/ + + if (gsf_input_seek (child->source, (gsf_off_t) dirent->offset, G_SEEK_SET)) + err = g_strdup_printf ("Error seeking to zip header @ %" GSF_OFF_T_FORMAT, + dirent->offset); + else if (NULL == (data = gsf_input_read (child->source, ZIP_FILE_HEADER_SIZE, NULL))) + err = g_strdup_printf ("Error reading %d bytes in zip header", ZIP_FILE_HEADER_SIZE); + else if (0 != memcmp (data, header_signature, sizeof (header_signature))) { + err = g_strdup_printf ("Error incorrect zip header @ %" GSF_OFF_T_FORMAT, + dirent->offset); + g_print ("Header is :\n"); + gsf_mem_dump (data, sizeof (header_signature)); + g_print ("Header should be :\n"); + gsf_mem_dump (header_signature, sizeof (header_signature)); + } + + if (NULL != err) { + if (errmsg != NULL) + *errmsg = g_error_new_literal (gsf_input_error_id (), 0, err); + g_free (err); + return TRUE; + } + + name_len = GSF_LE_GET_GUINT16 (data + ZIP_FILE_HEADER_NAME_SIZE); + extras_len = GSF_LE_GET_GUINT16 (data + ZIP_FILE_HEADER_EXTRAS_SIZE); + + dirent->data_offset = dirent->offset + ZIP_FILE_HEADER_SIZE + name_len + extras_len; + child->restlen = dirent->usize; + child->crestlen = dirent->csize; + + if (dirent->compr_method != GSF_ZIP_STORED) { + int err; + + if (!child->stream) + child->stream = g_new0 (z_stream, 1); + + err = inflateInit2 (child->stream, -MAX_WBITS); + if (err != Z_OK) { + if (errmsg != NULL) + *errmsg = g_error_new (gsf_input_error_id (), 0, + "problem uncompressing stream"); + return TRUE; + } + } + + return FALSE; +} + +/* GsfInput class functions */ + +static GsfInput * +gsf_infile_zip_dup (GsfInput *src_input, GError **err) +{ + GsfInfileZip const *src = GSF_INFILE_ZIP (src_input); + GsfInfileZip *dst = zip_dup (src, err); + + if (dst == NULL) + return NULL; + + dst->vdir = src->vdir; + + if (dst->vdir->dirent && zip_child_init (dst, err)) { + g_object_unref (dst); + return NULL; + } + + return GSF_INPUT (dst); +} + +static gboolean +zip_update_stream_in (GsfInfileZip *zip) +{ + guint32 read_now; + guint8 const *data; + gsf_off_t pos; + + if (zip->crestlen == 0) + return FALSE; + + read_now = MIN (zip->crestlen, ZIP_BLOCK_SIZE); + + pos = zip->vdir->dirent->data_offset + zip->stream->total_in; + if (gsf_input_seek (zip->source, pos, G_SEEK_SET)) + return FALSE; + if ((data = gsf_input_read (zip->source, read_now, NULL)) == NULL) + return FALSE; + + zip->crestlen -= read_now; + zip->stream->next_in = (unsigned char *) data; /* next input byte */ + zip->stream->avail_in = read_now; /* number of bytes available at next_in */ + + return TRUE; +} + +static guint8 const * +gsf_infile_zip_read (GsfInput *input, size_t num_bytes, guint8 *buffer) +{ + GsfInfileZip *zip = GSF_INFILE_ZIP (input); + GsfZipVDir *vdir = zip->vdir; + gsf_off_t pos; + + if (zip->restlen < num_bytes) + return NULL; + + switch (vdir->dirent->compr_method) { + case GSF_ZIP_STORED: + zip->restlen -= num_bytes; + pos = zip->vdir->dirent->data_offset + input->cur_offset; + if (gsf_input_seek (zip->source, pos, G_SEEK_SET)) + return NULL; + return gsf_input_read (zip->source, num_bytes, buffer); + + case GSF_ZIP_DEFLATED: + if (buffer == NULL) { + if (zip->buf_size < num_bytes) { + zip->buf_size = MAX (num_bytes, 256); + g_free (zip->buf); + zip->buf = g_new (guint8, zip->buf_size); + } + buffer = zip->buf; + } + + zip->stream->avail_out = num_bytes; + zip->stream->next_out = (unsigned char *)buffer; + + do { + int err; + int startlen; + + if (zip->crestlen > 0 && zip->stream->avail_in == 0) + if (!zip_update_stream_in (zip)) + break; + + startlen = zip->stream->total_out; + err = inflate(zip->stream, Z_NO_FLUSH); + + if (err == Z_STREAM_END) + zip->restlen = 0; + else if (err == Z_OK) + zip->restlen -= (zip->stream->total_out - startlen); + else + break; + + } while (zip->restlen && zip->stream->avail_out); + + return buffer; + + default: + break; + } + + return NULL; +} + +static gboolean +gsf_infile_zip_seek (GsfInput *input, gsf_off_t offset, GSeekType whence) +{ + GsfInfileZip *zip = GSF_INFILE_ZIP (input); + /* Global flag -- we don't want one per stream. */ + static gboolean warned = FALSE; + gsf_off_t pos = offset; + + /* Note, that pos has already been sanity checked. */ + switch (whence) { + case G_SEEK_SET : break; + case G_SEEK_CUR : pos += input->cur_offset; break; + case G_SEEK_END : pos += input->size; break; + default : return TRUE; + } + + if (zip->stream) { + (void) inflateEnd (zip->stream); + memset (zip->stream, 0, sizeof (z_stream)); + } + + if (zip_child_init (zip, NULL)) { + g_warning ("failure initializing zip child"); + return TRUE; + } + + input->cur_offset = 0; + if (gsf_input_seek_emulate (input, pos)) + return TRUE; + + zip->seek_skipped += pos; + if (!warned && + zip->seek_skipped != pos && /* Don't warn for single seek. */ + zip->seek_skipped >= 1000000) { + warned = TRUE; + g_warning ("Seeking in zip child streams is awfully slow."); + } + + return FALSE; +} + +/* GsfInfile class functions */ + +/*****************************************************************************/ + + +static GsfInput * +gsf_infile_zip_new_child (GsfInfileZip *parent, GsfZipVDir *vdir, GError **err) +{ + GsfInfileZip *child; + GsfZipDirent *dirent = vdir->dirent; + child = zip_dup (parent, err); + + if (child == NULL) + return NULL; + + gsf_input_set_name (GSF_INPUT (child), vdir->name); + gsf_input_set_container (GSF_INPUT (child), GSF_INFILE (parent)); + + child->vdir = vdir; + + if (dirent) { + gsf_input_set_size (GSF_INPUT (child), + (gsf_off_t) dirent->usize); + if (zip_child_init (child, err) != FALSE) { + g_object_unref (child); + return NULL; + } + } else + gsf_input_set_size (GSF_INPUT (child), 0); + + return GSF_INPUT (child); +} + +static GsfInput * +gsf_infile_zip_child_by_index (GsfInfile *infile, int target, GError **err) +{ + GsfInfileZip *zip = GSF_INFILE_ZIP (infile); + GsfZipVDir *child_vdir = vdir_child_by_index (zip->vdir, target); + + if (child_vdir) + return gsf_infile_zip_new_child (zip, child_vdir, err); + + return NULL; +} + +static char const * +gsf_infile_zip_name_by_index (GsfInfile *infile, int target) +{ + GsfInfileZip *zip = GSF_INFILE_ZIP (infile); + GsfZipVDir *child_vdir = vdir_child_by_index (zip->vdir, target); + + if (child_vdir) + return child_vdir->name; + + return NULL; +} + +static GsfInput * +gsf_infile_zip_child_by_name (GsfInfile *infile, char const *name, GError **err) +{ + GsfInfileZip *zip = GSF_INFILE_ZIP (infile); + GsfZipVDir *child_vdir = vdir_child_by_name (zip->vdir, name); + + if (child_vdir) + return gsf_infile_zip_new_child (zip, child_vdir, err); + + return NULL; +} + +static int +gsf_infile_zip_num_children (GsfInfile *infile) +{ + GsfInfileZip *zip = GSF_INFILE_ZIP (infile); + + g_return_val_if_fail (zip->vdir != NULL, -1); + + if (!zip->vdir->is_directory) + return -1; + return g_slist_length (zip->vdir->children); +} + +static void +gsf_infile_zip_finalize (GObject *obj) +{ + GsfInfileZip *zip = GSF_INFILE_ZIP (obj); + + if (zip->source != NULL) { + g_object_unref (G_OBJECT (zip->source)); + zip->source = NULL; + } + if (zip->info != NULL) { + zip_info_unref (zip->info); + zip->info = NULL; + } + + if (zip->stream) + (void) inflateEnd (zip->stream); + g_free (zip->stream); + g_free (zip->buf); + + g_clear_error (&zip->err); + + parent_class->finalize (obj); +} + +static GObject* +gsf_infile_zip_constructor (GType type, + guint n_construct_properties, + GObjectConstructParam *construct_params) +{ + GsfInfileZip *zip; + + zip = (GsfInfileZip *)(parent_class->constructor (type, + n_construct_properties, + construct_params)); + if (zip->dup_parent) { + /* Special call from zip_dup. */ + zip->source = gsf_input_dup (zip->dup_parent->source, &zip->err); + zip->info = zip_info_ref (zip->dup_parent->info); + zip->dup_parent = NULL; + } else { + if (!zip_init_info (zip)) + zip->vdir = zip->info->vdir; + } + + return (GObject *)zip; +} + + +static void +gsf_infile_zip_init (GObject *obj) +{ + GsfInfileZip *zip = (GsfInfileZip *)obj; + zip->source = NULL; + zip->info = NULL; + zip->vdir = NULL; + zip->stream = NULL; + zip->restlen = 0; + zip->crestlen = 0; + zip->buf = NULL; + zip->buf_size = 0; + zip->seek_skipped = 0; + zip->err = NULL; +} + +static void +gsf_infile_zip_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) +{ + GsfInfileZip *zip = (GsfInfileZip *)object; + + switch (property_id) { + case PROP_SOURCE: + g_value_set_object (value, zip->source); + break; + case PROP_COMPRESSION_LEVEL: + g_value_set_int (value, + zip->vdir->dirent + ? zip->vdir->dirent->compr_method + : 0); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gsf_infile_zip_set_source (GsfInfileZip *zip, GsfInput *src) +{ + if (src) + src = gsf_input_proxy_new (src); + if (zip->source) + g_object_unref (zip->source); + zip->source = src; +} + +static void +gsf_infile_zip_set_property (GObject *object, + guint property_id, + GValue const *value, + GParamSpec *pspec) +{ + GsfInfileZip *zip = (GsfInfileZip *)object; + + switch (property_id) { + case PROP_SOURCE: + gsf_infile_zip_set_source (zip, g_value_get_object (value)); + break; + case PROP_INTERNAL_PARENT: + zip->dup_parent = g_value_get_object (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + + +static void +gsf_infile_zip_class_init (GObjectClass *gobject_class) +{ + GsfInputClass *input_class = GSF_INPUT_CLASS (gobject_class); + GsfInfileClass *infile_class = GSF_INFILE_CLASS (gobject_class); + + gobject_class->constructor = gsf_infile_zip_constructor; + gobject_class->finalize = gsf_infile_zip_finalize; + gobject_class->get_property = gsf_infile_zip_get_property; + gobject_class->set_property = gsf_infile_zip_set_property; + + input_class->Dup = gsf_infile_zip_dup; + input_class->Read = gsf_infile_zip_read; + input_class->Seek = gsf_infile_zip_seek; + infile_class->num_children = gsf_infile_zip_num_children; + infile_class->name_by_index = gsf_infile_zip_name_by_index; + infile_class->child_by_index = gsf_infile_zip_child_by_index; + infile_class->child_by_name = gsf_infile_zip_child_by_name; + + parent_class = g_type_class_peek_parent (gobject_class); + + g_object_class_install_property + (gobject_class, + PROP_SOURCE, + g_param_spec_object ("source", + "Source", + "The archive being interpreted.", + GSF_INPUT_TYPE, + GSF_PARAM_STATIC | + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY)); + g_object_class_install_property + (gobject_class, + PROP_COMPRESSION_LEVEL, + g_param_spec_int ("compression-level", + "Compression Level", + "The level of compression used, zero meaning none.", + 0, 10, + 0, + GSF_PARAM_STATIC | + G_PARAM_READABLE)); + g_object_class_install_property + (gobject_class, + PROP_INTERNAL_PARENT, + g_param_spec_object ("internal-parent", + "", + "Internal use only", + GSF_INFILE_ZIP_TYPE, + GSF_PARAM_STATIC | + G_PARAM_WRITABLE | + G_PARAM_CONSTRUCT_ONLY)); +} + +GSF_CLASS (GsfInfileZip, gsf_infile_zip, + gsf_infile_zip_class_init, gsf_infile_zip_init, + GSF_INFILE_TYPE) + +/** + * gsf_infile_zip_new : + * @source: A base #GsfInput + * @err: A #GError, optionally %null + * + * Opens the root directory of a Zip file. + * This adds a reference to @source. + * + * Returns: the new zip file handler + **/ +GsfInfile * +gsf_infile_zip_new (GsfInput *source, GError **err) +{ + GsfInfileZip *zip; + + g_return_val_if_fail (GSF_IS_INPUT (source), NULL); + + zip = g_object_new (GSF_INFILE_ZIP_TYPE, + "source", source, + NULL); + if (G_UNLIKELY (NULL == zip)) return NULL; + + if (zip->err) { + if (err) + *err = g_error_copy (zip->err); + g_object_unref (zip); + return NULL; + } + + return GSF_INFILE (zip); +} diff --git a/gsf/gsf-infile-zip.h b/gsf/gsf-infile-zip.h new file mode 100644 index 0000000..0dd495a --- /dev/null +++ b/gsf/gsf-infile-zip.h @@ -0,0 +1,43 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-infile-zip.h: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_INFILE_ZIP_H +#define GSF_INFILE_ZIP_H + +#include +#include + +G_BEGIN_DECLS + +typedef struct _GsfInfileZip GsfInfileZip; + +#define GSF_INFILE_ZIP_TYPE (gsf_infile_zip_get_type ()) +#define GSF_INFILE_ZIP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_INFILE_ZIP_TYPE, GsfInfileZip)) +#define GSF_IS_INFILE_ZIP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_INFILE_ZIP_TYPE)) + +GType gsf_infile_zip_get_type (void) G_GNUC_CONST; +/* void gsf_infile_zip_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfInfile *gsf_infile_zip_new (GsfInput *source, GError **err); + +G_END_DECLS + +#endif /* GSF_INFILE_ZIP_H */ diff --git a/gsf/gsf-infile.c b/gsf/gsf-infile.c new file mode 100644 index 0000000..94a3014 --- /dev/null +++ b/gsf/gsf-infile.c @@ -0,0 +1,206 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-infile.c : + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include + +#include + +#define GET_CLASS(instance) G_TYPE_INSTANCE_GET_CLASS (instance, GSF_INFILE_TYPE, GsfInfileClass) + +/** + * gsf_infile_num_children : + * @infile : the structured storage + * + * Returns: the number of children the storage has, or -1 if the storage can not + * have children. + **/ +int +gsf_infile_num_children (GsfInfile *infile) +{ + g_return_val_if_fail (infile != NULL, -1); + + return GET_CLASS (infile)->num_children (infile); +} + +/** + * gsf_infile_name_by_index : + * @infile : + * @i : + * + * Returns: the utf8 encoded name of the @i-th child + * DO NOT FREE THE STRING. + **/ +char const * +gsf_infile_name_by_index (GsfInfile *infile, int i) +{ + g_return_val_if_fail (infile != NULL, NULL); + + return GET_CLASS (infile)->name_by_index (infile, i); +} + +/** + * gsf_infile_child_by_index : + * @infile : #GsfInfile + * @i : target index + * + * TODO : For 2.0 api will change to include a GError. + * Returns: a newly created child which must be unrefed. + **/ +GsfInput * +gsf_infile_child_by_index (GsfInfile *infile, int i) +{ + GError *err = NULL; + GsfInput *res; + + g_return_val_if_fail (GSF_INFILE (infile) != NULL, NULL); + + res = GET_CLASS (infile)->child_by_index (infile, i, &err); + + if (err != NULL) { + char const *iname = gsf_input_name (GSF_INPUT (infile)); + g_warning ("Unable to get child[%d] for infile '%s' because : %s", + i, iname ? iname : "?", err->message); + g_error_free (err); + g_return_val_if_fail (res == NULL, NULL); /* be anal */ + } + + return res; +} + +/** + * gsf_infile_child_by_name : + * @infile : #GsfInfile + * @name : target name + * + * TODO : For 2.0 api will change to include a GError. + * Returns: a newly created child which must be unrefed. + **/ +GsfInput * +gsf_infile_child_by_name (GsfInfile *infile, char const *name) +{ + GError *err = NULL; + GsfInput *res; + + g_return_val_if_fail (GSF_INFILE (infile) != NULL, NULL); + g_return_val_if_fail (name != NULL, NULL); + + res = GET_CLASS (infile)->child_by_name (infile, name, &err); + + if (err != NULL) { + char const *iname = gsf_input_name (GSF_INPUT (infile)); + g_warning ("Unable to get child['%s'] for infile '%s' because : %s", + name, iname ? iname : "?", err->message); + g_error_free (err); + g_return_val_if_fail (res == NULL, NULL); /* be anal */ + } + + return res; +} + +/** + * gsf_infile_child_by_vname : + * @infile : + * @Varargs : A %NULL terminated list of names + * + * Returns: a newly created child which must be unrefed. + **/ +GsfInput * +gsf_infile_child_by_vname (GsfInfile *infile, ...) +{ + GsfInput *res; + va_list names; + + va_start (names, infile); + res = gsf_infile_child_by_vaname (infile, names); + va_end (names); + + return res; +} + +/** + * gsf_infile_child_by_vaname : + * @infile : #GsfInfile + * @names : A %NULL terminated array of names (e.g. from g_strsplit) + * + * New in 1.14.9. + * + * Returns: a newly created child which must be unrefed. + **/ +GsfInput * +gsf_infile_child_by_vaname (GsfInfile *infile, va_list names) +{ + GsfInput *child = GSF_INPUT (infile); + GsfInfile *tmp = NULL; + char const *name; + + g_return_val_if_fail (GSF_IS_INFILE (infile), NULL); + + while (NULL != (name = va_arg (names, char const *))) { + child = gsf_infile_child_by_name (infile, name); + if (child == NULL) + break; + if (tmp != NULL) + g_object_unref (G_OBJECT (tmp)); + + g_return_val_if_fail (GSF_IS_INFILE (child), NULL); + + infile = tmp = GSF_INFILE (child); + } + + return child; +} + +/** + * gsf_infile_child_by_aname : + * @infile : #GsfInfile + * @names : A %NULL terminated array of names (e.g. from g_strsplit) + * + * New in 1.14.9. + * + * Returns: a newly created child which must be unrefed. + **/ +GsfInput * +gsf_infile_child_by_aname (GsfInfile *infile, char const *names[]) +{ + GsfInput *child = GSF_INPUT (infile); + GsfInfile *tmp = NULL; + + g_return_val_if_fail (GSF_IS_INFILE (infile), NULL); + g_return_val_if_fail (names != NULL, NULL); + + for (;*names ; names++) { + child = gsf_infile_child_by_name (infile, *names); + if (tmp != NULL) + g_object_unref (G_OBJECT (tmp)); + if (child == NULL) + break; + + g_return_val_if_fail (GSF_IS_INFILE (child), NULL); + + infile = tmp = GSF_INFILE (child); + } + + return child; +} + +GSF_CLASS_ABSTRACT (GsfInfile, gsf_infile, NULL, NULL, GSF_INPUT_TYPE) diff --git a/gsf/gsf-infile.h b/gsf/gsf-infile.h new file mode 100644 index 0000000..4980d44 --- /dev/null +++ b/gsf/gsf-infile.h @@ -0,0 +1,47 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-infile.h: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_INFILE_H +#define GSF_INFILE_H + +#include +#include + +G_BEGIN_DECLS + +#define GSF_INFILE_TYPE (gsf_infile_get_type ()) +#define GSF_INFILE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_INFILE_TYPE, GsfInfile)) +#define GSF_IS_INFILE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_INFILE_TYPE)) + +GType gsf_infile_get_type (void) G_GNUC_CONST; +/* void gsf_infile_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +int gsf_infile_num_children (GsfInfile *infile); +char const *gsf_infile_name_by_index (GsfInfile *infile, int i); +GsfInput *gsf_infile_child_by_index (GsfInfile *infile, int i); +GsfInput *gsf_infile_child_by_name (GsfInfile *infile, char const *name); +GsfInput *gsf_infile_child_by_vname (GsfInfile *infile, ...); +GsfInput *gsf_infile_child_by_aname (GsfInfile *infile, char const *names[]); +GsfInput *gsf_infile_child_by_vaname (GsfInfile *infile, va_list names); + +G_END_DECLS + +#endif /* GSF_INFILE_H */ diff --git a/gsf/gsf-input-bzip.c b/gsf/gsf-input-bzip.c new file mode 100644 index 0000000..5349238 --- /dev/null +++ b/gsf/gsf-input-bzip.c @@ -0,0 +1,116 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-iochannel.c: wrapper for glib's GIOChannel + * + * Copyright (C) 2003-2006 Dom Lachowicz (cinamod@hotmail.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_BZ2 +/* For getting FILE. Don't ask. */ +#include +#include +#define BZ_BUFSIZ 1024 +#endif + +/** + * gsf_input_memory_new_from_bzip : + * @source : a #GsfInput + * @err : a #GError + * + * Returns: a new #GsfInputMemory or %NULL. + */ +GsfInput * +gsf_input_memory_new_from_bzip (GsfInput *source, GError **err) +{ +#ifndef HAVE_BZ2 + (void)source; + if (err) + *err = g_error_new (gsf_input_error_id (), 0, + "BZ2 support not enabled"); + return NULL; +#else + bz_stream bzstm; + GsfInput *mem = NULL; + GsfOutput *sink = NULL; + guint8 out_buf [BZ_BUFSIZ]; + int bzerr = BZ_OK; + + g_return_val_if_fail (source != NULL, NULL); + + memset (&bzstm, 0, sizeof (bzstm)); + if (BZ_OK != BZ2_bzDecompressInit (&bzstm, 0, 0)) { + if (err) + *err = g_error_new (gsf_input_error_id (), 0, + "BZ2 decompress init failed"); + return NULL; + } + + sink = gsf_output_memory_new (); + + for (;;) { + bzstm.next_out = (char *)out_buf; + bzstm.avail_out = (unsigned int)sizeof (out_buf); + + if (bzstm.avail_in == 0) { + bzstm.avail_in = (unsigned int)MIN (gsf_input_remaining (source), BZ_BUFSIZ); + bzstm.next_in = (char *)gsf_input_read (source, bzstm.avail_in, NULL); + } + + bzerr = BZ2_bzDecompress (&bzstm); + if (bzerr != BZ_OK && bzerr != BZ_STREAM_END) { + if (err) + *err = g_error_new (gsf_input_error_id (), 0, + "BZ2 decompress failed"); + BZ2_bzDecompressEnd (&bzstm); + gsf_output_close (sink); + g_object_unref (G_OBJECT (sink)); + return NULL; + } + + gsf_output_write (sink, BZ_BUFSIZ - bzstm.avail_out, out_buf); + if (bzerr == BZ_STREAM_END) + break; + } + + gsf_output_close (sink); + + if (BZ_OK != BZ2_bzDecompressEnd (&bzstm)) { + if (err) + *err = g_error_new (gsf_input_error_id (), 0, + "BZ2 decompress end failed"); + g_object_unref (G_OBJECT (sink)); + return NULL; + } + + mem = gsf_input_memory_new_clone ( + gsf_output_memory_get_bytes (GSF_OUTPUT_MEMORY (sink)), + gsf_output_size (sink)); + + if (mem != NULL) + gsf_input_set_name (mem, gsf_input_name (source)); + + g_object_unref (G_OBJECT (sink)); + return mem; +#endif +} diff --git a/gsf/gsf-input-bzip.h b/gsf/gsf-input-bzip.h new file mode 100644 index 0000000..4160f36 --- /dev/null +++ b/gsf/gsf-input-bzip.h @@ -0,0 +1,34 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-bzip.h: wrapper to uncompress to bzipped output + * + * Copyright (C) 2003-2006 Dom Lachowicz (cinamod@hotmail.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_INPUT_BZIP_H +#define GSF_INPUT_BZIP_H + +#include +#include + +G_BEGIN_DECLS + +GsfInput *gsf_input_memory_new_from_bzip (GsfInput *source, GError **err); + +G_END_DECLS + +#endif /* GSF_INPUT_BZIP_H */ diff --git a/gsf/gsf-input-gio.c b/gsf/gsf-input-gio.c new file mode 100644 index 0000000..f13f991 --- /dev/null +++ b/gsf/gsf-input-gio.c @@ -0,0 +1,321 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-gio.c: + * + * Copyright (C) 2007 Dom Lachowicz + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include +#include + +struct _GsfInputGio { + GsfInput input; + GFile *file; + GInputStream *stream; + guint8 *buf; + size_t buf_size; +}; + +typedef struct { + GsfInputClass input_class; +} GsfInputGioClass; + +static gboolean +can_seek (GInputStream *stream) +{ + if (!G_IS_SEEKABLE (stream)) + return FALSE; + + return g_seekable_can_seek (G_SEEKABLE (stream)); +} + +static GsfInput * +make_local_copy (GFile *file, GInputStream *stream) +{ + GsfOutput *out; + GsfInput *copy; + GFileInfo *info; + + out = gsf_output_memory_new (); + + while (1) { + guint8 buf[4096]; + gssize nread; + + nread = g_input_stream_read (stream, buf, sizeof(buf), NULL, NULL); + + if (nread > 0) { + if (!gsf_output_write (out, nread, buf)) { + copy = NULL; + goto cleanup_and_exit; + } + } + else if (nread == 0) + break; + else { + copy = NULL; + goto cleanup_and_exit; + } + } + + copy = gsf_input_memory_new_clone + (gsf_output_memory_get_bytes (GSF_OUTPUT_MEMORY (out)), + gsf_output_size (out)); + + if (copy != NULL) { + info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_NAME, 0, NULL, NULL); + if (info) { + gsf_input_set_name (GSF_INPUT (copy), g_file_info_get_name (info)); + g_object_unref (info); + } + } + + cleanup_and_exit: + + gsf_output_close (out); + g_object_unref (out); + + g_input_stream_close (stream, NULL, NULL); + g_object_unref (stream); + return copy; +} + +/** + * gsf_input_gio_new: + * @file: + * @err: optionally NULL. + * + * Returns: A new #GsfInputGio or NULL + */ +GsfInput * +gsf_input_gio_new (GFile *file, GError **err) +{ + GsfInputGio *input; + GInputStream *stream; + GFileInfo *info; + + g_return_val_if_fail (file != NULL, NULL); + + stream = (GInputStream *)g_file_read (file, NULL, err); + if (stream == NULL) + return NULL; + + if (!can_seek (stream)) + return make_local_copy (file, stream); + + info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_SIZE, 0, NULL, NULL); + if (!info) + return make_local_copy (file, stream); + + input = g_object_new (GSF_INPUT_GIO_TYPE, NULL); + if (G_UNLIKELY (NULL == input)) { + g_input_stream_close (stream, NULL, NULL); + g_object_unref (stream); + return NULL; + } + + gsf_input_set_size (GSF_INPUT (input), g_file_info_get_size (info)); + g_object_unref (info); + + g_object_ref (G_OBJECT (file)); + + input->stream = stream; + input->file = file; + input->buf = NULL; + input->buf_size = 0; + + info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_NAME, 0, NULL, NULL); + if (info) { + gsf_input_set_name (GSF_INPUT (input), g_file_info_get_name (info)); + g_object_unref (info); + } + + return GSF_INPUT (input); +} + +/** + * gsf_input_gio_new_for_path: + * @path: + * @err: optionally NULL. + * + * Returns: A new #GsfInputGio or NULL + */ +GsfInput * +gsf_input_gio_new_for_path (char const *path, GError **err) +{ + GFile *file; + GsfInput *input; + + g_return_val_if_fail (path != NULL, NULL); + + file = g_file_new_for_path (path); + input = gsf_input_gio_new (file, err); + g_object_unref (file); + + return input; +} + +/** + * gsf_input_gio_new_for_uri: + * @uri: + * @err: optionally NULL. + * + * Returns: A new #GsfInputGio or NULL + */ +GsfInput * +gsf_input_gio_new_for_uri (char const *uri, GError **err) +{ + GFile *file; + GsfInput *input; + + g_return_val_if_fail (uri != NULL, NULL); + + file = g_file_new_for_uri (uri); + input = gsf_input_gio_new (file, err); + g_object_unref (file); + + return input; +} + +static void +gsf_input_gio_finalize (GObject *obj) +{ + GObjectClass *parent_class; + GsfInputGio *input = (GsfInputGio *)obj; + + g_input_stream_close (input->stream, NULL, NULL); + g_object_unref (input->stream); + input->stream = NULL; + + g_object_unref (input->file); + input->file = NULL; + + if (input->buf != NULL) { + g_free (input->buf); + input->buf = NULL; + input->buf_size = 0; + } + + parent_class = g_type_class_peek (GSF_INPUT_TYPE); + if (parent_class && parent_class->finalize) + parent_class->finalize (obj); +} + +static GsfInput * +gsf_input_gio_dup (GsfInput *src_input, GError **err) +{ + GsfInputGio *src = (GsfInputGio *)src_input; + GFile *clone; + + g_return_val_if_fail (src_input != NULL, NULL); + g_return_val_if_fail (src->file != NULL, NULL); + + clone = g_file_dup (src->file); + if (clone != NULL) { + GsfInput *dst = gsf_input_gio_new (clone, err); + + /* + * gsf_input_gio_new() adds a ref, or fails to create a new + * file. in any case, we need to unref the clone + */ + g_object_unref (clone); + + return dst; + } + + return NULL; +} + +static guint8 const * +gsf_input_gio_read (GsfInput *input, size_t num_bytes, guint8 *buffer) +{ + GsfInputGio *gio = GSF_INPUT_GIO (input); + size_t total_read = 0; + + g_return_val_if_fail (gio != NULL, NULL); + g_return_val_if_fail (gio->stream != NULL, NULL); + + if (buffer == NULL) { + if (gio->buf_size < num_bytes) { + gio->buf_size = num_bytes; + g_free (gio->buf); + gio->buf = g_new (guint8, gio->buf_size); + } + buffer = gio->buf; + } + + while (1) { + gssize nread; + + nread = g_input_stream_read (gio->stream, (buffer + total_read), (num_bytes - total_read), NULL, NULL); + + if (nread >= 0) { + total_read += nread; + if ((size_t) total_read == num_bytes) { + return buffer; + } + } else + break; + } + + return NULL; +} + +static gboolean +gsf_input_gio_seek (GsfInput *input, gsf_off_t offset, GSeekType whence) +{ + GsfInputGio *gio = GSF_INPUT_GIO (input); + + g_return_val_if_fail (gio != NULL, TRUE); + g_return_val_if_fail (gio->stream != NULL, TRUE); + g_return_val_if_fail (can_seek (gio->stream), TRUE); + + return (g_seekable_seek (G_SEEKABLE (gio->stream), offset, whence, NULL, NULL) ? FALSE : TRUE); +} + +static void +gsf_input_gio_init (GObject *obj) +{ + GsfInputGio *gio = GSF_INPUT_GIO (obj); + + gio->file = NULL; + gio->stream = NULL; + gio->buf = NULL; + gio->buf_size = 0; +} + +static void +gsf_input_gio_class_init (GObjectClass *gobject_class) +{ + GsfInputClass *input_class = GSF_INPUT_CLASS (gobject_class); + + gobject_class->finalize = gsf_input_gio_finalize; + input_class->Dup = gsf_input_gio_dup; + input_class->Read = gsf_input_gio_read; + input_class->Seek = gsf_input_gio_seek; +} + +GSF_CLASS (GsfInputGio, gsf_input_gio, + gsf_input_gio_class_init, gsf_input_gio_init, GSF_INPUT_TYPE) + +/***************************************************************************/ +/***************************************************************************/ diff --git a/gsf/gsf-input-gio.h b/gsf/gsf-input-gio.h new file mode 100644 index 0000000..be0de68 --- /dev/null +++ b/gsf/gsf-input-gio.h @@ -0,0 +1,43 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-gio.h: + * + * Copyright (C) 2007 Dom Lachowicz + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_INPUT_GIO_H +#define GSF_INPUT_GIO_H + +#include +#include + +G_BEGIN_DECLS + +#define GSF_INPUT_GIO_TYPE (gsf_input_gio_get_type ()) +#define GSF_INPUT_GIO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_INPUT_GIO_TYPE, GsfInputGio)) +#define GSF_IS_INPUT_GIO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_INPUT_GIO_TYPE)) + +typedef struct _GsfInputGio GsfInputGio; + +GType gsf_input_gio_get_type (void); +GsfInput *gsf_input_gio_new (GFile *file, GError **err); +GsfInput *gsf_input_gio_new_for_path (char const *path, GError **err); +GsfInput *gsf_input_gio_new_for_uri (char const *uri, GError **err); + +G_END_DECLS + +#endif /* GSF_INPUT_GIO_H */ diff --git a/gsf/gsf-input-gzip.c b/gsf/gsf-input-gzip.c new file mode 100644 index 0000000..1a2c937 --- /dev/null +++ b/gsf/gsf-input-gzip.c @@ -0,0 +1,540 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-gzip.c: wrapper to uncompress gzipped input + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * Copyright (C) 2005-2006 Morten Welinder (terra@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include + +#include +#include +#include + +#define Z_BUFSIZE 0x100 + +static GObjectClass *parent_class; + +struct _GsfInputGZip { + GsfInput input; + + GsfInput *source; /* compressed data */ + gboolean raw; /* No header and no trailer. */ + GError *err; + gsf_off_t uncompressed_size; + gboolean stop_byte_added; + + z_stream stream; + guint8 const *gzipped_data; + uLong crc; /* crc32 of uncompressed data */ + + guint8 *buf; + size_t buf_size; + + gsf_off_t header_size, trailer_size; + gsf_off_t seek_skipped; +}; + +typedef struct { + GsfInputClass input_class; +} GsfInputGZipClass; + +enum { + PROP_0, + PROP_RAW, + PROP_SOURCE, + PROP_UNCOMPRESSED_SIZE +}; + +/* gzip flag byte */ +#define GZIP_IS_ASCII 0x01 /* file contains text ? */ +#define GZIP_HEADER_CRC 0x02 /* there is a CRC in the header */ +#define GZIP_EXTRA_FIELD 0x04 /* there is an 'extra' field */ +#define GZIP_ORIGINAL_NAME 0x08 /* the original is stored */ +#define GZIP_HAS_COMMENT 0x10 /* There is a comment in the header */ +#define GZIP_HEADER_FLAGS (unsigned)(GZIP_IS_ASCII |GZIP_HEADER_CRC |GZIP_EXTRA_FIELD |GZIP_ORIGINAL_NAME |GZIP_HAS_COMMENT) + +static gboolean +check_header (GsfInputGZip *input) +{ + if (input->raw) { + input->header_size = 0; + input->trailer_size = 0; + } else { + static guint8 const signature[2] = {0x1f, 0x8b}; + guint8 const *data; + unsigned flags, len; + + /* Check signature */ + if (NULL == (data = gsf_input_read (input->source, 2 + 1 + 1 + 6, NULL)) || + 0 != memcmp (data, signature, sizeof (signature))) + return TRUE; + + /* verify flags and compression type */ + flags = data[3]; + if (data[2] != Z_DEFLATED || (flags & ~GZIP_HEADER_FLAGS) != 0) + return TRUE; + + /* If we have the size, don't bother seeking to the end. */ + if (input->uncompressed_size < 0) { + /* Get the uncompressed size */ + if (gsf_input_seek (input->source, (gsf_off_t) -4, G_SEEK_END) || + NULL == (data = gsf_input_read (input->source, 4, NULL))) + return TRUE; + /* FIXME, but how? The size read here is modulo 2^32. */ + input->uncompressed_size = GSF_LE_GET_GUINT32 (data); + + if (input->uncompressed_size / 1000 > gsf_input_size (input->source)) { + g_warning ("Suspiciously well compressed file with better than 1000:1 ratio.\n" + "It is probably truncated or corrupt"); + } + } + + if (gsf_input_seek (input->source, 2 + 1 + 1 + 6, G_SEEK_SET)) + return TRUE; + + if (flags & GZIP_EXTRA_FIELD) { + if (NULL == (data = gsf_input_read (input->source, 2, NULL))) + return TRUE; + len = GSF_LE_GET_GUINT16 (data); + if (NULL == gsf_input_read (input->source, len, NULL)) + return TRUE; + } + if (flags & GZIP_ORIGINAL_NAME) { + /* Skip over the filename (which is in ISO 8859-1 encoding). */ + do { + if (NULL == (data = gsf_input_read (input->source, 1, NULL))) + return TRUE; + } while (*data != 0); + } + + if (flags & GZIP_HAS_COMMENT) { + /* Skip over the comment (which is in ISO 8859-1 encoding). */ + do { + if (NULL == (data = gsf_input_read (input->source, 1, NULL))) + return TRUE; + } while (*data != 0); + } + + if (flags & GZIP_HEADER_CRC && + NULL == (data = gsf_input_read (input->source, 2, NULL))) + return TRUE; + + input->header_size = input->source->cur_offset; + /* the last 8 bytes are the crc and size. */ + input->trailer_size = 8; + } + + gsf_input_set_size (GSF_INPUT (input), input->uncompressed_size); + + if (gsf_input_remaining (input->source) < input->trailer_size) + return TRUE; /* No room for payload */ + + return FALSE; +} + +static gboolean +init_zip (GsfInputGZip *gzip, GError **err) +{ + gsf_off_t cur_pos; + + if (Z_OK != inflateInit2 (&(gzip->stream), -MAX_WBITS)) { + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "Unable to initialize zlib"); + return TRUE; + } + + cur_pos = gsf_input_tell (gzip->source); + if (gsf_input_seek (gzip->source, 0, G_SEEK_SET)) { + if (err) + *err = g_error_new (gsf_input_error_id (), 0, + "Failed to rewind source"); + return TRUE; + } + + if (check_header (gzip) != FALSE) { + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "Invalid gzip header"); + if (gsf_input_seek (gzip->source, cur_pos, G_SEEK_SET)) { + g_warning ("attempt to restore position failed ??"); + } + return TRUE; + } + + return FALSE; +} + +/** + * gsf_input_gzip_new : + * @source : The underlying data source. + * @err : optionally %NULL. + * + * Adds a reference to @source. + * + * Returns: a new file or %NULL. + **/ +GsfInput * +gsf_input_gzip_new (GsfInput *source, GError **err) +{ + GsfInputGZip *gzip; + + g_return_val_if_fail (GSF_IS_INPUT (source), NULL); + + gzip = g_object_new (GSF_INPUT_GZIP_TYPE, + "source", source, + NULL); + if (G_UNLIKELY (NULL == gzip)) return NULL; + + if (gzip->err) { + if (err) + *err = g_error_copy (gzip->err); + g_object_unref (gzip); + return NULL; + } + gsf_input_set_name (GSF_INPUT (gzip), gsf_input_name (source)); + + return GSF_INPUT (gzip); +} + +static void +gsf_input_gzip_finalize (GObject *obj) +{ + GsfInputGZip *gzip = (GsfInputGZip *)obj; + + if (gzip->source != NULL) { + g_object_unref (G_OBJECT (gzip->source)); + gzip->source = NULL; + } + + g_free (gzip->buf); + + if (gzip->stream.state != NULL) + inflateEnd (&(gzip->stream)); + + g_clear_error (&gzip->err); + + parent_class->finalize (obj); +} + +static GsfInput * +gsf_input_gzip_dup (GsfInput *src_input, GError **err) +{ + GsfInputGZip const *src = (GsfInputGZip *)src_input; + GsfInputGZip *dst; + GsfInput *src_source_copy; + + if (src->source) { + src_source_copy = gsf_input_dup (src->source, err); + if (err) + return NULL; + } else + src_source_copy = NULL; + + dst = g_object_new (GSF_INPUT_GZIP_TYPE, + "source", src_source_copy, + "raw", src->raw, + NULL); + + if (src_source_copy) + g_object_unref (src_source_copy); + + if (G_UNLIKELY (NULL == dst)) + return NULL; + + if (src->err) { + g_clear_error (&dst->err); + dst->err = g_error_copy (src->err); + } else if (dst->err) { + if (err) + *err = g_error_copy (dst->err); + g_object_unref (dst); + return NULL; + } + + return GSF_INPUT (dst); +} + +static guint8 const * +gsf_input_gzip_read (GsfInput *input, size_t num_bytes, guint8 *buffer) +{ + GsfInputGZip *gzip = GSF_INPUT_GZIP (input); + + if (buffer == NULL) { + if (gzip->buf_size < num_bytes) { + gzip->buf_size = MAX (num_bytes, 256); + g_free (gzip->buf); + gzip->buf = g_new (guint8, gzip->buf_size); + } + buffer = gzip->buf; + } + + gzip->stream.next_out = buffer; + gzip->stream.avail_out = num_bytes; + while (gzip->stream.avail_out != 0) { + int zerr; + if (gzip->stream.avail_in == 0) { + gsf_off_t remain = gsf_input_remaining (gzip->source); + if (remain <= gzip->trailer_size) { + if (remain < gzip->trailer_size || gzip->stop_byte_added) { + g_clear_error (&gzip->err); + gzip->err = g_error_new + (gsf_input_error_id (), 0, + "truncated source"); + return NULL; + } + /* zlib requires an extra byte. */ + gzip->stream.avail_in = 1; + gzip->gzipped_data = ""; + gzip->stop_byte_added = TRUE; + } else { + size_t n = MIN (remain - gzip->trailer_size, + Z_BUFSIZE); + + gzip->gzipped_data = + gsf_input_read (gzip->source, n, NULL); + if (!gzip->gzipped_data) { + g_clear_error (&gzip->err); + gzip->err = g_error_new + (gsf_input_error_id (), 0, + "Failed to read from source"); + return NULL; + } + gzip->stream.avail_in = n; + } + gzip->stream.next_in = (Byte *)gzip->gzipped_data; + } + zerr = inflate (&(gzip->stream), Z_NO_FLUSH); + if (zerr != Z_OK) { + if (zerr != Z_STREAM_END) + return NULL; + /* Premature end of stream. */ + if (gzip->stream.avail_out != 0) + return NULL; + } + } + + gzip->crc = crc32 (gzip->crc, buffer, (uInt)(gzip->stream.next_out - buffer)); + return buffer; +} + +static gboolean +gsf_input_gzip_seek (GsfInput *input, gsf_off_t offset, GSeekType whence) +{ + GsfInputGZip *gzip = GSF_INPUT_GZIP (input); + /* Global flag -- we don't want one per stream. */ + static gboolean warned = FALSE; + gsf_off_t pos = offset; + + /* Note, that pos has already been sanity checked. */ + switch (whence) { + case G_SEEK_SET : break; + case G_SEEK_CUR : pos += input->cur_offset; break; + case G_SEEK_END : pos += input->size; break; + default : return TRUE; + } + + if (pos < input->cur_offset) { + if (gsf_input_seek (gzip->source, gzip->header_size, G_SEEK_SET)) + return TRUE; + gzip->crc = crc32 (0L, Z_NULL, 0); + gzip->stream.avail_in = 0; + if (inflateReset (&(gzip->stream)) != Z_OK) + return TRUE; + input->cur_offset = 0; + } + + if (gsf_input_seek_emulate (input, pos)) + return TRUE; + + gzip->seek_skipped += pos; + if (!warned && + gzip->seek_skipped != pos && /* Don't warn for single seek. */ + gzip->seek_skipped >= 1000000) { + warned = TRUE; + g_warning ("Seeking in gzipped streams is awfully slow."); + } + + return FALSE; +} + +static void +gsf_input_gzip_init (GObject *obj) +{ + GsfInputGZip *gzip = GSF_INPUT_GZIP (obj); + + gzip->source = NULL; + gzip->raw = FALSE; + gzip->uncompressed_size = -1; + gzip->err = NULL; + gzip->stream.zalloc = (alloc_func)0; + gzip->stream.zfree = (free_func)0; + gzip->stream.opaque = (voidpf)0; + gzip->stream.next_in = Z_NULL; + gzip->stream.next_out = Z_NULL; + gzip->stream.avail_in = gzip->stream.avail_out = 0; + gzip->crc = crc32 (0L, Z_NULL, 0); + gzip->buf = NULL; + gzip->buf_size = 0; + gzip->seek_skipped = 0; +} + +static void +gsf_input_gzip_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) +{ + GsfInputGZip *gzip = (GsfInputGZip *)object; + + switch (property_id) { + case PROP_RAW: + g_value_set_boolean (value, gzip->raw); + break; + case PROP_SOURCE: + g_value_set_object (value, gzip->source); + break; + case PROP_UNCOMPRESSED_SIZE: + g_value_set_int64 (value, gzip->uncompressed_size); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gsf_input_gzip_set_source (GsfInputGZip *gzip, GsfInput *source) +{ + if (source) + g_object_ref (GSF_INPUT (source)); + if (gzip->source) + g_object_unref (gzip->source); + gzip->source = source; +} + +static void +gsf_input_gzip_set_property (GObject *object, + guint property_id, + GValue const *value, + GParamSpec *pspec) +{ + GsfInputGZip *gzip = (GsfInputGZip *)object; + + switch (property_id) { + case PROP_RAW: + gzip->raw = g_value_get_boolean (value); + break; + case PROP_SOURCE: + gsf_input_gzip_set_source (gzip, g_value_get_object (value)); + break; + case PROP_UNCOMPRESSED_SIZE: + gzip->uncompressed_size = g_value_get_int64 (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static GObject* +gsf_input_gzip_constructor (GType type, + guint n_construct_properties, + GObjectConstructParam *construct_params) +{ + GsfInputGZip *gzip; + + gzip = (GsfInputGZip *)(parent_class->constructor (type, + n_construct_properties, + construct_params)); + + if (!gzip->source) { + g_clear_error (&gzip->err); + gzip->err = g_error_new (gsf_input_error_id (), 0, + "NULL source"); + } else if (gzip->raw && gzip->uncompressed_size < 0) { + g_clear_error (&gzip->err); + gzip->err = g_error_new (gsf_input_error_id (), 0, + "Uncompressed size not set"); + } else if (init_zip (gzip, &gzip->err) != FALSE) { + /* Nothing more. */ + } + + return (GObject *)gzip; +} + +static void +gsf_input_gzip_class_init (GObjectClass *gobject_class) +{ + GsfInputClass *input_class = GSF_INPUT_CLASS (gobject_class); + + gobject_class->constructor = gsf_input_gzip_constructor; + gobject_class->finalize = gsf_input_gzip_finalize; + gobject_class->set_property = gsf_input_gzip_set_property; + gobject_class->get_property = gsf_input_gzip_get_property; + input_class->Dup = gsf_input_gzip_dup; + input_class->Read = gsf_input_gzip_read; + input_class->Seek = gsf_input_gzip_seek; + + g_object_class_install_property + (gobject_class, + PROP_RAW, + g_param_spec_boolean ("raw", "Raw", + "Whether to read compressed data with no header and no trailer.", + FALSE, + GSF_PARAM_STATIC | + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY)); + g_object_class_install_property + (gobject_class, + PROP_SOURCE, + g_param_spec_object ("source", "Source", + "Where the compressed data comes from.", + GSF_INPUT_TYPE, + GSF_PARAM_STATIC | + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY)); + /** + * GsfInputGzip:uncompressed_size: + * + * The size that the data will have after uncompression. + * The is mandatory for raw streams and if the uncompressed size is + * larger than 4GB. + */ + g_object_class_install_property + (gobject_class, + PROP_UNCOMPRESSED_SIZE, + g_param_spec_int64 ("uncompressed-size", "Size after decompression", + "The source's uncompressed size", + -1, G_MAXINT64, -1, + GSF_PARAM_STATIC | + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY)); + + parent_class = g_type_class_peek_parent (gobject_class); +} + +GSF_CLASS (GsfInputGZip, gsf_input_gzip, + gsf_input_gzip_class_init, gsf_input_gzip_init, + GSF_INPUT_TYPE) + diff --git a/gsf/gsf-input-gzip.h b/gsf/gsf-input-gzip.h new file mode 100644 index 0000000..bd72cbc --- /dev/null +++ b/gsf/gsf-input-gzip.h @@ -0,0 +1,42 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-gzip.h: wrapper to uncompress gzipped input + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_INPUT_GZIP_H +#define GSF_INPUT_GZIP_H + +#include + +G_BEGIN_DECLS + +#define GSF_INPUT_GZIP_TYPE (gsf_input_gzip_get_type ()) +#define GSF_INPUT_GZIP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_INPUT_GZIP_TYPE, GsfInputGZip)) +#define GSF_IS_INPUT_GZIP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_INPUT_GZIP_TYPE)) + +typedef struct _GsfInputGZip GsfInputGZip; + +GType gsf_input_gzip_get_type (void) G_GNUC_CONST; +/* void gsf_input_gzip_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfInput *gsf_input_gzip_new (GsfInput *source, GError **err); + +G_END_DECLS + +#endif /* GSF_INPUT_GZIP_H */ diff --git a/gsf/gsf-input-http.c b/gsf/gsf-input-http.c new file mode 100644 index 0000000..3613da3 --- /dev/null +++ b/gsf/gsf-input-http.c @@ -0,0 +1,290 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-http.c: retrieves input via HTTP + * + * Copyright (C) 2006 Michael Lawrence (lawremi@iastate.edu) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include + +struct _GsfInputHTTP { + GsfInput input; + /*< private > */ + gchar *url; + gchar *content_type; + gpointer ctx; + guint8 *buf; + gsize buf_size; +}; + +typedef struct { + GsfInputClass input; +} GsfInputHTTPClass; + +static void gsf_input_http_set_property (GObject *object, guint property_id, + GValue const *value, + GParamSpec *pspec); +static void gsf_input_http_get_property (GObject *object, guint property_id, + GValue *value, GParamSpec *pspec); +static void gsf_input_http_init (GObject *obj); +static void gsf_input_http_class_init (GsfInputHTTPClass *c); +static GsfInput *gsf_input_http_dup (GsfInput *src, GError **err); +static guint8 const *gsf_input_http_read (GsfInput *input, size_t num_bytes, + guint8 *buffer); +static gboolean gsf_input_http_seek (GsfInput *input, gsf_off_t offset, + GSeekType whence); + +enum +{ + PROP_0, + PROP_URL, + PROP_CONTENT_TYPE +}; + +/* pointer to the class of our parent */ +static GsfInputClass *parent_class = NULL; + +static void +gsf_input_http_finalize (GObject *obj_input) +{ + GsfInputHTTP *input = GSF_INPUT_HTTP (obj_input); + + g_free (input->url); + input->url = NULL; + + g_free (input->content_type); + input->content_type = NULL; + + if (input->ctx) { + xmlNanoHTTPClose ((gpointer) input->ctx); + input->ctx = NULL; + } + + g_free (input->buf); + input->buf = NULL; + + ((GObjectClass *)parent_class)->finalize (obj_input); +} + +static void +gsf_input_http_init (GObject *obj) +{ + GsfInputHTTP *http = GSF_INPUT_HTTP (obj); + + http->url = NULL; + http->content_type = NULL; + http->ctx = NULL; + http->buf = NULL; + http->buf_size = 0; +} + +static void +gsf_input_http_class_init (GsfInputHTTPClass *c) +{ + GObjectClass *g_object_class = (GObjectClass *) c; + GsfInputClass *gsf_input_class = (GsfInputClass *) c; + GParamSpec *param_spec; + + parent_class = g_type_class_ref (gsf_input_get_type ()); + + gsf_input_class->Dup = gsf_input_http_dup; + gsf_input_class->Read = gsf_input_http_read; + gsf_input_class->Seek = gsf_input_http_seek; + g_object_class->finalize = gsf_input_http_finalize; + g_object_class->get_property = gsf_input_http_get_property; + g_object_class->set_property = gsf_input_http_set_property; + + param_spec = g_param_spec_string ("url" /* name */ , + "URL" /* nick */ , + "HTTP URL accessed by this stream" + /* blurb */ , + NULL /* default_value */ , + (GParamFlags) (G_PARAM_READABLE | + G_PARAM_WRITABLE | + G_PARAM_CONSTRUCT_ONLY)); + g_object_class_install_property (g_object_class, PROP_URL, + param_spec); + + param_spec = g_param_spec_string ("content_type" /* name */ , + "mime type" /* nick */ , + "Content-Type in HTTP header" /* blurb */ + , NULL /* default_value */ , + (GParamFlags) (G_PARAM_READABLE | + G_PARAM_WRITABLE | + G_PARAM_CONSTRUCT_ONLY)); + g_object_class_install_property (g_object_class, PROP_CONTENT_TYPE, + param_spec); +} + +static void +gsf_input_http_set_property (GObject *object, + guint property_id, + GValue const *VAL, GParamSpec *pspec) +{ + GsfInputHTTP *input; + char *old; + + input = GSF_INPUT_HTTP (object); + + switch (property_id) { + case PROP_URL: + old = input->url; + input->url = g_value_dup_string (VAL); + g_free (old); + break; + case PROP_CONTENT_TYPE: + old = input->content_type; + input->content_type = g_value_dup_string (VAL); + g_free (old); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, + pspec); + break; + } +} + +static void +gsf_input_http_get_property (GObject *object, + guint property_id, + GValue *VAL, GParamSpec *pspec) +{ + GsfInputHTTP *input; + + input = GSF_INPUT_HTTP (object); + + switch (property_id) { + case PROP_URL: + g_value_set_string (VAL, input->url); + break; + case PROP_CONTENT_TYPE: + g_value_set_string (VAL, input->content_type); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, + pspec); + break; + } +} + +/** + * gsf_input_http_get_url : + * @input: #GsfInputHTTP + * + * Returns: an allocated string containing the URL used for input. + **/ +gchar * +gsf_input_http_get_url (GsfInputHTTP *input) +{ + gchar *url; + g_return_val_if_fail(GSF_IS_INPUT_HTTP(input), NULL); + g_object_get (G_OBJECT (input), "url", &url, NULL); + return url; +} + +/** + * gsf_input_http_get_content_type : + * @input: #GsfInputHTTP + * + * Returns: an allocated string containing the Content-Type field of the HTTP response. + **/ +gchar * +gsf_input_http_get_content_type (GsfInputHTTP *input) +{ + gchar *content_type; + g_return_val_if_fail(GSF_IS_INPUT_HTTP(input), NULL); + g_object_get (G_OBJECT (input), "content_type", &content_type, NULL); + return content_type; +} + +/** + * gsf_input_http_new : + * @url: A string containing the URL to retrieve + * @error: Holds any errors encountered when establishing the HTTP connection + * + * Returns: an open HTTP connection, ready for reading. + **/ +GsfInput * +gsf_input_http_new (gchar const * url, GError **error G_GNUC_UNUSED) +{ + GObject *obj; + gpointer ctx; + char *content_type; + + g_return_val_if_fail(url != NULL, NULL); + + ctx = xmlNanoHTTPOpen (url, &content_type); + if (!ctx) /* no meaningful errors provided by nanohttp */ + return NULL; + + obj = g_object_new (GSF_INPUT_HTTP_TYPE, + "url", url, + "content-type", content_type, + NULL); + if (G_UNLIKELY (NULL == obj)) return NULL; + + gsf_input_set_size (GSF_INPUT (obj), xmlNanoHTTPContentLength (ctx)); + GSF_INPUT_HTTP (obj)->ctx = ctx; + + return GSF_INPUT (obj); +} + +static GsfInput * +gsf_input_http_dup (GsfInput *src, GError **err) +{ + return gsf_input_http_new (GSF_INPUT_HTTP (src)->url, err); +} + +static guint8 const * +gsf_input_http_read (GsfInput *input, size_t num_bytes, guint8 *buffer) +{ + int nread; + size_t total_read; + gpointer ctx = GSF_INPUT_HTTP (input)->ctx; + GsfInputHTTP *input_http = GSF_INPUT_HTTP (input); + + if (buffer == NULL) { + if (input_http->buf_size < num_bytes) { + input_http->buf_size = num_bytes; + g_free (input_http->buf); + input_http->buf = g_new (guint8, input_http->buf_size); + } + buffer = input_http->buf; + } + + for (total_read = 0; total_read < num_bytes; total_read += nread) { + nread = xmlNanoHTTPRead (ctx, buffer, num_bytes - total_read); + if (nread <= 0) + return NULL; + } + return buffer; +} + +static gboolean +gsf_input_http_seek (GsfInput *input G_GNUC_UNUSED, + gsf_off_t offset G_GNUC_UNUSED, GSeekType whence G_GNUC_UNUSED) +{ + return FALSE; +} + +GSF_CLASS (GsfInputHTTP, gsf_input_http, + gsf_input_http_class_init, gsf_input_http_init, + GSF_INPUT_TYPE) diff --git a/gsf/gsf-input-http.h b/gsf/gsf-input-http.h new file mode 100644 index 0000000..bf2df4f --- /dev/null +++ b/gsf/gsf-input-http.h @@ -0,0 +1,44 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-http.h: + * + * Copyright (C) 2006 Michael Lawrence (lawremi@iastate.edu) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef __GSF_INPUT_HTTP_H__ +#define __GSF_INPUT_HTTP_H__ + +#include + +G_BEGIN_DECLS + +#define GSF_INPUT_HTTP_TYPE (gsf_input_http_get_type()) +#define GSF_INPUT_HTTP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GSF_INPUT_HTTP_TYPE, GsfInputHTTP)) +#define GSF_IS_INPUT_HTTP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GSF_INPUT_HTTP_TYPE)) + +typedef struct _GsfInputHTTP GsfInputHTTP; + +GType gsf_input_http_get_type (void) G_GNUC_CONST; +/* void gsf_input_http_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfInput *gsf_input_http_new (gchar const *url, GError **error); +gchar *gsf_input_http_get_url (GsfInputHTTP *input); +gchar *gsf_input_http_get_content_type (GsfInputHTTP *input); + +G_END_DECLS + +#endif /* __GSF_INPUT_HTTP_H__ */ diff --git a/gsf/gsf-input-impl.h b/gsf/gsf-input-impl.h new file mode 100644 index 0000000..7c05e9a --- /dev/null +++ b/gsf/gsf-input-impl.h @@ -0,0 +1,69 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-impl.h: implementation details of GsfInput + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_INPUT_IMPL_H +#define GSF_INPUT_IMPL_H + +#include +#include +#include + +G_BEGIN_DECLS + +struct _GsfInput { + GObject g_object; + + gsf_off_t size, cur_offset; + char *name; + GsfInfile *container; +}; + +typedef struct { + GObjectClass g_object_class; + + GsfInput *(*Dup) (GsfInput *input, GError **err); + const guint8 *(*Read) (GsfInput *input, size_t num_bytes, + guint8 *optional_buffer); + gboolean (*Seek) (GsfInput *input, gsf_off_t offset, + GSeekType whence); + GsfInput *(*OpenSibling) (GsfInput const *input, + char const *path, GError **err); + + /* Padding for future expansion */ + void (*_gsf_reserved0) (void); + void (*_gsf_reserved1) (void); + void (*_gsf_reserved2) (void); + void (*_gsf_reserved3) (void); +} GsfInputClass; + +#define GSF_INPUT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSF_INPUT_TYPE, GsfInputClass)) +#define GSF_IS_INPUT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSF_INPUT_TYPE)) + +/* protected */ +gboolean gsf_input_set_name (GsfInput *input, char const *name); +gboolean gsf_input_set_name_from_filename (GsfInput *input, char const *filename); +gboolean gsf_input_set_container (GsfInput *input, GsfInfile *container); +gboolean gsf_input_set_size (GsfInput *input, gsf_off_t size); +gboolean gsf_input_seek_emulate (GsfInput *input, gsf_off_t pos); + +G_END_DECLS + +#endif /* GSF_INPUT_IMPL_H */ diff --git a/gsf/gsf-input-iochannel.c b/gsf/gsf-input-iochannel.c new file mode 100644 index 0000000..300fd12 --- /dev/null +++ b/gsf/gsf-input-iochannel.c @@ -0,0 +1,47 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-iochannel.c: GIOChannel based input + * + * Copyright (C) 2003-2006 Rodrigo Moya (rodrigo@gnome-db.org) + * Copyright (C) 2003-2006 Dom Lachowicz (cinamod@hotmail.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include + +/** + * gsf_input_memory_new_from_iochannel : + * @channel : a #GIOChannel. + * @error : a #GError + * + * Returns: a new #GsfInputMemory or NULL. + **/ +GsfInput * +gsf_input_memory_new_from_iochannel (GIOChannel *channel, + GError **err) +{ + gchar *buf; + gsize len; + + g_return_val_if_fail (channel != NULL, NULL); + + if (G_IO_STATUS_NORMAL != g_io_channel_read_to_end (channel, &buf, &len, err)) + return NULL; + + return gsf_input_memory_new (buf, len, TRUE); +} diff --git a/gsf/gsf-input-iochannel.h b/gsf/gsf-input-iochannel.h new file mode 100644 index 0000000..8f73869 --- /dev/null +++ b/gsf/gsf-input-iochannel.h @@ -0,0 +1,35 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-iochannel.h: interface for use by the structured file layer to read data from IO channels + * + * Copyright (C) 2002-2006 Rodrigo Moya (rodrigo@gnome-db.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_INPUT_IOCHANNEL_H +#define GSF_INPUT_IOCHANNEL_H + +#include +#include + +G_BEGIN_DECLS + +GsfInput *gsf_input_memory_new_from_iochannel (GIOChannel *channel, + GError **error); + +G_END_DECLS + +#endif /* GSF_INPUT_IOCHANNEL_H */ diff --git a/gsf/gsf-input-memory.c b/gsf/gsf-input-memory.c new file mode 100644 index 0000000..98a51a0 --- /dev/null +++ b/gsf/gsf-input-memory.c @@ -0,0 +1,322 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-memory.c: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_MMAP + +#if defined(FREEBSD) || defined(__FreeBSD__) +/* We must keep the file open while pages are mapped. */ +/* http://www.freebsd.org/cgi/query-pr.cgi?pr=48291 */ +#define HAVE_BROKEN_MMAP +#endif /* defined(FREEBSD) || defined(__FreeBSD__) */ + +#elif defined(G_OS_WIN32) + +#include +#include +#include +#include +#include +#include + +#define MAP_FAILED NULL +#endif /* HAVE_MMAP */ + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +static GObjectClass *parent_class; + +struct _GsfInputMemory { + GsfInput parent; + GsfSharedMemory *shared; +#ifdef HAVE_BROKEN_MMAP + int fd; +#endif +}; +typedef GsfInputClass GsfInputMemoryClass; + +/** + * gsf_input_memory_new: + * @buf: The input bytes + * @length: The length of @buf + * @needs_free: Whether you want this memory to be free'd at object destruction + * + * Returns: A new #GsfInputMemory + */ +GsfInput * +gsf_input_memory_new (guint8 const *buf, gsf_off_t length, gboolean needs_free) +{ + GsfInputMemory *mem = g_object_new (GSF_INPUT_MEMORY_TYPE, NULL); + if (G_UNLIKELY (NULL == mem)) return NULL; + + mem->shared = gsf_shared_memory_new ((void *)buf, length, needs_free); + gsf_input_set_size (GSF_INPUT (mem), length); + return GSF_INPUT (mem); +} + +/** + * gsf_input_memory_new_clone: + * @buf: The input bytes + * @length: The length of @buf + * + * Returns: A new #GsfInputMemory + **/ +GsfInput * +gsf_input_memory_new_clone (guint8 const *buf, gsf_off_t length) +{ + GsfInputMemory *mem = NULL; + void *cpy; + + g_return_val_if_fail (buf != NULL || length == 0, NULL); + g_return_val_if_fail (length >= 0, NULL); + + mem = g_object_new (GSF_INPUT_MEMORY_TYPE, NULL); + if (G_UNLIKELY (NULL == mem)) return NULL; + + cpy = g_try_malloc (MAX (1, length) * sizeof (guint8)); + if (cpy == NULL) { + g_object_unref (mem); + return NULL; + } + memcpy (cpy, buf, length); + mem->shared = gsf_shared_memory_new (cpy, length, TRUE); + gsf_input_set_size (GSF_INPUT (mem), length); + return GSF_INPUT (mem); +} + +static void +gsf_input_memory_finalize (GObject *obj) +{ + GsfInputMemory *mem = (GsfInputMemory *) (obj); + + if (mem->shared) + g_object_unref (G_OBJECT (mem->shared)); + +#ifdef HAVE_BROKEN_MMAP + if (mem->fd != -1) + close (mem->fd); +#endif + + parent_class->finalize (obj); +} + +static GsfInput * +gsf_input_memory_dup (GsfInput *src_input, G_GNUC_UNUSED GError **err) +{ + GsfInputMemory const *src = (GsfInputMemory *) (src_input); + GsfInputMemory *dst = g_object_new (GSF_INPUT_MEMORY_TYPE, NULL); + if (G_UNLIKELY (NULL == dst)) return NULL; + + dst->shared = src->shared; + g_object_ref (G_OBJECT (dst->shared)); + gsf_input_set_size (GSF_INPUT (dst), src->shared->size); + +#ifdef HAVE_BROKEN_MMAP + if (src->fd != -1) + dst->fd = dup (src->fd); +#endif + + return GSF_INPUT (dst); +} + +static guint8 const * +gsf_input_memory_read (GsfInput *input, size_t num_bytes, guint8 *optional_buffer) +{ + GsfInputMemory *mem = (GsfInputMemory *) (input); + guchar const *src = mem->shared->buf; + + if (src == NULL) + return NULL; + if (optional_buffer) { + memcpy (optional_buffer, src + input->cur_offset, num_bytes); + return optional_buffer; + } else + return src + input->cur_offset; +} + +static gboolean +gsf_input_memory_seek (G_GNUC_UNUSED GsfInput *input, + G_GNUC_UNUSED gsf_off_t offset, + G_GNUC_UNUSED GSeekType whence) +{ + return FALSE; +} + +static void +gsf_input_memory_init (GObject *obj) +{ + GsfInputMemory *mem = (GsfInputMemory *) (obj); + mem->shared = NULL; +#ifdef HAVE_BROKEN_MMAP + mem->fd = -1; +#endif +} + +static void +gsf_input_memory_class_init (GObjectClass *gobject_class) +{ + GsfInputClass *input_class = GSF_INPUT_CLASS (gobject_class); + + gobject_class->finalize = gsf_input_memory_finalize; + input_class->Dup = gsf_input_memory_dup; + input_class->Read = gsf_input_memory_read; + input_class->Seek = gsf_input_memory_seek; + + parent_class = g_type_class_peek_parent (gobject_class); +} + +GSF_CLASS (GsfInputMemory, gsf_input_memory, + gsf_input_memory_class_init, gsf_input_memory_init, + GSF_INPUT_TYPE) + +/***************************************************************************/ + +#ifdef HAVE_MMAP + +#include +#include +#include +#include +#include +#include + +#ifndef PROT_READ +#define PROT_READ 0x1 +#endif /* PROT_READ */ + +#if !defined(MAP_FAILED) || defined(__osf__) +/* Someone needs their head examined - BSD ? */ +# define MAP_FAILED ((void *)-1) +#endif /* !defined(MAP_FAILED) || defined(__osf__) */ + +#endif /* HAVE_MMAP */ + +/** + * gsf_input_mmap_new: + * @filename: The file on disk that you want to mmap + * @err: A #GError, or optionally %null + * + * Returns: A new #GsfInputMemory + */ +GsfInput * +gsf_input_mmap_new (char const *filename, GError **err) +{ +#if defined(HAVE_MMAP) || defined(G_OS_WIN32) + GsfInputMemory *mem; + guint8 *buf = NULL; + struct stat st; + int fd; + size_t size; + + mem = g_object_new (GSF_INPUT_MEMORY_TYPE, NULL); + if (G_UNLIKELY (NULL == mem)) return NULL; + + fd = g_open (filename, O_RDONLY | O_BINARY, 0); + if (fd < 0 || fstat (fd, &st) < 0) { + if (err != NULL) { + int save_errno = errno; + char *utf8name = g_filename_display_name (filename); + *err = g_error_new (gsf_input_error_id (), 0, + "%s: %s", + utf8name, g_strerror (save_errno)); + g_free (utf8name); + } + if (fd >= 0) close (fd); + return NULL; + } + + if (!S_ISREG (st.st_mode)) { + if (err != NULL) { + char *utf8name = g_filename_display_name (filename); + *err = g_error_new (gsf_input_error_id (), 0, + "%s: Is not a regular file", + utf8name); + g_free (utf8name); + } + close (fd); + return NULL; + } + + size = (size_t) st.st_size; + if ((off_t) size != st.st_size) { /* Check for overflow */ + if (err != NULL) { + char *utf8name = g_filename_display_name (filename); + *err = g_error_new (gsf_input_error_id (), 0, + "%s: File too large to be memory mapped", + utf8name); + g_free (utf8name); + } + close (fd); + return NULL; + } + +#ifdef G_OS_WIN32 + { + HANDLE handle = CreateFileMapping ((HANDLE)_get_osfhandle (fd), NULL, PAGE_READONLY, 0, 0, NULL); + buf = MapViewOfFile (handle, FILE_MAP_READ, 0, 0, 0); + CloseHandle (handle); + } +#else + buf = mmap (NULL, size, PROT_READ, MAP_SHARED, fd, (off_t) 0); +#endif + + if (buf == MAP_FAILED) { + if (err != NULL) { + int save_errno = errno; + char *utf8name = g_filename_display_name (filename); + *err = g_error_new (gsf_input_error_id (), 0, + "%s: %s", + utf8name, g_strerror (save_errno)); + g_free (utf8name); + } + close (fd); + return NULL; + } + + mem->shared = gsf_shared_memory_mmapped_new (buf, (gsf_off_t) size); + gsf_input_set_size (GSF_INPUT (mem), (gsf_off_t) size); + gsf_input_set_name (GSF_INPUT (mem), filename); + +#ifdef HAVE_BROKEN_MMAP + mem->fd = fd; +#else + close (fd); +#endif + + return GSF_INPUT (mem); +#else + (void)filename; + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "mmap not supported"); + return NULL; +#endif +} diff --git a/gsf/gsf-input-memory.h b/gsf/gsf-input-memory.h new file mode 100644 index 0000000..a1222f1 --- /dev/null +++ b/gsf/gsf-input-memory.h @@ -0,0 +1,45 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-memory.h: interface for used by the ole layer to read raw data + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_INPUT_MEMORY_H +#define GSF_INPUT_MEMORY_H + +#include + +G_BEGIN_DECLS + +#define GSF_INPUT_MEMORY_TYPE (gsf_input_memory_get_type ()) +#define GSF_INPUT_MEMORY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_INPUT_MEMORY_TYPE, GsfInputMemory)) +#define GSF_IS_INPUT_MEMORY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_INPUT_MEMORY_TYPE)) + +typedef struct _GsfInputMemory GsfInputMemory; + +GType gsf_input_memory_get_type (void) G_GNUC_CONST; +/* void gsf_input_memory_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfInput *gsf_input_memory_new (guint8 const *buf, gsf_off_t length, + gboolean needs_free); +GsfInput *gsf_input_memory_new_clone (guint8 const *buf, gsf_off_t length); +GsfInput *gsf_input_mmap_new (char const *filename, GError **err); + +G_END_DECLS + +#endif /* GSF_INPUT_MEMORY_H */ diff --git a/gsf/gsf-input-proxy.c b/gsf/gsf-input-proxy.c new file mode 100644 index 0000000..edebb37 --- /dev/null +++ b/gsf/gsf-input-proxy.c @@ -0,0 +1,174 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-proxy.c: proxy object (with its own current position) + * + * Copyright (C) 2004-2006 Morten Welinder (terra@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include + +static GObjectClass *parent_class; + +struct _GsfInputProxy { + GsfInput input; + + GsfInput *source; + gsf_off_t offset; +}; + +typedef struct { + GsfInputClass input_class; +} GsfInputProxyClass; + + +/** + * gsf_input_proxy_new_section : + * @source : The underlying data source. + * @offset : Offset into source for start of section. + * @size : Length of section. + * + * This creates a new proxy to a section of the given source. The new + * object will have its own current position, but any operation on it + * can change the source's position. + * + * If a proxy to a proxy is created, the intermediate proxy is short- + * circuited. + * + * This function will ref the source. + * + * Returns: a new input object. + **/ +GsfInput * +gsf_input_proxy_new_section (GsfInput *source, + gsf_off_t offset, + gsf_off_t size) +{ + GsfInputProxy *proxy; + gsf_off_t source_size; + + g_return_val_if_fail (GSF_IS_INPUT (source), NULL); + g_return_val_if_fail (offset >= 0, NULL); + + source_size = gsf_input_size (source); + g_return_val_if_fail (offset <= source_size, NULL); + g_return_val_if_fail (size <= source_size - offset, NULL); + + proxy = g_object_new (GSF_INPUT_PROXY_TYPE, NULL); + if (G_UNLIKELY (NULL == proxy)) return NULL; + + proxy->offset = offset; + gsf_input_set_size (GSF_INPUT (proxy), size); + gsf_input_set_name (GSF_INPUT (proxy), gsf_input_name (source)); + + /* Short-circuit multiple proxies. */ + if (GSF_IS_INPUT_PROXY (source)) { + GsfInputProxy *proxy_source = GSF_INPUT_PROXY (source); + proxy->offset += proxy_source->offset; + source = proxy_source->source; + } + + proxy->source = g_object_ref (source); + return GSF_INPUT (proxy); +} + +/** + * gsf_input_proxy_new : + * @source : The underlying data source. + * + * This creates a new proxy to the entire, given input source. See + * gsf_input_proxy_new_section for details. + * + * Returns: a new input object. + **/ +GsfInput * +gsf_input_proxy_new (GsfInput *source) +{ + return gsf_input_proxy_new_section (source, 0, gsf_input_size (source)); +} + +static void +gsf_input_proxy_finalize (GObject *obj) +{ + GsfInputProxy *proxy = (GsfInputProxy *)obj; + + if (proxy->source != NULL) { + g_object_unref (G_OBJECT (proxy->source)); + proxy->source = NULL; + } + + parent_class->finalize (obj); +} + +static GsfInput * +gsf_input_proxy_dup (GsfInput *src_input, G_GNUC_UNUSED GError **err) +{ + return gsf_input_proxy_new (src_input); +} + +static guint8 const * +gsf_input_proxy_read (GsfInput *input, size_t num_bytes, guint8 *buffer) +{ + GsfInputProxy *proxy = GSF_INPUT_PROXY (input); + + /* Seek to our position in the source. */ + if (gsf_input_seek (proxy->source, + proxy->offset + gsf_input_tell (input), + G_SEEK_SET)) + return NULL; + + /* Read the data. */ + return gsf_input_read (proxy->source, num_bytes, buffer); +} + +static gboolean +gsf_input_proxy_seek (G_GNUC_UNUSED GsfInput *input, + G_GNUC_UNUSED gsf_off_t offset, + G_GNUC_UNUSED GSeekType whence) +{ + return FALSE; +} + +static void +gsf_input_proxy_init (GObject *obj) +{ + GsfInputProxy *proxy = GSF_INPUT_PROXY (obj); + + proxy->source = NULL; + proxy->offset = 0; +} + +static void +gsf_input_proxy_class_init (GObjectClass *gobject_class) +{ + GsfInputClass *input_class = GSF_INPUT_CLASS (gobject_class); + + gobject_class->finalize = gsf_input_proxy_finalize; + input_class->Dup = gsf_input_proxy_dup; + input_class->Read = gsf_input_proxy_read; + input_class->Seek = gsf_input_proxy_seek; + + parent_class = g_type_class_peek_parent (gobject_class); +} + +GSF_CLASS (GsfInputProxy, gsf_input_proxy, + gsf_input_proxy_class_init, gsf_input_proxy_init, + GSF_INPUT_TYPE) + diff --git a/gsf/gsf-input-proxy.h b/gsf/gsf-input-proxy.h new file mode 100644 index 0000000..461af03 --- /dev/null +++ b/gsf/gsf-input-proxy.h @@ -0,0 +1,45 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-proxy.h: proxy object (with its own current position) + * + * Copyright (C) 2004-2006 Morten Welinder (terra@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_INPUT_PROXY_H +#define GSF_INPUT_PROXY_H + +#include + +G_BEGIN_DECLS + +#define GSF_INPUT_PROXY_TYPE (gsf_input_proxy_get_type ()) +#define GSF_INPUT_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_INPUT_PROXY_TYPE, GsfInputProxy)) +#define GSF_IS_INPUT_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_INPUT_PROXY_TYPE)) + +typedef struct _GsfInputProxy GsfInputProxy; + +GType gsf_input_proxy_get_type (void) G_GNUC_CONST; +/* void gsf_input_proxy_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfInput *gsf_input_proxy_new (GsfInput *source); +GsfInput *gsf_input_proxy_new_section (GsfInput *source, + gsf_off_t offset, + gsf_off_t size); + +G_END_DECLS + +#endif /* GSF_INPUT_PROXY_H */ diff --git a/gsf/gsf-input-stdio.c b/gsf/gsf-input-stdio.c new file mode 100644 index 0000000..5af68a0 --- /dev/null +++ b/gsf/gsf-input-stdio.c @@ -0,0 +1,332 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-stdio.c: stdio based input + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#include + +static GObjectClass *parent_class; + +struct _GsfInputStdio { + GsfInput input; + + FILE *file; + char *filename; + guint8 *buf; + size_t buf_size; + gboolean keep_open; +}; + +typedef struct { + GsfInputClass input_class; +} GsfInputStdioClass; + +static GsfInput * +make_local_copy (FILE *stream, const char *filename, GError **err) +{ + GsfOutput *out; + GsfInput *copy = NULL; + + out = gsf_output_memory_new (); + + while (1) { + guint8 buf[4096]; + gssize nread; + + nread = fread (buf, 1, sizeof(buf), stream); + + if (nread > 0) { + if (!gsf_output_write (out, nread, buf)) + goto error; + } else if (nread == 0) + break; + else + goto error; + } + + copy = gsf_input_memory_new_clone + (gsf_output_memory_get_bytes (GSF_OUTPUT_MEMORY (out)), + gsf_output_size (out)); + + gsf_output_close (out); + g_object_unref (out); + + if (filename) + gsf_input_set_name_from_filename (GSF_INPUT (copy), filename); + + return copy; + +error: + if (err) { + char *utf8name = filename + ? g_filename_display_name (filename) + : g_strdup ("?"); + g_set_error (err, gsf_input_error_id (), 0, + "%s: not a regular file", + utf8name); + g_free (utf8name); + } + + gsf_output_close (out); + g_object_unref (out); + + return NULL; +} + +/** + * gsf_input_stdio_new : + * @filename : in utf8. + * @err : optionally NULL. + * + * Returns: a new file or NULL. + **/ +/* coverity[ -tainted_string_sink_content : arg-0 ] */ +GsfInput * +gsf_input_stdio_new (char const *filename, GError **err) +{ + GsfInputStdio *input; + struct stat st; + FILE *file; + gsf_off_t size; + + g_return_val_if_fail (filename != NULL, NULL); + + file = g_fopen (filename, "rb"); + if (file == NULL) { + if (err) { + int save_errno = errno; + char *utf8name = g_filename_display_name (filename); + g_set_error (err, + G_FILE_ERROR, + g_file_error_from_errno (save_errno), + "%s: %s", + utf8name, g_strerror (save_errno)); + g_free (utf8name); + } + return NULL; + } + + if (fstat (fileno (file), &st) < 0 || !S_ISREG (st.st_mode)) { + GsfInput *res = make_local_copy (file, filename, err); + fclose (file); + return res; + } + + size = st.st_size; + input = (GsfInputStdio *)g_object_new (GSF_INPUT_STDIO_TYPE, NULL); + if (G_UNLIKELY (NULL == input)) { + fclose (file); + return NULL; + } + + input->file = file; + input->filename = g_strdup (filename); + input->buf = NULL; + input->buf_size = 0; + input->keep_open = FALSE; + gsf_input_set_size (GSF_INPUT (input), size); + gsf_input_set_name_from_filename (GSF_INPUT (input), filename); + + return GSF_INPUT (input); +} + +/** + * gsf_input_stdio_new_FILE : + * @filename : The filename corresponding to @file. + * @file : an existing stdio FILE * + * @keep_open : Should @file be closed when the wrapper is closed + * + * Assumes ownership of @file when succeeding. If @keep_open is true, + * ownership reverts to caller when the GsfObject is closed. + * + * Returns: a new GsfInput wrapper for @file. Note that if the file is not + * seekable, this function will make a local copy of the entire file. + **/ +GsfInput * +gsf_input_stdio_new_FILE (char const *filename, FILE *file, gboolean keep_open) +{ + GsfInputStdio *stdio; + struct stat st; + gsf_off_t size; + + g_return_val_if_fail (filename != NULL, NULL); + g_return_val_if_fail (file != NULL, NULL); + + if (fstat (fileno (file), &st) < 0 || !S_ISREG (st.st_mode)) { + return make_local_copy (file, filename, NULL); + } + + size = st.st_size; + + stdio = g_object_new (GSF_INPUT_STDIO_TYPE, NULL); + if (G_UNLIKELY (NULL == stdio)) return NULL; + stdio->file = file; + stdio->keep_open = keep_open; + stdio->filename = g_strdup (filename); + gsf_input_set_size (GSF_INPUT (stdio), size); + gsf_input_set_name_from_filename (GSF_INPUT (stdio), filename); + return GSF_INPUT (stdio); +} + +static void +gsf_input_stdio_finalize (GObject *obj) +{ + GsfInputStdio *input = (GsfInputStdio *)obj; + + if (input->file != NULL) { + if (!input->keep_open) + fclose (input->file); + input->file = NULL; + } + + g_free (input->buf); + input->buf = NULL; + input->buf_size = 0; + + g_free (input->filename); + + parent_class->finalize (obj); +} + +static GsfInput * +gsf_input_stdio_dup (GsfInput *src_input, GError **err) +{ + GsfInputStdio const *src = (GsfInputStdio *)src_input; + return gsf_input_stdio_new (src->filename, err); +} + +static guint8 const * +gsf_input_stdio_read (GsfInput *input, size_t num_bytes, + guint8 *buffer) +{ + GsfInputStdio *stdio = GSF_INPUT_STDIO (input); + size_t nread = 0, total_read = 0; + + g_return_val_if_fail (stdio != NULL, NULL); + g_return_val_if_fail (stdio->file != NULL, NULL); + + if (buffer == NULL) { + if (stdio->buf_size < num_bytes) { + stdio->buf_size = num_bytes; + g_free (stdio->buf); + stdio->buf = g_new (guint8, stdio->buf_size); + } + buffer = stdio->buf; + } + + while (total_read < num_bytes) { + nread = fread (buffer + total_read, 1, + num_bytes - total_read, stdio->file); + total_read += nread; + if (total_read < num_bytes && + (ferror (stdio->file) || feof (stdio->file))) + return NULL; + } + + return buffer; +} + +static gboolean +gsf_input_stdio_seek (GsfInput *input, gsf_off_t offset, GSeekType whence) +{ + GsfInputStdio const *stdio = GSF_INPUT_STDIO (input); + int stdio_whence = SEEK_SET; + +#ifndef HAVE_FSEEKO + long loffset; +#else + off_t loffset; +#endif + + if (stdio->file == NULL) + return TRUE; + + loffset = offset; + if ((gsf_off_t) loffset != offset) { /* Check for overflow */ +#ifdef HAVE_FSEEKO + g_warning ("offset too large for fseeko"); +#else + g_warning ("offset too large for fseek"); +#endif + return TRUE; + } + switch (whence) { + case G_SEEK_CUR : stdio_whence = SEEK_CUR; break; + case G_SEEK_END : stdio_whence = SEEK_END; break; + case G_SEEK_SET: + default: + break; + } + + errno = 0; +#ifdef HAVE_FSEEKO + if (0 == fseeko (stdio->file, loffset, stdio_whence)) + return FALSE; +#else + if (0 == fseek (stdio->file, loffset, stdio_whence)) + return FALSE; +#endif + + return TRUE; +} + +static void +gsf_input_stdio_init (GObject *obj) +{ + GsfInputStdio *stdio = GSF_INPUT_STDIO (obj); + + stdio->file = NULL; + stdio->filename = NULL; + stdio->buf = NULL; + stdio->buf_size = 0; + stdio->keep_open = FALSE; +} + +static void +gsf_input_stdio_class_init (GObjectClass *gobject_class) +{ + GsfInputClass *input_class = GSF_INPUT_CLASS (gobject_class); + + gobject_class->finalize = gsf_input_stdio_finalize; + input_class->Dup = gsf_input_stdio_dup; + input_class->Read = gsf_input_stdio_read; + input_class->Seek = gsf_input_stdio_seek; + + parent_class = g_type_class_peek_parent (gobject_class); +} + +GSF_CLASS (GsfInputStdio, gsf_input_stdio, + gsf_input_stdio_class_init, gsf_input_stdio_init, + GSF_INPUT_TYPE) + diff --git a/gsf/gsf-input-stdio.h b/gsf/gsf-input-stdio.h new file mode 100644 index 0000000..7ccb661 --- /dev/null +++ b/gsf/gsf-input-stdio.h @@ -0,0 +1,46 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-stdio.h: interface for use by the structured file layer to read raw data + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_INPUT_STDIO_H +#define GSF_INPUT_STDIO_H + +#include +#include + +G_BEGIN_DECLS + +#define GSF_INPUT_STDIO_TYPE (gsf_input_stdio_get_type ()) +#define GSF_INPUT_STDIO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_INPUT_STDIO_TYPE, GsfInputStdio)) +#define GSF_IS_INPUT_STDIO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_INPUT_STDIO_TYPE)) + +typedef struct _GsfInputStdio GsfInputStdio; + +GType gsf_input_stdio_get_type (void) G_GNUC_CONST; +/* void gsf_input_stdio_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfInput *gsf_input_stdio_new (char const *filename, GError **err); + +GsfInput *gsf_input_stdio_new_FILE (char const *filename, FILE *file, + gboolean keep_open); + +G_END_DECLS + +#endif /* GSF_INPUT_STDIO_H */ diff --git a/gsf/gsf-input-textline.c b/gsf/gsf-input-textline.c new file mode 100644 index 0000000..5a8b0a4 --- /dev/null +++ b/gsf/gsf-input-textline.c @@ -0,0 +1,325 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-textline.c: textline based input + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include + +#include + +static GObjectClass *parent_class; + +struct _GsfInputTextline { + GsfInput input; + + GsfInput *source; + guint8 const *remainder; + unsigned remainder_size; + unsigned max_line_size; + + unsigned char *buf; + unsigned buf_size; + + /* int current_line; */ +}; + +typedef struct { + GsfInputClass input_class; +} GsfInputTextlineClass; + +/** + * gsf_input_textline_new : + * @source : in some combination of ascii and utf8 + * + * This adds a reference to @source. + * + * Returns: a new file or %NULL. + **/ +GsfInput * +gsf_input_textline_new (GsfInput *source) +{ + GsfInputTextline *input; + + g_return_val_if_fail (source != NULL, NULL); + + input = g_object_new (GSF_INPUT_TEXTLINE_TYPE, NULL); + if (G_UNLIKELY (NULL == input)) return NULL; + + g_object_ref (G_OBJECT (source)); + input->source = source; + input->buf = NULL; + input->buf_size = 0; + gsf_input_set_size (GSF_INPUT (input), gsf_input_size (source)); + gsf_input_set_name (GSF_INPUT (input), gsf_input_name (source)); + + return GSF_INPUT (input); +} + +static void +gsf_input_textline_finalize (GObject *obj) +{ + GsfInputTextline *input = (GsfInputTextline *)obj; + + if (input->source != NULL) { + g_object_unref (G_OBJECT (input->source)); + input->source = NULL; + } + g_free (input->buf); + input->buf = NULL; + input->buf_size = 0; + + parent_class->finalize (obj); +} + +static GsfInput * +gsf_input_textline_dup (GsfInput *src_input, G_GNUC_UNUSED GError **err) +{ + GsfInputTextline const *src = (GsfInputTextline *)src_input; + GsfInputTextline *dst = g_object_new (GSF_INPUT_TEXTLINE_TYPE, NULL); + if (G_UNLIKELY (NULL == dst)) return NULL; + + dst->source = src->source; + g_object_ref (G_OBJECT (dst->source)); + gsf_input_set_size (GSF_INPUT (dst), gsf_input_size (src_input)); + + return GSF_INPUT (dst); +} + +static guint8 const * +gsf_input_textline_read (GsfInput *input, size_t num_bytes, guint8 *buffer) +{ + GsfInputTextline *textline = GSF_INPUT_TEXTLINE (input); + textline->remainder = NULL; + return gsf_input_read (textline->source, num_bytes, buffer); +} + +static gboolean +gsf_input_textline_seek (GsfInput *input, gsf_off_t offset, GSeekType whence) +{ + GsfInputTextline *textline = GSF_INPUT_TEXTLINE (input); + textline->remainder = NULL; + return gsf_input_seek (textline->source, offset, whence); +} + +static void +gsf_input_textline_init (GObject *obj) +{ + GsfInputTextline *textline = GSF_INPUT_TEXTLINE (obj); + + textline->source = NULL; + textline->remainder = NULL; + textline->remainder_size = 0; + textline->max_line_size = 512; /* an initial guess */ + textline->buf = NULL; + textline->buf_size = 0; +} + +static void +gsf_input_textline_class_init (GObjectClass *gobject_class) +{ + GsfInputClass *input_class = GSF_INPUT_CLASS (gobject_class); + + gobject_class->finalize = gsf_input_textline_finalize; + input_class->Dup = gsf_input_textline_dup; + input_class->Read = gsf_input_textline_read; + input_class->Seek = gsf_input_textline_seek; + + parent_class = g_type_class_peek_parent (gobject_class); +} + +GSF_CLASS (GsfInputTextline, gsf_input_textline, + gsf_input_textline_class_init, gsf_input_textline_init, + GSF_INPUT_TYPE) + +/** + * gsf_input_textline_ascii_gets : + * @textline : #GsfInputTextline + * + * A utility routine to read things line by line from the underlying source. + * Trailing newlines and carriage returns are stripped, and the resultant buffer + * can be edited. + * + * Returns: the string read, or %NULL on eof. + **/ +unsigned char * +gsf_input_textline_ascii_gets (GsfInputTextline *textline) +{ + guint8 const *ptr ,*end; + gsf_off_t remain; + unsigned len, count = 0; + + g_return_val_if_fail (textline != NULL, NULL); + + while (1) { + if (textline->remainder == NULL || + textline->remainder_size == 0) { + remain = gsf_input_remaining (textline->source); + len = MIN (remain, textline->max_line_size); + + textline->remainder = gsf_input_read (textline->source, len, NULL); + if (textline->remainder == NULL) + return NULL; + textline->remainder_size = len; + } + + ptr = textline->remainder; + end = ptr + textline->remainder_size; + for (; ptr < end ; ptr++) + if (*ptr == '\n' || *ptr == '\r') + break; + + /* copy the remains into the buffer, grow it if necessary */ + len = ptr - textline->remainder; + if (count + len >= textline->buf_size) { + textline->buf_size += len; + textline->buf = g_renew (guint8, textline->buf, + textline->buf_size + 1); + } + + g_return_val_if_fail (textline->buf != NULL, NULL); + + memcpy (textline->buf + count, textline->remainder, len); + count += len; + + if (ptr < end) { + unsigned char last = ptr [0]; + + /* eat the trailing new line */ + ptr++; + if (ptr >= end) { + /* be extra careful, the newline is at the bound */ + if (gsf_input_remaining (textline->source) > 0) { + ptr = gsf_input_read (textline->source, 1, NULL); + if (ptr == NULL) + return NULL; + textline->remainder = ptr; + textline->remainder_size = 1; + end = ptr + 1; + } else + ptr = end = NULL; + } + if (ptr != NULL && + ((last == '\n' && *ptr == '\r') || + (last == '\r' && *ptr == '\n'))) + ptr++; + break; + } else if (gsf_input_remaining (textline->source) <= 0) { + ptr = end = NULL; + break; + } else + textline->remainder = NULL; + + } + + textline->remainder = ptr; + textline->remainder_size = end - ptr; + + textline->buf [count] = '\0'; + return textline->buf; +} + +/** + * gsf_input_textline_utf8_gets : + * @textline : #GsfInputTextline + * + * A utility routine to read things line by line from the underlying source. + * Trailing newlines and carriage returns are stripped, and the resultant buffer + * can be edited. + * + * Returns: the string read, or %NULL on eof. + **/ +guint8 * +gsf_input_textline_utf8_gets (GsfInputTextline *textline) +{ + guint8 const *ptr ,*end; + gsf_off_t remain; + unsigned len, count = 0; + + g_return_val_if_fail (textline != NULL, NULL); + + while (1) { + if (textline->remainder == NULL || + textline->remainder_size == 0) { + remain = gsf_input_remaining (textline->source); + len = MIN (remain, textline->max_line_size); + + textline->remainder = gsf_input_read (textline->source, len, NULL); + if (textline->remainder == NULL) + return NULL; + textline->remainder_size = len; + } + + ptr = textline->remainder; + end = ptr + textline->remainder_size; + for (; ptr < end ; ptr = (guint8 *) g_utf8_next_char (ptr)) + if (*ptr == '\n' || *ptr == '\r') + break; + + /* copy the remains into the buffer, grow it if necessary */ + len = ptr - textline->remainder; + if (count + len >= textline->buf_size) { + textline->buf_size += len; + textline->buf = g_renew (guint8, textline->buf, + textline->buf_size + 1); + } + + g_return_val_if_fail (textline->buf != NULL, NULL); + + memcpy (textline->buf + count, textline->remainder, len); + count += len; + + if (ptr < end) { + unsigned char last = ptr [0]; + + /* eat the trailing new line */ + ptr++; + if (ptr >= end) { + /* be extra careful, the newline is at the bound */ + if (gsf_input_remaining (textline->source) > 0) { + ptr = gsf_input_read (textline->source, 1, NULL); + if (ptr == NULL) + return NULL; + textline->remainder = ptr; + textline->remainder_size = 1; + end = ptr + 1; + } else + ptr = end = NULL; + } + if (ptr != NULL && + ((last == '\n' && *ptr == '\r') || + (last == '\r' && *ptr == '\n'))) + ptr++; + break; + } else if (gsf_input_remaining (textline->source) <= 0) { + ptr = end = NULL; + break; + } else + textline->remainder = NULL; + + } + + textline->remainder = ptr; + textline->remainder_size = end - ptr; + + textline->buf [count] = '\0'; + return textline->buf; +} diff --git a/gsf/gsf-input-textline.h b/gsf/gsf-input-textline.h new file mode 100644 index 0000000..0da5305 --- /dev/null +++ b/gsf/gsf-input-textline.h @@ -0,0 +1,45 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input-textline.h: a utility wrapper to pull in text, line by line. + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_INPUT_TEXTLINE_H +#define GSF_INPUT_TEXTLINE_H + +#include + +G_BEGIN_DECLS + +#define GSF_INPUT_TEXTLINE_TYPE (gsf_input_textline_get_type ()) +#define GSF_INPUT_TEXTLINE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_INPUT_TEXTLINE_TYPE, GsfInputTextline)) +#define GSF_IS_INPUT_TEXTLINE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_INPUT_TEXTLINE_TYPE)) + +typedef struct _GsfInputTextline GsfInputTextline; + +GType gsf_input_textline_get_type (void) G_GNUC_CONST; +/* void gsf_input_textline_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + + +GsfInput *gsf_input_textline_new (GsfInput *source); +unsigned char *gsf_input_textline_ascii_gets (GsfInputTextline *textline); +guint8 *gsf_input_textline_utf8_gets (GsfInputTextline *textline); + +G_END_DECLS + +#endif /* GSF_INPUT_TEXTLINE_H */ diff --git a/gsf/gsf-input.c b/gsf/gsf-input.c new file mode 100644 index 0000000..2b28a7f --- /dev/null +++ b/gsf/gsf-input.c @@ -0,0 +1,657 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input.c: interface for used by the ole layer to read raw data + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include + +#ifdef HAVE_BZ2 +#include +#endif + +#define GET_CLASS(instance) G_TYPE_INSTANCE_GET_CLASS (instance, GSF_INPUT_TYPE, GsfInputClass) + +static GObjectClass *parent_class; + +enum { + PROP_0, + PROP_NAME, + PROP_SIZE, + PROP_EOF, + PROP_REMAINING, + PROP_POS +}; + +#if 0 +static void +gsf_input_set_property (GObject *object, + guint property_id, + GValue const *value, + GParamSpec *pspec) +{ + switch (property_id) + { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} +#endif + +static void +gsf_input_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) +{ + /* gsf_off_t is typedef'd to gint64 */ + switch (property_id) { + case PROP_NAME: + g_value_set_string (value, gsf_input_name (GSF_INPUT (object))); + break; + case PROP_SIZE: + g_value_set_int64 (value, gsf_input_size (GSF_INPUT (object))); + break; + case PROP_EOF: + g_value_set_boolean (value, gsf_input_eof (GSF_INPUT (object))); + break; + case PROP_REMAINING: + g_value_set_int64 (value, gsf_input_remaining (GSF_INPUT (object))); + break; + case PROP_POS: + g_value_set_int64 (value, gsf_input_tell (GSF_INPUT (object))); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gsf_input_finalize (GObject *obj) +{ + GsfInput *input = GSF_INPUT (obj); + + g_free (input->name); + input->name = NULL; + if (input->container != NULL) { + g_object_unref (G_OBJECT (input->container)); + input->container = NULL; + } + parent_class->finalize (obj); +} + +static void +gsf_input_init (GObject *obj) +{ + GsfInput *input = GSF_INPUT (obj); + + input->size = 0; + input->cur_offset = 0; + input->name = NULL; + input->container = NULL; +} + +static void +gsf_input_class_init (GObjectClass *gobject_class) +{ + parent_class = g_type_class_peek_parent (gobject_class); + + gobject_class->finalize = gsf_input_finalize; + /* gobject_class->set_property = gsf_input_set_property; */ + gobject_class->get_property = gsf_input_get_property; + + g_object_class_install_property (gobject_class, + PROP_NAME, + g_param_spec_string ("name", "Name", + "The Input's Name", + NULL, + GSF_PARAM_STATIC | + G_PARAM_READABLE)); + g_object_class_install_property (gobject_class, + PROP_SIZE, + g_param_spec_int64 ("size", "Size", + "The Input's Size", + 0, G_MAXINT64, 0, + GSF_PARAM_STATIC | + G_PARAM_READABLE)); + g_object_class_install_property (gobject_class, + PROP_EOF, + g_param_spec_boolean ("eof", "OEF", + "End Of File", + FALSE, + GSF_PARAM_STATIC | + G_PARAM_READABLE)); + g_object_class_install_property (gobject_class, + PROP_REMAINING, + g_param_spec_int64 ("remaining", "Remaining", + "Amount of Data Remaining", + 0, G_MAXINT64, 0, + GSF_PARAM_STATIC | + G_PARAM_READABLE)); + g_object_class_install_property (gobject_class, + PROP_POS, + g_param_spec_int64 ("position", "Position", + "The Output's Current Position", + 0, G_MAXINT64, 0, + GSF_PARAM_STATIC | + G_PARAM_READABLE)); +} + +GSF_CLASS_ABSTRACT (GsfInput, gsf_input, + gsf_input_class_init, gsf_input_init, + G_TYPE_OBJECT) + +/** + * gsf_input_name : + * @input: the input stream + * + * The name of the input stream. + * + * Returns: @input's name in utf8 form, or %NULL if it has no name. + **/ +char const * +gsf_input_name (GsfInput *input) +{ + g_return_val_if_fail (GSF_IS_INPUT (input), NULL); + return input->name; +} + +/** + * gsf_input_container : + * @input: the input stream + * + * Returns: but does not add a reference to @input's container. + * Potentially %NULL + **/ +GsfInfile * +gsf_input_container (GsfInput *input) +{ + g_return_val_if_fail (GSF_IS_INPUT (input), NULL); + return input->container; +} + +/** + * gsf_input_dup : + * @input: The input to duplicate + * @err: optionally %NULL + * + * Duplicates input @src leaving the new one at the same offset. + * + * Returns: the duplicate, or %NULL on error + **/ +GsfInput * +gsf_input_dup (GsfInput *input, GError **err) +{ + GsfInput *dst; + + g_return_val_if_fail (input != NULL, NULL); + + dst = GET_CLASS (input)->Dup (input, err); + if (dst != NULL) { + if (dst->size != input->size) { + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "Duplicate size mismatch"); + g_object_unref (dst); + return NULL; + } + if (gsf_input_seek (dst, input->cur_offset, G_SEEK_SET)) { + if (err != NULL) + *err = g_error_new (gsf_input_error_id (), 0, + "Seek failed"); + g_object_unref (dst); + return NULL; + } + + if (input->name != NULL) + gsf_input_set_name (dst, input->name); + dst->container = input->container; + if (dst->container != NULL) + g_object_ref (G_OBJECT (dst->container)); + } + return dst; +} + +/** + * gsf_input_open_sibling : + * @input: The input + * + * UNIMPLEMENTED BY ANY BACKEND + * and it is probably unnecessary. gsf_input_get_container provides + * enough power to do what is necessary. + * + * Attempts to open a 'sibling' of @input. The caller is responsible for + * managing the resulting object. + * + * Returns: A related #GsfInput or %NULL on failure. + **/ +GsfInput * +gsf_input_sibling (GsfInput const *input, char const *name, GError **err) +{ + g_return_val_if_fail (GET_CLASS (input)->OpenSibling, NULL); + + return GET_CLASS (input)->OpenSibling (input, name, err); +} + +/** + * gsf_input_size : + * @input: The input + * + * Looks up and caches the number of bytes in the input + * + * Returns: the size or -1 on error + **/ +gsf_off_t +gsf_input_size (GsfInput *input) +{ + g_return_val_if_fail (input != NULL, -1); + return input->size; +} + +/** + * gsf_input_eof : + * @input: the input + * + * Are we at the end of the file ? + * + * Returns: TRUE if the input is at the eof. + **/ +gboolean +gsf_input_eof (GsfInput *input) +{ + g_return_val_if_fail (input != NULL, FALSE); + + return input->cur_offset >= input->size; +} + +/** + * gsf_input_read : + * @input: the input stream + * @num_bytes: number of bytes to read + * @optional_buffer: %NULL, or pointer to destination memory area + * + * Read at least @num_bytes. Does not change the current position if there + * is an error. Will only read if the entire amount can be read. Invalidates + * the buffer associated with previous calls to gsf_input_read. + * + * Returns: pointer to the buffer or %NULL if there is an error or 0 bytes are + * requested. + **/ +guint8 const * +gsf_input_read (GsfInput *input, size_t num_bytes, guint8 *optional_buffer) +{ + guint8 const *res; + gsf_off_t newpos = input->cur_offset + num_bytes; + + g_return_val_if_fail (input != NULL, NULL); + + if (num_bytes == 0 || newpos > input->size) + return NULL; + res = GET_CLASS (input)->Read (input, num_bytes, optional_buffer); + if (res == NULL) + return NULL; + + input->cur_offset = newpos; + return res; +} + +/** + * gsf_input_remaining : + * @input: the input stream + * + * Returns: the number of bytes left in the file. + **/ +gsf_off_t +gsf_input_remaining (GsfInput *input) +{ + g_return_val_if_fail (input != NULL, 0); + + return input->size - input->cur_offset; +} + +/** + * gsf_input_tell : + * @input: the input stream + * + * Returns: the current offset in the file. + **/ +gsf_off_t +gsf_input_tell (GsfInput *input) +{ + g_return_val_if_fail (input != NULL, 0); + + return input->cur_offset; +} + +/** + * gsf_input_seek : + * @input: the input stream + * @offset: target offset + * @whence: determines whether the offset is relative to the beginning or + * the end of the stream, or to the current location. + * + * Move the current location in the input stream. + * + * Returns: TRUE on error. + **/ +gboolean +gsf_input_seek (GsfInput *input, gsf_off_t offset, GSeekType whence) +{ + gsf_off_t pos = offset; + + g_return_val_if_fail (input != NULL, TRUE); + + switch (whence) { + case G_SEEK_SET : break; + case G_SEEK_CUR : pos += input->cur_offset; break; + case G_SEEK_END : pos += input->size; break; + default : return TRUE; + } + + if (pos < 0 || pos > input->size) + return TRUE; + + /* + * If we go nowhere, just return. This in particular handles null + * seeks for streams with no seek method. + */ + if (pos == input->cur_offset) + return FALSE; + + if (GET_CLASS (input)->Seek (input, offset, whence)) + return TRUE; + + input->cur_offset = pos; + return FALSE; +} + +/** + * gsf_input_set_name : + * @input: the input stream + * @name: the new name of the stream, or %NULL. + * + * protected. + * + * Returns: TRUE if the assignment was ok. + **/ +gboolean +gsf_input_set_name (GsfInput *input, char const *name) +{ + char *buf; + + g_return_val_if_fail (input != NULL, FALSE); + + buf = g_strdup (name); + g_free (input->name); + input->name = buf; + return TRUE; +} + +/** + * gsf_input_set_name_from_filename : + * @input: the input stream + * @filename: the (fs-sys encoded) filename + * + * protected. + * + * Returns: TRUE if the assignment was ok. + **/ +gboolean +gsf_input_set_name_from_filename (GsfInput *input, char const *filename) +{ + g_return_val_if_fail (input != NULL, FALSE); + + g_free (input->name); + input->name = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL); + return TRUE; +} + + +/** + * gsf_input_set_container : + * @input: the input stream + * @container: + * + * Returns: TRUE if the assignment was ok. + */ +gboolean +gsf_input_set_container (GsfInput *input, GsfInfile *container) +{ + g_return_val_if_fail (input != NULL, FALSE); + + if (container != NULL) + g_object_ref (G_OBJECT (container)); + if (input->container != NULL) + g_object_unref (G_OBJECT (input->container)); + input->container = container; + return TRUE; +} + +/** + * gsf_input_set_size : + * @input: the input stream + * @size: the size of the stream + * + * Returns: TRUE if the assignment was ok. + */ +gboolean +gsf_input_set_size (GsfInput *input, gsf_off_t size) +{ + g_return_val_if_fail (input != NULL, FALSE); + g_return_val_if_fail (size >= 0, FALSE); + + input->size = size; + return TRUE; +} + +/** + * gsf_input_seek_emulate : + * @input: stream to emulate seek for + * @pos: absolute position to seek to + * + * Emulate forward seeks by reading. + * + * Returns: TRUE if the emulation failed. + */ +gboolean +gsf_input_seek_emulate (GsfInput *input, gsf_off_t pos) +{ + if (pos < input->cur_offset) + return TRUE; + + while (pos > input->cur_offset) { + gsf_off_t readcount = MIN (pos - input->cur_offset, 8192); + if (!gsf_input_read (input, readcount, NULL)) + return TRUE; + } + return FALSE; +} + +/****************************************************************************/ + +/** + * gsf_input_error_id : + * + * Returns: A utility quark to flag a GError as being an input problem. + */ +GQuark +gsf_input_error_id (void) +{ + static GQuark quark; + if (!quark) + quark = g_quark_from_static_string ("gsf_input_error_id"); + return quark; +} + +/** + * gsf_input_error : + * + * Deprecated as of GSF 1.12.0; use gsf_input_error_id() instead. + * + * Returns: A utility quark to flag a GError as being an input problem. + */ +GQuark +gsf_input_error (void) +{ + return gsf_input_error_id (); +} + +/****************************************************************************/ + +#define GSF_READ_BUFSIZE (1024 * 4) + +/** + * gsf_input_copy : + * @input: a non-null #GsfInput + * @output: a non-null #GsfOutput + * + * Copy the contents from @input to @output from their respective + * current positions. So if you want to be sure to copy *everything*, + * make sure to call gsf_input_seek (input, 0, G_SEEK_SET) and + * gsf_output_seek (output, 0, G_SEEK_SET) first, if applicable. + * + * Returns: TRUE on Success + **/ +gboolean +gsf_input_copy (GsfInput *input, GsfOutput *output) +{ + gsf_off_t remaining = 0; + gsf_off_t toread = 0; + const guint8 * buffer = NULL; + gboolean success = TRUE; + + g_return_val_if_fail (input != NULL, FALSE); + g_return_val_if_fail (output != NULL, FALSE); + + while ((remaining = gsf_input_remaining (input)) > 0 && (success)) { + toread = MIN (remaining, GSF_READ_BUFSIZE); + if (NULL == (buffer = gsf_input_read (input, toread, NULL))) + success = FALSE; + else + success = gsf_output_write (output, toread, buffer); + } + + return success; +} + +/****************************************************************************/ + +/** + * gsf_input_uncompress : + * @src: stream to be uncompressed. + * + * This functions takes ownership of the incoming reference and yields a + * new one as its output. + * + * Returns: A stream equivalent to the source stream, but uncompressed if + * the source was compressed. + **/ +GsfInput * +gsf_input_uncompress (GsfInput *src) +{ + gsf_off_t cur_offset = src->cur_offset; + const guint8 *data; + + if (gsf_input_seek (src, 0, G_SEEK_SET)) + goto error; + + /* Read header up front, so we avoid extra seeks in tests. */ + data = gsf_input_read (src, 4, NULL); + if (!data) + goto error; + + /* Let's try gzip. */ + { + const unsigned char gzip_sig[2] = { 0x1f, 0x8b }; + + if (memcmp (gzip_sig, data, sizeof (gzip_sig)) == 0) { + GsfInput *res = gsf_input_gzip_new (src, NULL); + if (res) { + g_object_unref (G_OBJECT (src)); + return gsf_input_uncompress (res); + } + } + } + +#ifdef HAVE_BZ2 + /* Let's try bzip. */ + { + guint8 const *bzip_sig = "BZh"; + + if (memcmp (bzip_sig, data, strlen (bzip_sig)) == 0) { + GsfInput *res = gsf_input_memory_new_from_bzip (src, NULL); + if (res) { + g_object_unref (G_OBJECT (src)); + return gsf_input_uncompress (res); + } + } + } +#endif + + /* Other methods go here. */ + + error: + (void)gsf_input_seek (src, cur_offset, G_SEEK_SET); + return src; +} + +#if 0 + +#include + +#ifdef HAVE_GNOME +#include +#endif + +GsfInput * +gsf_input_new_for_uri (char const * uri, GError ** err) +{ + GsfInput * input = NULL; + size_t len; + + g_return_val_if_fail (uri, NULL); + + len = strlen (uri); + g_return_val_if_fail (len, NULL); + + if (len > 3 && !strstr (uri, ":/")) { + /* assume plain file */ + input = gsf_input_stdio_new (uri, err); + } else { +#if HAVE_GNOME + /* have gnome, let GnomeVFS deal with this */ + input = gsf_input_gnomevfs_new (uri, err); +#else + if (len > 7 && !strncmp (uri, "file:/", 6)) { + /* dumb attempt to translate this into a local path */ + input = gsf_input_stdio_new (uri+7, err); + } + /* else: unknown or unhandled protocol - bail */ +#endif + } + + return input; +} + +#endif diff --git a/gsf/gsf-input.h b/gsf/gsf-input.h new file mode 100644 index 0000000..469e278 --- /dev/null +++ b/gsf/gsf-input.h @@ -0,0 +1,65 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-input.h: abstract interface for reading data + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_INPUT_H +#define GSF_INPUT_H + +#include +#include +#include +#include + +G_BEGIN_DECLS + +#define GSF_INPUT_TYPE (gsf_input_get_type ()) +#define GSF_INPUT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_INPUT_TYPE, GsfInput)) +#define GSF_IS_INPUT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_INPUT_TYPE)) + +GType gsf_input_get_type (void) G_GNUC_CONST; +/* void gsf_input_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +char const *gsf_input_name (GsfInput *input); +GsfInfile *gsf_input_container (GsfInput *input); + +GsfInput *gsf_input_dup (GsfInput *input, GError **err); +GsfInput *gsf_input_sibling (GsfInput const *input, char const *name, GError **err); +gsf_off_t gsf_input_size (GsfInput *input); +gboolean gsf_input_eof (GsfInput *input); +guint8 const *gsf_input_read (GsfInput *input, size_t num_bytes, + guint8 *optional_buffer); +gsf_off_t gsf_input_remaining (GsfInput *input); +gsf_off_t gsf_input_tell (GsfInput *input); +gboolean gsf_input_seek (GsfInput *input, + gsf_off_t offset, GSeekType whence); + +/* Utilities */ +gboolean gsf_input_copy (GsfInput *input, GsfOutput *output); +GsfInput *gsf_input_uncompress (GsfInput *src); + +GQuark gsf_input_error_id (void); +#ifndef GSF_DISABLE_DEPRECATED +/* deprecated in 1.12.0, use gsf_input_error_id */ +GQuark gsf_input_error (void); +#endif /* GSF_DISABLE_DEPRECATED */ + +G_END_DECLS + +#endif /* GSF_INPUT_H */ diff --git a/gsf/gsf-libxml.c b/gsf/gsf-libxml.c new file mode 100644 index 0000000..4bfa0ff --- /dev/null +++ b/gsf/gsf-libxml.c @@ -0,0 +1,1942 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-libxml.c : + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +static GObjectClass *parent_class; + +static gint +glade_enum_from_string (GType type, const char *string) +{ + GEnumClass *eclass; + GEnumValue *ev; + gchar *endptr; + gint ret = 0; + + ret = strtoul(string, &endptr, 0); + if (endptr != string) /* parsed a number */ + return ret; + + eclass = g_type_class_ref (type); + ev = g_enum_get_value_by_name (eclass, string); + if (!ev) ev = g_enum_get_value_by_nick (eclass, string); + if (ev) ret = ev->value; + + g_type_class_unref (eclass); + + return ret; +} + +static char const * +glade_string_from_enum (GType type, gint value) +{ + GEnumClass *eclass; + GEnumValue *ev; + + eclass = g_type_class_ref (type); + + ev = g_enum_get_value (eclass, value); + + g_type_class_unref (eclass); + + return ev ? ev->value_name : "0"; +} + +static guint +glade_flags_from_string (GType type, const char *string) +{ + GFlagsClass *fclass; + gchar *endptr, *prevptr; + guint i, j, ret = 0; + char *flagstr; + + ret = strtoul(string, &endptr, 0); + if (endptr != string) /* parsed a number */ + return ret; + + fclass = g_type_class_ref(type); + + + flagstr = g_strdup (string); + for (ret = i = j = 0; ; i++) { + gboolean eos; + + eos = flagstr [i] == '\0'; + + if (eos || flagstr [i] == '|') { + GFlagsValue *fv; + const char *flag; + gunichar ch; + + flag = &flagstr [j]; + endptr = &flagstr [i]; + + if (!eos) { + flagstr [i++] = '\0'; + j = i; + } + + /* trim spaces */ + for (;;) + { + ch = g_utf8_get_char (flag); + if (!g_unichar_isspace (ch)) + break; + flag = g_utf8_next_char (flag); + } + + while (endptr > flag) + { + prevptr = g_utf8_prev_char (endptr); + ch = g_utf8_get_char (prevptr); + if (!g_unichar_isspace (ch)) + break; + endptr = prevptr; + } + + if (endptr > flag) + { + *endptr = '\0'; + fv = g_flags_get_value_by_name (fclass, flag); + + if (!fv) + fv = g_flags_get_value_by_nick (fclass, flag); + + if (fv) + ret |= fv->value; + else + g_warning ("Unknown flag: '%s'", flag); + } + + if (eos) + break; + } + } + + g_free (flagstr); + + g_type_class_unref(fclass); + + return ret; +} +static gchar * +glade_string_from_flags (GType type, guint flags) +{ + GFlagsClass *flags_class; + GString *string; + char *ret; + + flags_class = g_type_class_ref (type); + + string = g_string_new (""); + + if (flags_class->n_values) + { + GFlagsValue *fval; + + for (fval = flags_class->values; fval->value_name; fval++) + { + /* We have to be careful as some flags include 0 values, e.g. + BonoboDockItemBehavior uses 0 for BONOBO_DOCK_ITEM_BEH_NORMAL. + If a 0 value is available, we only output it if the entire + flags value is 0, otherwise we check if the bit-flag is set. */ + if ((fval->value == 0 && flags == 0) + || (fval->value && (fval->value & flags) == fval->value)) + { + if (string->len) + g_string_append_c (string, '|'); + g_string_append (string, fval->value_name); + } + } + } + + ret = string->str; + g_string_free (string, FALSE); + + g_type_class_unref (flags_class); + + return ret; +} + +/** + * gsf_xml_gvalue_from_str : + * @res : Result value + * @t : Type of data + * @str : Value string + * + * Try to parse @str as a value of type @t into @res. + * + * Returns: True when parsing of @str as a value of type @t was succesfull; + * false otherwise. + */ +gboolean +gsf_xml_gvalue_from_str (GValue *res, GType t, char const *str) +{ + g_return_val_if_fail (res != NULL, FALSE); + g_return_val_if_fail (str != NULL, FALSE); + + g_value_init (res, t); + + /* If the passed-in type is derived from G_TYPE_ENUM + * or G_TYPE_FLAGS, we cannot switch on its type + * because we don't know its GType at compile time. + * We just pretend to have a G_TYPE_ENUM/G_TYPE_FLAGS. + */ + if (G_TYPE_FUNDAMENTAL (t) == G_TYPE_ENUM || + G_TYPE_FUNDAMENTAL (t) == G_TYPE_FLAGS) { + t = G_TYPE_FUNDAMENTAL (t); + } + + switch (t) { + case G_TYPE_CHAR: + g_value_set_char (res, str[0]); + break; + case G_TYPE_UCHAR: + g_value_set_uchar (res, (guchar)str[0]); + break; + case G_TYPE_BOOLEAN: + g_value_set_boolean (res, + g_ascii_tolower (str[0]) == 't' || + g_ascii_tolower (str[0]) == 'y' || + strtol (str, NULL, 0)); + break; + case G_TYPE_INT: + g_value_set_int (res, strtol (str, NULL, 0)); + break; + case G_TYPE_UINT: + g_value_set_uint (res, strtoul (str, NULL, 0)); + break; + case G_TYPE_LONG: + g_value_set_long (res, strtol (str, NULL, 0)); + break; + case G_TYPE_ULONG: + g_value_set_ulong (res, strtoul (str, NULL, 0)); + break; + case G_TYPE_ENUM: + g_value_set_enum (res, glade_enum_from_string (G_VALUE_TYPE (res), str)); + break; + case G_TYPE_FLAGS: + g_value_set_flags (res, glade_flags_from_string (G_VALUE_TYPE (res), str)); + break; + case G_TYPE_FLOAT: + g_value_set_float (res, g_strtod (str, NULL)); + break; + case G_TYPE_DOUBLE: + g_value_set_double (res, g_strtod (str, NULL)); + break; + case G_TYPE_STRING: + g_value_set_string (res, str); + break; + + default: + if (GSF_TIMESTAMP_TYPE == t) { + GsfTimestamp *ts = gsf_timestamp_new (); + gboolean ok = gsf_timestamp_from_string (str, ts); + if (ok) + gsf_value_set_timestamp (res, ts); + gsf_timestamp_free (ts); + if (ok) + break; + } else g_warning ("gsf_xml_gvalue_from_str(): Don't know how to handle type '%s'", g_type_name (t)); + + return FALSE; + } + return TRUE; +} + +/* Note: libxml erroneously declares the length argument as int. */ +static int +gsf_libxml_read (void *context, guint8 *buffer, int len) +{ + gsf_off_t remaining = gsf_input_remaining ((GsfInput *)context); + guint8* res; + + if (len > remaining) + len = remaining; + res = (guint8 *) gsf_input_read ((GsfInput *)context, + (size_t)len, buffer); + if (res == NULL && len > 0) /* Not an error if len == 0 */ + return -1; + return len; +} + +static int +gsf_libxml_write (void *context, char const *buffer, int len) +{ + if (!gsf_output_write ((GsfOutput *)context, (size_t)len, buffer)) + return -1; + return len; +} + +static int +gsf_libxml_close (void *context) +{ + g_object_unref (G_OBJECT (context)); + return TRUE; +} + +static xmlParserCtxtPtr +gsf_xml_parser_context_full (GsfInput *input, xmlSAXHandlerPtr sax, gpointer user) +{ + GsfInput *gzip; + xmlParserCtxtPtr res; + + g_return_val_if_fail (GSF_IS_INPUT (input), NULL); + + gzip = gsf_input_gzip_new (input, NULL); + if (gzip != NULL) + input = gzip; + else + g_object_ref (G_OBJECT (input)); + + res = xmlCreateIOParserCtxt ( + sax, user, + (xmlInputReadCallback) gsf_libxml_read, + (xmlInputCloseCallback) gsf_libxml_close, + input, XML_CHAR_ENCODING_NONE); + + if (res) + res->replaceEntities = TRUE; + else + g_object_unref (input); + + return res; +} + +/** + * gsf_xml_parser_context : + * @input : #GsfInput + * + * Create a libxml2 pull style parser context wrapper around gsf input @input. + * This signature will probably change to supply a SAX structure. + * + * This adds a reference to @input. + * A simple wrapper around a cleaner implementation that will fold in + * when we add other api changes. Its not worth bumping just for this. + * + * Returns: A parser context or %NULL + **/ +xmlParserCtxtPtr +gsf_xml_parser_context (GsfInput *input) +{ + return gsf_xml_parser_context_full (input, NULL, NULL); +} + +/** + * gsf_xml_output_buffer_new : + * @output: #GsfOutput + * @encoding: optionally %NULL. + * + * This adds a reference to @output. + * This is not releated to #GsfXMLOut. + **/ +static xmlOutputBufferPtr +gsf_xml_output_buffer_new (GsfOutput *output, + xmlCharEncodingHandlerPtr handler) +{ + xmlOutputBufferPtr res = xmlAllocOutputBuffer (handler); + if (res != NULL) { + g_object_ref (G_OBJECT (output)); + res->context = (void *)output; + res->writecallback = gsf_libxml_write; + res->closecallback = gsf_libxml_close; + } + + return res; +} + +/** + * gsf_xmlDocFormatDump : + * @output : #GsfOutput + * @cur : #xmlDocPtr + * @encoding : The encoding to use. + * @format : %TRUE to reformat the output. + * + * Dumps the document @cur into @output. + * + * Returns: status from xmlSaveFormatFileTo. + **/ +int +gsf_xmlDocFormatDump (GsfOutput *output, xmlDocPtr cur, char const *encoding, + gboolean format) +{ + xmlOutputBufferPtr buf; + xmlCharEncodingHandlerPtr handler = NULL; + + if (cur == NULL) { +#ifdef DEBUG_TREE + xmlGenericError(xmlGenericErrorContext, + "xmlDocDump : document == NULL\n"); +#endif + return(-1); + } + + if (encoding != NULL) { + xmlCharEncoding enc; + + enc = xmlParseCharEncoding(encoding); + + if (cur->charset != XML_CHAR_ENCODING_UTF8) { + xmlGenericError(xmlGenericErrorContext, + "xmlDocDump: document not in UTF8\n"); + return(-1); + } + if (enc != XML_CHAR_ENCODING_UTF8) { + handler = xmlFindCharEncodingHandler(encoding); + if (handler == NULL) { + xmlFree((char *) cur->encoding); + cur->encoding = NULL; + } + } + } + buf = gsf_xml_output_buffer_new (output, handler); + return xmlSaveFormatFileTo (buf, cur, encoding, format); +} + +/**************************************************************************/ +/* We parse and do some limited validation of the XML file, if this passes, + * then we return TRUE + */ +typedef struct { + GsfXMLProbeFunc func; + gboolean success; +} GsfXMLProbeState; + +static void +gsf_xml_probe_error (GsfXMLProbeState *state, char const *msg, ...) +{ + (void)msg; + state->func = NULL; + state->success = FALSE; +} +static void +gsf_xml_probe_element (GsfXMLProbeState *state, + const xmlChar *name, + const xmlChar *prefix, + const xmlChar *URI, + int nb_namespaces, + const xmlChar **namespaces, + int nb_attributes, + int nb_defaulted, + const xmlChar **attributes) +{ + state->success = + state->func && + state->func (name, prefix, URI, nb_namespaces, namespaces, + nb_attributes, nb_defaulted, attributes); + state->func = NULL; +} + +gboolean +gsf_xml_probe (GsfInput *input, GsfXMLProbeFunc func) +{ + static xmlSAXHandler gsf_xml_prober = { + NULL, /* internalSubset */ + NULL, /* isStandalone */ + NULL, /* hasInternalSubset */ + NULL, /* hasExternalSubset */ + NULL, /* resolveEntity */ + NULL, /* getEntity */ + NULL, /* entityDecl */ + NULL, /* notationDecl */ + NULL, /* attributeDecl */ + NULL, /* elementDecl */ + NULL, /* unparsedEntityDecl */ + NULL, /* setDocumentLocator */ + NULL, /* startDocument */ + NULL, /* endDocument */ + NULL, /* startElement */ + NULL, /* endElement */ + NULL, /* reference */ + NULL, /* characters */ + NULL, /* ignorableWhitespace */ + NULL, /* processingInstruction */ + NULL, /* comment */ + NULL, /* xmlParserWarning */ + (errorSAXFunc) &gsf_xml_probe_error, /* error */ + (errorSAXFunc) &gsf_xml_probe_error, /* fatalError */ + NULL, /* getParameterEntity */ + NULL, /* cdataBlock; */ + NULL, /* externalSubset; */ + XML_SAX2_MAGIC, + NULL, + (startElementNsSAX2Func) &gsf_xml_probe_element, /* startElementNs */ + NULL, /* endElementNs */ + NULL /* xmlStructuredErrorFunc */ + }; + GsfXMLProbeState probe_state = { func, FALSE }; + xmlParserCtxt *parse_context; + char const *buf; + + if (gsf_input_seek (input, 0, G_SEEK_SET)) + return FALSE; + + g_object_ref (input); + input = gsf_input_uncompress (input); + gsf_input_seek (input, 0, G_SEEK_SET); + + buf = gsf_input_read (input, 4, NULL); + if (NULL != buf ) { + parse_context = xmlCreatePushParserCtxt (&gsf_xml_prober, &probe_state, + (char *)buf, 4, gsf_input_name (input)); + if (NULL != parse_context) { + while (NULL != probe_state.func && + NULL != (buf = gsf_input_read (input, 1, NULL))) + xmlParseChunk (parse_context, (char *)buf, 1, 0); + } + xmlFreeParserCtxt (parse_context); + } + g_object_unref (input); + + return probe_state.success; +} + +/***************************************************************************/ + +typedef struct { + GsfXMLInNode pub; + /* internal state */ + GSList *groups; + GSList *extensions; +} GsfXMLInNodeInternal; +struct _GsfXMLInDoc { + GsfXMLInNodeInternal const *root_node; + GHashTable *symbols; /* GsfXMLInNodeInternal hashed by id */ + GsfXMLInNS const*ns; + GsfXMLInUnknownFunc unknown_handler; +}; +typedef struct { + GsfXMLIn pub; + GsfInput *input; /* TODO : Move to pub for 1.16.0 */ + + int default_ns_id; /* <0 => no default ns */ + GSList *ns_stack; + GHashTable *ns_prefixes; + GPtrArray *ns_by_id; + GHashTable *ns_unknowns; + GSList *contents_stack; + gboolean initialized; + gint unknown_depth; /* handle recursive unknown tags */ + gboolean from_unknown_handler; + + GSList *extension_stack; /* stack of GsfXMLInExtension */ +} GsfXMLInInternal; +typedef struct { + char *tag; + unsigned taglen; + unsigned ref_count; +} GsfXMLInNSInstance; +typedef struct { + int ns_id; + GSList *elem; +} GsfXMLInNodeGroup; +typedef struct { + GsfXMLInExtDtor dtor; + gpointer state; + GsfXMLInDoc const *doc; + gboolean from_unknown; +} GsfXMLInExtension; + +static char const * +node_name (GsfXMLInNode const *node) +{ + return (node->name != NULL) ? node->name : "{catch all)}"; +} + +static void +push_child (GsfXMLInInternal *state, GsfXMLInNode const *node, int default_ns_id, + xmlChar const **attrs, GsfXMLInExtension *ext) +{ + if (node->has_content == GSF_XML_CONTENT) { + if (state->pub.content->len) { + state->contents_stack = g_slist_prepend + (state->contents_stack, state->pub.content); + state->pub.content = g_string_sized_new (128); + } else { + state->contents_stack = g_slist_prepend + (state->contents_stack, NULL); + } + } + state->pub.node_stack = g_slist_prepend (state->pub.node_stack, + (gpointer)state->pub.node); + state->ns_stack = g_slist_prepend (state->ns_stack, + GINT_TO_POINTER (state->default_ns_id)); + state->pub.node = node; + state->default_ns_id = default_ns_id; + + state->extension_stack = g_slist_prepend (state->extension_stack, ext); + if (NULL != ext) { + GsfXMLInDoc const *old_doc = state->pub.doc; + state->pub.doc = ext->doc; + ext->doc = old_doc; + if (NULL != ext->state) { + gpointer old_state = state->pub.user_state; + state->pub.user_state = ext->state; + ext->state = old_state; + } + } + if (NULL != node->start) + node->start (&state->pub, attrs); +} + +static gboolean +lookup_child (GsfXMLInInternal *state, int default_ns_id, + GSList *groups, xmlChar const *name, + xmlChar const **attrs, GsfXMLInExtension *ext) +{ + GsfXMLInNodeGroup *group; + GsfXMLInNode *node; + GsfXMLInNSInstance *inst; + GSList *elem, *ptr; + char const *tmp; + + for (ptr = groups ; ptr != NULL ; ptr = ptr->next) { + group = ptr->data; + /* Is the node explicitly namespaced ? */ + if (group->ns_id >= 0 && + group->ns_id < (int)state->ns_by_id->len && + NULL != (inst = g_ptr_array_index (state->ns_by_id, group->ns_id)) && + 0 == strncmp (name, inst->tag, inst->taglen)) + tmp = name + inst->taglen; + else if (group->ns_id < 0 || /* target is unqualified */ + group->ns_id == default_ns_id) { /* target is in default ns */ +#if 0 + g_return_val_if_fail ((int)state->ns_by_id->len > group->ns_id, FALSE); + inst = g_ptr_array_index (state->ns_by_id, group->ns_id); + g_warning ("accepted ns = '%s' looking for '%s'", inst->tag, name); +#endif + tmp = name; + } else + continue; + + for (elem = group->elem ; elem != NULL ; elem = elem->next) { + node = elem->data; + if (node->name == NULL || !strcmp (tmp, node->name)) { + push_child (state, node, default_ns_id, attrs, ext); + return TRUE; + } + } + } + return FALSE; +} + +static void +gsf_xml_in_start_element (GsfXMLInInternal *state, xmlChar const *name, xmlChar const **attrs) +{ + GsfXMLInNSInstance *inst; + GsfXMLInNS const *ns; + int default_ns_id = state->default_ns_id; + GsfXMLInNodeInternal const *node; + xmlChar const **ns_ptr; + GSList *ptr; + char const *tmp; + int i; + gboolean complain = TRUE; + + /* Scan for namespace declarations. Yes it is ugly to have the api + * flag that its children can declare namespaces. However, given that a + * we need to know which namespace we are in before we can recognize + * the current node there is no choice. + * eg we can not know + * that we are in node 'Workbook' without recognizing ns=gnm, which we + * would not do unless we checked for a namespace */ + ns = state->pub.doc->ns; + if (ns != NULL && state->pub.node->check_children_for_ns) { + for (ns_ptr = attrs; ns_ptr != NULL && ns_ptr[0] && ns_ptr[1] ; ns_ptr += 2) { + if (strncmp (*ns_ptr, "xmlns", 5)) + continue; + if (ns_ptr[0][5] != '\0' && ns_ptr[0][5] != ':') + continue; + for (i = 0; (tmp = ns[i].uri) != NULL ; i++) { + if (strcmp (tmp, ns_ptr[1])) + continue; + + if (ns_ptr[0][5] == '\0') { + default_ns_id = ns[i].ns_id; + break; + } + + inst = g_hash_table_lookup (state->ns_prefixes, ns_ptr[0] + 6); + if (inst == NULL) { + inst = g_new0 (GsfXMLInNSInstance, 1); + inst->tag = g_strconcat (ns_ptr[0] + 6, ":", NULL); + inst->taglen = strlen (inst->tag); + inst->ref_count = 1; + g_hash_table_insert (state->ns_prefixes, g_strdup (ns_ptr[0] + 6), inst); + + if (ns[i].ns_id >= state->ns_by_id->len) + g_ptr_array_set_size (state->ns_by_id, ns[i].ns_id+1); + if (g_ptr_array_index (state->ns_by_id, ns[i].ns_id)) { + g_warning ("Damn. Someone just declared the same namespace '%s' with a different prefix '%s'", + ns[i].uri, inst->tag); + } else + g_ptr_array_index (state->ns_by_id, ns[i].ns_id) = inst; + } else + inst->ref_count++; + break; + } + + if (NULL == tmp) { + char *s = g_strdup (ns_ptr[0] + 6); + g_hash_table_replace (state->ns_unknowns, s, s); + if (gsf_debug_flag ("ns")) + g_warning ("Unknown namespace uri = '%s'", ns_ptr[1]); + } + } + } + + node = (GsfXMLInNodeInternal const *) state->pub.node; + if (lookup_child (state, default_ns_id, node->groups, name, attrs, NULL)) + return; + + /* useful for where all of the markup can nest */ + ptr = state->pub.node_stack; + for (; ptr != NULL && node->pub.share_children_with_parent; ptr = ptr->next) { + node = ptr->data; + if (lookup_child (state, default_ns_id, node->groups, name, attrs, NULL)) + return; + } + + /* Check for extensions */ + for (ptr = node->extensions; ptr != NULL ; ptr = ptr->next) { + GsfXMLInExtension *ext = ptr->data; + if (lookup_child (state, default_ns_id, + ext->doc->root_node->groups, name, attrs, ext)) + return; + } + + if (state->pub.doc->unknown_handler != NULL) { + gboolean handled; + state->from_unknown_handler = TRUE; + handled = (state->pub.doc->unknown_handler) (&state->pub, name, attrs); + state->from_unknown_handler = FALSE; + if (handled) + return; + } + + if (state->unknown_depth++ > 0) + return; + + tmp = strchr (name, ':'); + if (tmp) { + char *nsstr = g_strndup (name, tmp - (const char *)name); + if (g_hash_table_lookup (state->ns_unknowns, nsstr)) + complain = FALSE; + g_free (nsstr); + } + + if (!complain) + return; + + g_printerr ("Unexpected element '%s' in state : \n\t", name); + ptr = state->pub.node_stack = g_slist_reverse (state->pub.node_stack); + if (ptr != NULL) /* skip toplevel catch all */ + ptr = ptr->next; + for (;ptr != NULL && ptr != NULL; ptr = ptr->next) { + node = ptr->data; + if (node != NULL) { +/* FIXME FIXME FIXME if we really want this do we also want namespaces ? */ + g_printerr ("%s -> ", node_name (&node->pub)); + } + } + if (state->pub.node != NULL) { + g_printerr ("%s\n", node_name (state->pub.node)); + } + state->pub.node_stack = g_slist_reverse (state->pub.node_stack); +} + +static void +gsf_xml_in_ext_free (GsfXMLInInternal *state, GsfXMLInExtension *ext) +{ + if (ext->dtor) + (ext->dtor) (&state->pub, ext->state); + g_free (ext); +} + +static void +gsf_xml_in_end_element (GsfXMLInInternal *state, + G_GNUC_UNUSED xmlChar const *name) +{ + GsfXMLInNodeInternal *node; + GsfXMLInExtension *ext; + GSList *ptr; + + if (state->unknown_depth > 0) { + state->unknown_depth--; + return; + } + + g_return_if_fail (state->pub.node != NULL); + g_return_if_fail (state->pub.node_stack != NULL); + g_return_if_fail (state->ns_stack != NULL); + + node = (GsfXMLInNodeInternal *) state->pub.node; + if (node->pub.end) + node->pub.end (&state->pub, NULL); + + if (node->pub.has_content == GSF_XML_CONTENT) { + GString *top; + + g_return_if_fail (state->contents_stack != NULL); + top = state->contents_stack->data; + state->contents_stack = g_slist_remove + (state->contents_stack, top); + + if (top) { + g_string_free (state->pub.content, TRUE); + state->pub.content = top; + } else { + g_string_truncate (state->pub.content, 0); + } + } + + /* Free any potential extensions associated with the current node */ + for (ptr = node->extensions; ptr != NULL ; ptr = ptr->next) + gsf_xml_in_ext_free (state, ptr->data); + g_slist_free (node->extensions); + node->extensions = NULL; + + /* pop the state stack */ + ext = state->extension_stack->data; + state->extension_stack = g_slist_remove (state->extension_stack, ext); + state->pub.node = state->pub.node_stack->data; + state->pub.node_stack = g_slist_remove (state->pub.node_stack, state->pub.node); + state->default_ns_id = GPOINTER_TO_INT (state->ns_stack->data); + state->ns_stack = g_slist_remove (state->ns_stack, GINT_TO_POINTER (state->default_ns_id)); + + if (NULL != ext) { + GsfXMLInDoc const *ext_doc = state->pub.doc; + state->pub.doc = ext->doc; + ext->doc = ext_doc; + if (NULL != ext->state) { + gpointer ext_state = state->pub.user_state; + state->pub.user_state = ext->state; + ext->state = ext_state; + } + if (ext->from_unknown) + gsf_xml_in_ext_free (state, ext); + } +} + +static void +gsf_xml_in_characters (GsfXMLInInternal *state, xmlChar const *chars, int len) +{ + if (!state->initialized) + return; + + if (state->pub.node->has_content != GSF_XML_NO_CONTENT) + g_string_append_len (state->pub.content, chars, len); +} + +static xmlEntityPtr +gsf_xml_in_get_entity (G_GNUC_UNUSED GsfXMLInInternal *state, xmlChar const *name) +{ + return xmlGetPredefinedEntity (name); +} + +static void +gsf_free_xmlinnsinstance (GsfXMLInNSInstance *inst) +{ + g_free (inst->tag); + g_free (inst); +} + +static void +gsf_xml_in_start_document (GsfXMLInInternal *state) +{ + /* + * This function will not be called when parsing an empty + * document. + */ + state->initialized = TRUE; + state->pub.node = &state->pub.doc->root_node->pub; + state->unknown_depth = 0; + state->pub.node_stack = NULL; + state->extension_stack = NULL; + state->ns_stack = NULL; + state->default_ns_id = -1; + state->ns_by_id = g_ptr_array_new (); + state->ns_prefixes = g_hash_table_new_full ( + g_str_hash, g_str_equal, + g_free, (GDestroyNotify) gsf_free_xmlinnsinstance); + state->ns_unknowns = g_hash_table_new_full ( + g_str_hash, g_str_equal, + g_free, NULL); + state->contents_stack = NULL; + state->from_unknown_handler = FALSE; +} + +static void +gsf_xml_in_end_document (GsfXMLInInternal *state) +{ + g_string_free (state->pub.content, TRUE); + state->pub.content = NULL; + + if (state->initialized) { + g_ptr_array_free (state->ns_by_id, TRUE); + state->ns_by_id = NULL; + + g_hash_table_destroy (state->ns_prefixes); + state->ns_prefixes = NULL; + + g_hash_table_destroy (state->ns_unknowns); + state->ns_unknowns = NULL; + + state->initialized = FALSE; + + if (state->pub.node != &state->pub.doc->root_node->pub) { + g_warning ("Document likely damaged."); + } + if (state->unknown_depth > 0) { + g_warning ("Document likely damaged."); + } + } +} + +static void +gsf_xml_in_warning (G_GNUC_UNUSED GsfXMLInInternal *state, char const *msg, ...) +{ + va_list args; + + va_start (args, msg); + g_logv ("XML", G_LOG_LEVEL_WARNING, msg, args); + va_end (args); +} + +static void +gsf_xml_in_error (G_GNUC_UNUSED GsfXMLInInternal *state, char const *msg, ...) +{ + va_list args; + + va_start (args, msg); + g_logv ("XML", G_LOG_LEVEL_CRITICAL, msg, args); + va_end (args); +} + +static void +gsf_xml_in_fatal_error (G_GNUC_UNUSED GsfXMLInInternal *state, char const *msg, ...) +{ + va_list args; + + va_start (args, msg); + g_logv ("XML", G_LOG_LEVEL_ERROR, msg, args); + va_end (args); +} + +static xmlSAXHandler gsfXMLInParser = { + NULL, /* internalSubset */ + NULL, /* isStandalone */ + NULL, /* hasInternalSubset */ + NULL, /* hasExternalSubset */ + NULL, /* resolveEntity */ + (getEntitySAXFunc)gsf_xml_in_get_entity, /* getEntity */ + NULL, /* entityDecl */ + NULL, /* notationDecl */ + NULL, /* attributeDecl */ + NULL, /* elementDecl */ + NULL, /* unparsedEntityDecl */ + NULL, /* setDocumentLocator */ + (startDocumentSAXFunc)gsf_xml_in_start_document, /* startDocument */ + (endDocumentSAXFunc)gsf_xml_in_end_document, /* endDocument */ + (startElementSAXFunc)gsf_xml_in_start_element, /* startElement */ + (endElementSAXFunc)gsf_xml_in_end_element, /* endElement */ + NULL, /* reference */ + (charactersSAXFunc)gsf_xml_in_characters, /* characters */ + NULL, /* ignorableWhitespace */ + NULL, /* processingInstruction */ + NULL, /* comment */ + (warningSAXFunc)gsf_xml_in_warning, /* warning */ + (errorSAXFunc)gsf_xml_in_error, /* error */ + (fatalErrorSAXFunc)gsf_xml_in_fatal_error, /* fatalError */ + NULL, /* getParameterEntity */ + NULL, /* cdataBlock */ + NULL, /* externalSubset */ + 0 +#if LIBXML_VERSION >= 20600 + , + NULL, NULL, NULL +#if LIBXML_VERSION >= 20602 + , + NULL /* serror */ +#endif +#endif +}; + +static void +gsf_xml_in_node_internal_free (GsfXMLInNodeInternal *node) +{ + GSList *ptr; + GsfXMLInNodeGroup *group; + + if (NULL != node->extensions) { + g_warning ("leaking extensions"); + } + + for (ptr = node->groups; ptr != NULL ; ptr = ptr->next) { + group = ptr->data; + g_slist_free (group->elem); + g_free (group); + } + g_slist_free (node->groups); + node->groups = NULL; + g_free (node); +} + +/** + * gsf_xml_in_doc_free : + * @doc : #GsfXMLInDoc + * + * Free up resources + **/ +void +gsf_xml_in_doc_free (GsfXMLInDoc *doc) +{ + g_return_if_fail (doc != NULL); + g_return_if_fail (doc->symbols != NULL); + + g_hash_table_destroy (doc->symbols); + + /* poison the well just in case */ + doc->symbols = NULL; + doc->root_node = NULL; + g_free (doc); +} + +/** + * gsf_xml_in_doc_new : + * @nodes : an array of node descriptors + * @ns : an array of namespace identifiers + * + * Combine the nodes in the %NULL terminated array starting at @nodes with the + * name spaces in the %NULL terminated array starting at @ns. Prepare the + * data structures necessary to validate a doument based on that description. + * + * Returns: %NULL on error + **/ +GsfXMLInDoc * +gsf_xml_in_doc_new (GsfXMLInNode const *nodes, GsfXMLInNS const *ns) +{ + GsfXMLInDoc *doc; + + g_return_val_if_fail (nodes != NULL, NULL); + + doc = g_new0 (GsfXMLInDoc, 1); + doc->root_node = NULL; + doc->symbols = g_hash_table_new_full (g_str_hash, g_str_equal, + NULL, (GDestroyNotify) gsf_xml_in_node_internal_free); + doc->ns = ns; + + gsf_xml_in_doc_add_nodes (doc, nodes); + + if (NULL == doc->root_node) { + gsf_xml_in_doc_free (doc); + g_return_val_if_fail (NULL != doc->root_node, NULL); + } + + return doc; +} + +/** + * gsf_xml_in_doc_add_nodes : + * @doc : #GsfXMLInDoc + * @nodes : %NULL terminated array of #GsfXMLInNode + * + * Adds additional nodes to the structure of @doc + **/ +void +gsf_xml_in_doc_add_nodes (GsfXMLInDoc *doc, + GsfXMLInNode const *nodes) +{ + GsfXMLInNode const *e_node; + GsfXMLInNodeInternal *tmp, *node; + + g_return_if_fail (doc != NULL); + g_return_if_fail (nodes != NULL); + + for (e_node = nodes; e_node->id != NULL ; e_node++ ) { + node = g_hash_table_lookup (doc->symbols, e_node->id); + if (node != NULL) { + /* if its empty then this is just a recusion */ + if (e_node->start != NULL || e_node->end != NULL || + e_node->has_content != GSF_XML_NO_CONTENT || + e_node->user_data.v_int != 0) { + g_warning ("ID '%s' has already been registered.\n" + "The additional decls should not specify start,end,content,data", e_node->id); + continue; + } + } else { + node = g_new0 (GsfXMLInNodeInternal, 1); + node->pub = *e_node; + /* WARNING VILE HACK : + * The api in 1.8.2 passed has_content as a boolean. + * Too many things still use that to change yet. We + * edit the bool here to be GSF_CONTENT_NONE or + * GSF_XML_CONTENT and try to ignore SHARED_CONTENT */ + if (node->pub.has_content != 0 && + node->pub.has_content != GSF_XML_SHARED_CONTENT) + node->pub.has_content = GSF_XML_CONTENT; + node->groups = NULL; + g_hash_table_insert (doc->symbols, + (gpointer)node->pub.id, node); + } + if (NULL == doc->root_node && e_node == nodes) /* first valid node is the root */ + doc->root_node = node; + + /* NOTE : use e_node for parent_id rather than node + * in case this is a shared symbol */ + tmp = g_hash_table_lookup (doc->symbols, e_node->parent_id); + if (tmp != NULL) { + GSList *ptr; + GsfXMLInNodeGroup *group = NULL; + int const ns_id = node->pub.ns_id; + for (ptr = tmp->groups; ptr != NULL ; ptr = ptr->next) { + group = ptr->data; + if (group->ns_id == ns_id) + break; + } + if (ptr == NULL) { + group = g_new0 (GsfXMLInNodeGroup, 1); + group->ns_id = ns_id; + tmp->groups = g_slist_prepend (tmp->groups, group); + } + group->elem = g_slist_prepend (group->elem, node); + } else if (strcmp (e_node->id, e_node->parent_id)) { + g_warning ("Parent ID '%s' unknown", e_node->parent_id); + continue; + } + } +} + +/** + * gsf_xml_in_doc_set_unknown_handler: + * @doc : #GsfXMLInDoc + * @handler : The function to call + * + * Call the function @handler when an unexpected child node is found + **/ +void +gsf_xml_in_doc_set_unknown_handler (GsfXMLInDoc *doc, + GsfXMLInUnknownFunc handler) +{ + g_return_if_fail (doc != NULL); + doc->unknown_handler = handler; +} + +/** + * gsf_xml_in_push_state : + * @xin : #GsfXMLIn + * @doc : #GsfXMLInDoc + * @new_state : arbitrary content for the parser + * @dtor : #GsfXMLInExtDtor + * @attrs : array of xmlChar const * + * + * Take the first node from @doc as the current node and call its start handler. + **/ +void +gsf_xml_in_push_state (GsfXMLIn *xin, GsfXMLInDoc const *doc, + gpointer new_state, GsfXMLInExtDtor dtor, + xmlChar const **attrs) +{ + GsfXMLInInternal *state = (GsfXMLInInternal *)xin; + GsfXMLInExtension *ext; + + g_return_if_fail (xin != NULL); + g_return_if_fail (doc != NULL); + g_return_if_fail (doc->root_node != NULL); + + ext = g_new (GsfXMLInExtension, 1); + ext->doc = doc; + ext->state = new_state; + ext->dtor = dtor; + if (!(ext->from_unknown = state->from_unknown_handler)) { + GsfXMLInNodeInternal *node = (GsfXMLInNodeInternal *) xin->node; + node->extensions = g_slist_prepend (node->extensions, ext); + } else + push_child (state, &doc->root_node->pub, -1, attrs, ext); +} + +/** + * gsf_xml_in_doc_parse : + * @doc : #GsfXMLInDoc + * @input : #GsfInput + * @user_state : arbitrary content stored in the parser + * + * Read an xml document from @input and parse based on the the descriptor in + * @doc + * + * Returns: %FALSE on error + **/ +gboolean +gsf_xml_in_doc_parse (GsfXMLInDoc *doc, GsfInput *input, gpointer user_state) +{ + xmlParserCtxt *ctxt; + GsfXMLInInternal state; + gboolean res; + + g_return_val_if_fail (doc != NULL, FALSE); + + state.initialized = FALSE; + ctxt = gsf_xml_parser_context_full (input, &gsfXMLInParser, &state); + if (ctxt == NULL) + return FALSE; + + state.pub.doc = doc; + state.pub.user_state = user_state; + state.pub.content = g_string_sized_new (128); + state.input = input; + xmlParseDocument (ctxt); + res = ctxt->wellFormed; + xmlFreeParserCtxt (ctxt); + + return res; +} + +/** + * gsf_xml_in_get_input : + * @xin : #GsfXMLIn + * + * (New in 1.14.2) + * + * Returns: (but does not reference) the stream being parsed. + **/ +GsfInput * +gsf_xml_in_get_input (GsfXMLIn const *xin) +{ + GsfXMLInInternal const *state = (GsfXMLInInternal const *)xin; + return state->input; +} + +/** + * gsf_xml_in_check_ns : + * @xin : #GsfXMLIn + * @str : string to check + * @ns_id : the namespace id + * + * According to @state is @str in the namespace @ns_id ? + * + * Returns: a pointer to @str after the namespace if successful, + * otherwise %NULL. + **/ +char const * +gsf_xml_in_check_ns (GsfXMLIn const *xin, char const *str, unsigned int ns_id) +{ + GsfXMLInInternal const *state = (GsfXMLInInternal const *)xin; + GsfXMLInNSInstance *inst; + + /* If this is the default namespace there will not be an entry in the + * ns_by_id array */ + if (ns_id >= state->ns_by_id->len || + NULL == (inst = g_ptr_array_index (state->ns_by_id, ns_id)) || + 0 != strncmp (str, inst->tag, inst->taglen)) { + if (state->default_ns_id >= 0 && + state->default_ns_id == (int)ns_id) + return (NULL == strchr (str, ':')) ? str : NULL; + return NULL; + } + + return str + inst->taglen; +} + +/** + * gsf_xml_in_namecmp : + * @xin : The #GsfXMLIn we are reading from. + * @str : The potentially namespace qualified node name. + * @ns_id : The name space id to check + * @name : The target node name + * + * Checks to see if @str is the same as @ns_id::@name with either an explicit + * namespace or the current default namespace. + * + * Returns: %TRUE if @str == @ns_id:@name according to @state. + **/ +gboolean +gsf_xml_in_namecmp (GsfXMLIn const *xin, char const *str, + unsigned int ns_id, char const *name) +{ + GsfXMLInInternal const *state = (GsfXMLInInternal const *)xin; + GsfXMLInNSInstance *inst; + + /* check for default namespace as a likely choice */ + if (state->default_ns_id >= 0 && + state->default_ns_id == (int)ns_id && + 0 == strcmp (name, str)) + return TRUE; + + if (ns_id >= state->ns_by_id->len || + NULL == (inst = g_ptr_array_index (state->ns_by_id, ns_id)) || + 0 != strncmp (str, inst->tag, inst->taglen)) + return FALSE; + return 0 == strcmp (name, str + inst->taglen); +} + +/****************************************************************************/ + +enum { + PROP_0, + PROP_PRETTY_PRINT +}; + +typedef enum { + GSF_XML_OUT_NOCONTENT, + GSF_XML_OUT_CHILD, + GSF_XML_OUT_CONTENT +} GsfXMLOutState; + +struct _GsfXMLOut { + GObject base; + + GsfOutput *output; + char *doc_type; + GSList *stack; + GsfXMLOutState state; + unsigned indent; + gboolean needs_header; + gboolean pretty_print; +}; + +typedef struct { + GObjectClass base; +} GsfXMLOutClass; + +static void +gsf_xml_out_set_property (GObject *object, + guint property_id, + GValue const *value, + GParamSpec *pspec) +{ + GsfXMLOut *xout = (GsfXMLOut *)object; + + switch (property_id) { + case PROP_PRETTY_PRINT: + xout->pretty_print = g_value_get_boolean (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gsf_xml_out_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) +{ + GsfXMLOut const *xout = (GsfXMLOut const *)object; + + switch (property_id) { + case PROP_PRETTY_PRINT: + g_value_set_boolean (value, xout->pretty_print); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gsf_xml_out_finalize (GObject *obj) +{ + GsfXMLOut *xout = GSF_XML_OUT (obj); + + g_free (xout->doc_type); + + parent_class->finalize (obj); +} + +static void +gsf_xml_out_init (GObject *obj) +{ + GsfXMLOut *xout = GSF_XML_OUT (obj); + xout->output = NULL; + xout->stack = NULL; + xout->state = GSF_XML_OUT_CHILD; + xout->indent = 0; + xout->needs_header = TRUE; + xout->doc_type = NULL; + xout->pretty_print = TRUE; +} + +static void +gsf_xml_out_class_init (GObjectClass *gobject_class) +{ + parent_class = g_type_class_peek_parent (gobject_class); + + gobject_class->finalize = gsf_xml_out_finalize; + gobject_class->get_property = gsf_xml_out_get_property; + gobject_class->set_property = gsf_xml_out_set_property; + + g_object_class_install_property (gobject_class, PROP_PRETTY_PRINT, + g_param_spec_boolean ("pretty-print", "Pretty print", + "Should the output auto-indent elements to make reading easier", + TRUE, GSF_PARAM_STATIC | G_PARAM_READWRITE)); +} + +GSF_CLASS (GsfXMLOut, gsf_xml_out, + gsf_xml_out_class_init, gsf_xml_out_init, + G_TYPE_OBJECT) + +/** + * gsf_xml_out_new : + * @output : #GsfOutput + * + * Create an XML output stream. + * + * Returns: #GsfXMLOut + */ +GsfXMLOut * +gsf_xml_out_new (GsfOutput *output) +{ + GsfXMLOut *xout = g_object_new (GSF_XML_OUT_TYPE, NULL); + if (G_UNLIKELY (NULL == xout)) return NULL; + if (!gsf_output_wrap (G_OBJECT (xout), output)) + return NULL; + xout->output = output; + return xout; +} + +/** + * gsf_xml_out_set_doc_type : + * @xout : #GsfXMLOut + * @type : the document type declaration + * + * Store some optional some <!DOCTYPE .. > content + **/ +void +gsf_xml_out_set_doc_type (GsfXMLOut *xout, char const *type) +{ + g_free (xout->doc_type); + xout->doc_type = g_strdup (type); +} + +static inline void +gsf_xml_out_indent (GsfXMLOut *xout) +{ + static char const spaces [] = + " " + " " + " " + " " + " " + " "; + if (xout->pretty_print) { + unsigned i; + for (i = xout->indent ; i > (sizeof (spaces)/2) ; i -= sizeof (spaces)/2) + gsf_output_write (xout->output, sizeof (spaces) - 1, spaces); + gsf_output_write (xout->output, i*2, spaces); + } +} + +/** + * gsf_xml_out_start_element : + * @xout : #GsfXMLOut + * @id : Element name + * + * Output a start element @id, if necessary preceeded by an XML declaration. + */ +void +gsf_xml_out_start_element (GsfXMLOut *xout, char const *id) +{ + g_return_if_fail (id != NULL); + g_return_if_fail (xout != NULL); + + if (xout->needs_header) { + static char const header0[] = + "\n"; + gsf_output_write (xout->output, sizeof (header0) - 1, header0); + if (xout->doc_type != NULL) + gsf_output_puts (xout->output, xout->doc_type); + xout->needs_header = FALSE; + } + if (xout->state == GSF_XML_OUT_NOCONTENT) { + if (xout->pretty_print) + gsf_output_write (xout->output, 2, ">\n"); + else + gsf_output_write (xout->output, 1, ">"); + } + + gsf_xml_out_indent (xout); + gsf_output_printf (xout->output, "<%s", id); + + xout->stack = g_slist_prepend (xout->stack, (gpointer)id); + xout->indent++; + xout->state = GSF_XML_OUT_NOCONTENT; +} + +/** + * gsf_xml_out_end_element : + * @xout : #GsfXMLOut + * + * Closes/ends an XML element. + * + * Returns: the element that has been closed. + */ +char const * +gsf_xml_out_end_element (GsfXMLOut *xout) +{ + char const *id; + + g_return_val_if_fail (xout != NULL, NULL); + g_return_val_if_fail (xout->stack != NULL, NULL); + + id = xout->stack->data; + xout->stack = g_slist_remove (xout->stack, id); + xout->indent--; + switch (xout->state) { + case GSF_XML_OUT_NOCONTENT : + if (xout->pretty_print) + gsf_output_write (xout->output, 3, "/>\n"); + else + gsf_output_write (xout->output, 2, "/>"); + break; + + case GSF_XML_OUT_CHILD : + gsf_xml_out_indent (xout); + /* fall through */ + case GSF_XML_OUT_CONTENT : + if (xout->pretty_print) + gsf_output_printf (xout->output, "\n", id); + else + gsf_output_printf (xout->output, "", id); + } + xout->state = GSF_XML_OUT_CHILD; + return id; +} + +/** + * gsf_xml_out_simple_element : + * @xout : #GsfXMLOut + * @id : Element name + * @content : Content of the element + * + * Convenience routine to output a simple @id element with content @content. + **/ +void +gsf_xml_out_simple_element (GsfXMLOut *xout, char const *id, + char const *content) +{ + gsf_xml_out_start_element (xout, id); + if (content != NULL) + gsf_xml_out_add_cstr (xout, NULL, content); + gsf_xml_out_end_element (xout); +} + +/** + * gsf_xml_out_simple_int_element : + * @xout : #GsfXMLOut + * @id : Element name + * @val : Element value + * + * Convenience routine to output an element @id with integer value @val. + **/ +void +gsf_xml_out_simple_int_element (GsfXMLOut *xout, char const *id, int val) +{ + gsf_xml_out_start_element (xout, id); + gsf_xml_out_add_int (xout, NULL, val); + gsf_xml_out_end_element (xout); +} + +/** + * gsf_xml_out_simple_float_element : + * @xout : #GsfXMLOut + * @id : Element name + * @val : Element value + * @precision : the number of significant digits to use, -1 meaning "enough". + * + * Convenience routine to output an element @id with float value @val using + * @precision significant digits. + **/ +void +gsf_xml_out_simple_float_element (GsfXMLOut *xout, char const *id, + double val, int precision) +{ + gsf_xml_out_start_element (xout, id); + gsf_xml_out_add_float (xout, NULL, val, precision); + gsf_xml_out_end_element (xout); +} + +static void +close_tag_if_neccessary (GsfXMLOut* xout) +{ + if (xout->state == GSF_XML_OUT_NOCONTENT) { + xout->state = GSF_XML_OUT_CONTENT; + gsf_output_write (xout->output, 1, ">"); + } +} + +/** + * gsf_xml_out_add_cstr_unchecked : + * @xout : #GsfXMLOut + * @id : optionally NULL for content + * @val_utf8 : a utf8 encoded string to export + * + * dump @val_utf8 to an attribute named @id without checking to see if the + * content needs escaping. A useful performance enhancement when the + * application knows that structure of the content well. If @val_utf8 is NULL + * do nothing (no warning, no output) + **/ +void +gsf_xml_out_add_cstr_unchecked (GsfXMLOut *xout, char const *id, + char const *val_utf8) +{ + g_return_if_fail (xout != NULL); + + if (val_utf8 == NULL) + return; + + if (id == NULL) { + close_tag_if_neccessary (xout); + gsf_output_write (xout->output, strlen (val_utf8), val_utf8); + } else + gsf_output_printf (xout->output, " %s=\"%s\"", id, val_utf8); +} + +/** + * gsf_xml_out_add_cstr : + * @xout : #GsfXMLOut + * @id : optionally NULL for content + * @val_utf8 : a utf8 encoded string + * + * dump @val_utf8 to an attribute named @id or as the nodes content escaping + * characters as necessary. If @val_utf8 is NULL do nothing (no warning, no + * output) + **/ +void +gsf_xml_out_add_cstr (GsfXMLOut *xout, char const *id, + char const *val_utf8) +{ + guint8 const *cur = val_utf8; + guint8 const *start = val_utf8; + + g_return_if_fail (xout != NULL); + + if (val_utf8 == NULL) + return; + + if (id == NULL) { + close_tag_if_neccessary (xout); + } else + gsf_output_printf (xout->output, " %s=\"", id); + while (*cur != '\0') { + if (*cur == '<') { + if (cur != start) + gsf_output_write (xout->output, cur-start, start); + start = ++cur; + gsf_output_write (xout->output, 4, "<"); + } else if (*cur == '>') { + if (cur != start) + gsf_output_write (xout->output, cur-start, start); + start = ++cur; + gsf_output_write (xout->output, 4, ">"); + } else if (*cur == '&') { + if (cur != start) + gsf_output_write (xout->output, cur-start, start); + start = ++cur; + gsf_output_write (xout->output, 5, "&"); + } else if (*cur == '"') { + if (cur != start) + gsf_output_write (xout->output, cur-start, start); + start = ++cur; + gsf_output_write (xout->output, 6, """); + } else if ((*cur == '\n' || *cur == '\r' || *cur == '\t') && + id != NULL) { + guint8 buf[8]; + sprintf (buf, "&#%d;", *cur); + + if (cur != start) + gsf_output_write (xout->output, cur-start, start); + start = ++cur; + + gsf_output_write (xout->output, strlen (buf), buf); + } else if ((*cur >= 0x20 && *cur != 0x7f) || + (*cur == '\n' || *cur == '\r' || *cur == '\t')) { + cur++; + } else { + /* + * This is immensely pathetic, but XML 1.0 does not + * allow certain characters to be encoded. XML 1.1 + * does allow this, but libxml2 does not support it. + */ + g_warning ("Unknown char 0x%02x in string", *cur); + + if (cur != start) + gsf_output_write (xout->output, cur-start, start); + start = ++cur; + } + } + if (cur != start) + gsf_output_write (xout->output, cur-start, start); + if (id != NULL) + gsf_output_write (xout->output, 1, "\""); +} + +/** + * gsf_xml_out_add_bool : + * @xout : #GsfXMLOut + * @id : optionally NULL for content + * @val : a boolean + * + * dump boolean value @val to an attribute named @id or as the nodes content + * Use '1' or '0' to simplify import + **/ +void +gsf_xml_out_add_bool (GsfXMLOut *xout, char const *id, + gboolean val) +{ + gsf_xml_out_add_cstr_unchecked (xout, id, + val ? "1" : "0"); +} + +/** + * gsf_xml_out_add_int : + * @xout : #GsfXMLOut + * @id : optionally NULL for content + * @val : the value + * + * dump integer value @val to an attribute named @id or as the nodes content + **/ +void +gsf_xml_out_add_int (GsfXMLOut *xout, char const *id, + int val) +{ + char buf [4 * sizeof (int)]; + sprintf (buf, "%d", val); + gsf_xml_out_add_cstr_unchecked (xout, id, buf); +} + +/** + * gsf_xml_out_add_uint : + * @xout : #GsfXMLOut + * @id : optionally NULL for content + * @val : the value + * + * dump unsigned integer value @val to an attribute named @id or as the nodes + * content + **/ +void +gsf_xml_out_add_uint (GsfXMLOut *xout, char const *id, + unsigned int val) +{ + char buf [4 * sizeof (unsigned int)]; + sprintf (buf, "%u", val); + gsf_xml_out_add_cstr_unchecked (xout, id, buf); +} + +/** + * gsf_xml_out_add_float : + * @xout : #GsfXMLOut + * @id : optionally NULL for content + * @val : the value + * @precision : the number of significant digits to use, -1 meaning "enough". + * + * dump float value @val to an attribute named @id or as the nodes + * content with precision @precision. The number will be formattted + * according to the "C" locale. + **/ +void +gsf_xml_out_add_float (GsfXMLOut *xout, char const *id, + double val, int precision) +{ + char format_str[4 * sizeof (int) + 10]; + char buf[G_ASCII_DTOSTR_BUF_SIZE + DBL_DIG]; + + if (precision < 0 || precision > DBL_DIG) + precision = DBL_DIG; + + sprintf (format_str, "%%.%dg", precision); + g_ascii_formatd (buf, sizeof (buf), format_str, val); + gsf_xml_out_add_cstr_unchecked (xout, id, buf); +} + +/** + * gsf_xml_out_add_color : + * @xout : #GsfXMLOut + * @id : optionally NULL for content + * @r : Red value + * @g : Green value + * @b : Blue value + * + * dump Color @r.@g.@b to an attribute named @id or as the nodes content + **/ +void +gsf_xml_out_add_color (GsfXMLOut *xout, char const *id, + unsigned int r, unsigned int g, unsigned int b) +{ + char buf [3 * 4 * sizeof (unsigned int) + 1]; + sprintf (buf, "%X:%X:%X", r, g, b); + gsf_xml_out_add_cstr_unchecked (xout, id, buf); +} + +/** + * gsf_xml_out_add_enum : + * @xout : #GsfXMLOut + * @id : optionally NULL for content + * @etype : #GType + * @val : enum element number + * + * Output the name of value @val of enumeration type @etype. + **/ +void +gsf_xml_out_add_enum (GsfXMLOut *xout, char const *id, GType etype, gint val) +{ + GEnumClass *eclass = G_ENUM_CLASS (g_type_class_ref (etype)); + GEnumValue *ev = g_enum_get_value (eclass, val); + g_type_class_unref (eclass); + + if (ev) + gsf_xml_out_add_cstr_unchecked (xout, id, ev->value_name); + else + g_warning ("Invalid value %d for type %s", + val, g_type_name (etype)); +} + +/** + * gsf_xml_out_add_gvalue : + * @xout : #GsfXMLOut + * @id : optionally NULL for content + * @val : #GValue + * + * Output the value of @val as a string. Does NOT store any type information + * with the string, just thevalue. + **/ +void +gsf_xml_out_add_gvalue (GsfXMLOut *xout, char const *id, GValue const *val) +{ + GType t; + g_return_if_fail (xout != NULL); + g_return_if_fail (val != NULL); + + t = G_VALUE_TYPE (val); + switch (t) { + case G_TYPE_CHAR: { + char c[2] = { 0, 0 }; + c[0] = g_value_get_char (val); + /* FIXME: What if we are in 0x80-0xff? */ + gsf_xml_out_add_cstr (xout, id, c); + break; + } + + case G_TYPE_UCHAR: { + unsigned char c[2] = { 0, 0 }; + c[0] = g_value_get_uchar (val); + /* FIXME: What if we are in 0x80-0xff? */ + gsf_xml_out_add_cstr (xout, id, c); + break; + } + + case G_TYPE_BOOLEAN: + gsf_xml_out_add_cstr (xout, id, + g_value_get_boolean (val) ? "t" : "f"); + break; + case G_TYPE_INT: + gsf_xml_out_add_int (xout, id, g_value_get_int (val)); + break; + case G_TYPE_UINT: + gsf_xml_out_add_uint (xout, id, g_value_get_uint (val)); + break; + case G_TYPE_LONG: + gsf_xml_out_add_uint (xout, id, g_value_get_long (val)); + break; + case G_TYPE_ULONG: + gsf_xml_out_add_uint (xout, id, g_value_get_ulong (val)); + break; + case G_TYPE_ENUM: + gsf_xml_out_add_cstr (xout, id, + glade_string_from_enum (t, g_value_get_enum (val))); + break; + case G_TYPE_FLAGS: + gsf_xml_out_add_cstr (xout, id, + glade_string_from_flags (t, g_value_get_flags (val))); + break; + case G_TYPE_FLOAT: + gsf_xml_out_add_float (xout, id, g_value_get_float (val), -1); + break; + case G_TYPE_DOUBLE: + gsf_xml_out_add_float (xout, id, g_value_get_double (val), -1); + break; + case G_TYPE_STRING: + gsf_xml_out_add_cstr (xout, id, g_value_get_string (val)); + break; + + default: + if (GSF_TIMESTAMP_TYPE == t) { + GsfTimestamp const *ts = g_value_get_boxed (val); + char *str = gsf_timestamp_as_string (ts); + gsf_xml_out_add_cstr (xout, id, str); + g_free (str); + break; + } + } + + /* FIXME FIXME FIXME Add some error checking */ +} + +/** + * gsf_xml_out_add_base64 : + * @xout : #GsfXMLOut + * @id : optionally NULL for content + * @data : Data to be written + * @len : Length of data + * + * dump @len bytes in @data into the content of node @id using base64 + **/ +void +gsf_xml_out_add_base64 (GsfXMLOut *xout, char const *id, + guint8 const *data, unsigned int len) +{ + /* We could optimize and stream right to the output, + * or even just keep the buffer around + * for now we start simple */ + guint8 *tmp = gsf_base64_encode_simple (data, len); + if (tmp == NULL) + return; + if (id != NULL) + g_warning ("Stream a binary blob into an attribute ??"); + gsf_xml_out_add_cstr_unchecked (xout, id, tmp); + g_free (tmp); +} + +/** + * gsf_xml_out_get_output : + * @xout : #GsfXMLOut + * + * Get the #GsfInput we are parsing from. + * + * Returns: #GsfInput or %NULL. + **/ +GsfOutput * +gsf_xml_out_get_output (GsfXMLOut const *xout) +{ + g_return_val_if_fail (xout != NULL, NULL); + return xout->output; +} + diff --git a/gsf/gsf-libxml.h b/gsf/gsf-libxml.h new file mode 100644 index 0000000..9ad2812 --- /dev/null +++ b/gsf/gsf-libxml.h @@ -0,0 +1,194 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-libxml.h: Utility wrappers for using gsf with libxml + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_LIBXML_H +#define GSF_LIBXML_H + +#include +#include +#include + +G_BEGIN_DECLS + +/****************************************************************************/ +/* GSF wrappers for libxml2 */ +xmlParserCtxt *gsf_xml_parser_context (GsfInput *input); +#if 0 + /* this is cleaner, tack it on for 2.0 */ + xmlSAXHandlerPtr sax, gpointer user); +#endif +int gsf_xmlDocFormatDump (GsfOutput *output, + xmlDoc *cur, + char const *encoding, + gboolean format); + +typedef gboolean (*GsfXMLProbeFunc) (const xmlChar *name, + const xmlChar *prefix, + const xmlChar *URI, + int nb_namespaces, + const xmlChar **namespaces, + int nb_attributes, + int nb_defaulted, + const xmlChar **attributes); +gboolean gsf_xml_probe (GsfInput *input, + GsfXMLProbeFunc startElement); + +/****************************************************************************/ +/* Simplified wrapper to SAX based xml import */ +typedef struct _GsfXMLIn GsfXMLIn; +typedef struct _GsfXMLInDoc GsfXMLInDoc; +typedef struct _GsfXMLInNode GsfXMLInNode; +typedef struct _GsfXMLInNS GsfXMLInNS; +typedef struct _GsfXMLBlob GsfXMLBlob; +typedef enum { + GSF_XML_NO_CONTENT = FALSE, + GSF_XML_CONTENT, + GSF_XML_SHARED_CONTENT +} GsfXMLContent; +typedef gboolean (*GsfXMLInUnknownFunc) (GsfXMLIn *xin, + xmlChar const *elem, xmlChar const **attrs); +typedef void (*GsfXMLInExtDtor) (GsfXMLIn *xin, gpointer old_state); + +struct _GsfXMLIn { + /* public state : read only */ + gpointer user_state; + GString *content; + GsfXMLInDoc const *doc; + GsfXMLInNode const *node; /* current node (not on the stack) */ + GSList *node_stack; /* stack of GsfXMLInNode */ +}; + +struct _GsfXMLInNode { + char const *id; /* unique in the entire tree */ + int ns_id; + char const *name; + char const *parent_id; + void (*start) (GsfXMLIn *xin, xmlChar const **attrs); + void (*end) (GsfXMLIn *xin, GsfXMLBlob *unknown); + + union { + int v_int; + gboolean v_bool; + gpointer v_blob; + char const *v_str; + } user_data; + GsfXMLContent has_content; + + unsigned int check_children_for_ns : 1; + unsigned int share_children_with_parent : 1; +}; + +struct _GsfXMLInNS { + char const *uri; + unsigned ns_id; +}; + +#define GSF_XML_IN_NS(id, uri) \ +{ uri, id } +#define GSF_XML_IN_NS_END \ +{ NULL, 0 } + +#define GSF_XML_IN_NODE_FULL(parent_id, id, ns, name, has_content, \ + share_children_with_parent, check_ns, start, end, user) \ +{ \ + #id, ns, name, #parent_id, start, end, { user }, has_content, \ + check_ns, share_children_with_parent, \ +} + +#define GSF_XML_IN_NODE(parent_id, id, ns, name, has_content, start, end) \ + GSF_XML_IN_NODE_FULL(parent_id, id, ns, name, has_content, \ + FALSE, FALSE, start, end, 0) +#define GSF_XML_IN_NODE_END \ + { NULL, 0, NULL, NULL, NULL, NULL, { 0 }, GSF_XML_NO_CONTENT, FALSE, FALSE } + +GsfXMLInDoc *gsf_xml_in_doc_new (GsfXMLInNode const *nodes, GsfXMLInNS const *ns); +void gsf_xml_in_doc_free (GsfXMLInDoc *doc); +gboolean gsf_xml_in_doc_parse (GsfXMLInDoc *doc, GsfInput *input, + gpointer user_state); +void gsf_xml_in_doc_add_nodes (GsfXMLInDoc *doc, + GsfXMLInNode const *nodes); +void gsf_xml_in_doc_set_unknown_handler (GsfXMLInDoc *doc, + GsfXMLInUnknownFunc handler); + +void gsf_xml_in_push_state (GsfXMLIn *xin, GsfXMLInDoc const *doc, + gpointer new_state, GsfXMLInExtDtor dtor, + xmlChar const **attrs); + +GsfInput *gsf_xml_in_get_input (GsfXMLIn const *xin); +char const *gsf_xml_in_check_ns (GsfXMLIn const *xin, char const *str, + unsigned int ns_id); +gboolean gsf_xml_in_namecmp (GsfXMLIn const *xin, char const *str, + unsigned int ns_id, char const *name); + +/****************************************************************************/ +/* Simplified GSF based xml export (does not use libxml) */ + +typedef struct _GsfXMLOut GsfXMLOut; + +#define GSF_XML_OUT_TYPE (gsf_xml_out_get_type ()) +#define GSF_XML_OUT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_XML_OUT_TYPE, GsfXMLOut)) +#define GSF_IS_XML_OUT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_XML_OUT_TYPE)) + +GType gsf_xml_out_get_type (void) G_GNUC_CONST; +/* void gsf_xml_out_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfXMLOut *gsf_xml_out_new (GsfOutput *output); + +void gsf_xml_out_set_doc_type (GsfXMLOut *xout, char const *type); +void gsf_xml_out_start_element (GsfXMLOut *xout, char const *id); +char const *gsf_xml_out_end_element (GsfXMLOut *xout); + +void gsf_xml_out_simple_element (GsfXMLOut *xout, char const *id, + char const *content); +void gsf_xml_out_simple_int_element (GsfXMLOut *xout, char const *id, + int val); +void gsf_xml_out_simple_float_element (GsfXMLOut *xout, char const *id, + double val, int precision); + +void gsf_xml_out_add_cstr_unchecked (GsfXMLOut *xout, char const *id, + char const *val_utf8); +void gsf_xml_out_add_cstr (GsfXMLOut *xout, char const *id, + char const *val_utf8); +void gsf_xml_out_add_bool (GsfXMLOut *xout, char const *id, + gboolean val); +void gsf_xml_out_add_int (GsfXMLOut *xout, char const *id, + int val); +void gsf_xml_out_add_uint (GsfXMLOut *xout, char const *id, + unsigned int val); +void gsf_xml_out_add_float (GsfXMLOut *xout, char const *id, + double val, int precision); +void gsf_xml_out_add_color (GsfXMLOut *xout, char const *id, + unsigned int r, unsigned int g, unsigned int b); +void gsf_xml_out_add_base64 (GsfXMLOut *xout, char const *id, + guint8 const *data, unsigned int len); +void gsf_xml_out_add_enum (GsfXMLOut *xout, char const *id, + GType etype, gint val); +void gsf_xml_out_add_gvalue (GsfXMLOut *xout, char const *id, + GValue const *val); + +/****************************************************************************/ +/* Some general utilities */ +gboolean gsf_xml_gvalue_from_str (GValue *res, GType t, char const *str); +GsfOutput *gsf_xml_out_get_output (GsfXMLOut const *xout); + +G_END_DECLS + +#endif /* GSF_LIBXML_H */ diff --git a/gsf/gsf-meta-names.h b/gsf/gsf-meta-names.h new file mode 100644 index 0000000..2627743 --- /dev/null +++ b/gsf/gsf-meta-names.h @@ -0,0 +1,482 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-meta-names.h: a list of gsf-meta-names to "generically" represent + * all diversly available implementation-specific + * meta-names. + * + * Author: Veerapuram Varadhan (vvaradhan@novell.com) + * Jody Goldberg (jody@gnome.org) + * + * Copyright (C) 2004-2006 Novell, Inc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ +#ifndef GSF_META_NAMES_H +#define GSF_META_NAMES_H + +/* The namespace follow this classification: + * "dc:" - Dublin Core tags + * "gsf:" - Gnumeric only tags + * "meta:" - OpenDocument tags shared with Gnumeric + * "msole:" - OLE tags + */ + +/****** Namespace - dc: ******/ + +/** + * GSF_META_NAME_CREATOR: + * + * (String) An entity primarily responsible for making the content of the + * resource typically a person, organization, or service. + * + * 1.14.0 Moved from "gsf" to "dc". + */ +#define GSF_META_NAME_CREATOR "dc:creator" + +/** + * GSF_META_NAME_DATE_MODIFIED: + * + * (GsfTimestamp) The last time this document was saved. + * + * 1.14.0 Moved from dc:date-modified to dc:date. + */ +#define GSF_META_NAME_DATE_MODIFIED "dc:date" + +/** + * GSF_META_NAME_DESCRIPTION: + * + * (String) An account of the content of the resource. + */ +#define GSF_META_NAME_DESCRIPTION "dc:description" + +/** + * GSF_META_NAME_KEYWORDS: + * + * (GsfDocPropVector of String) Searchable, indexable keywords. Similar to PDF + * keywords or HTML's meta block. + */ +#define GSF_META_NAME_KEYWORDS "dc:keywords" + +/** + * GSF_META_NAME_LANGUAGE: + * + * (String) The locale language of the intellectual content of the resource + * (basically xx_YY form for us). + * 1.14.0 Clarified that this is unique from _NAME_CODEPAGE in msole + */ +#define GSF_META_NAME_LANGUAGE "dc:language" + +/** + * GSF_META_NAME_CODEPAGE: + * + * (UnsignedShort) The MS codepage to encode strings for metadata + * 1.14.0 Clarified that this is unique from _NAME_CODEPAGE in msole + */ +#define GSF_META_NAME_CODEPAGE "msole:codepage" + +/** + * GSF_META_NAME_SUBJECT: + * + * (String) The topic of the content of the resource, + * typically including keywords. + */ +#define GSF_META_NAME_SUBJECT "dc:subject" + +/** + * GSF_META_NAME_TITLE: + * + * (String) A formal name given to the resource. + */ +#define GSF_META_NAME_TITLE "dc:title" + + +/****** Namespace - gsf: ******/ + +/** + * GSF_META_NAME_BYTE_COUNT: + * + * (Integer) Count of bytes in the document. + */ +#define GSF_META_NAME_BYTE_COUNT "gsf:byte-count" + +/** + * GSF_META_NAME_CASE_SENSITIVE + * + * (Unsigned Integer) Identifier representing the case-sensitiveness. + * of what ?? why is it an integer ?? + */ +#define GSF_META_NAME_CASE_SENSITIVE "gsf:case-sensitivity" + +/** + * GSF_META_NAME_CATEGORY + * + * (String) Category of the document. example??? + */ +#define GSF_META_NAME_CATEGORY "gsf:category" + +/** + * GSF_META_NAME_CELL_COUNT: + * + * (Integer) Count of cells in the spread-sheet document, if appropriate. + */ +#define GSF_META_NAME_CELL_COUNT "gsf:cell-count" + +/** + * GSF_META_NAME_CHARACTER_COUNT: + * + * (Integer) Count of characters in the document. + * + * TODO See how to sync this with ODF's document-statistic + */ +#define GSF_META_NAME_CHARACTER_COUNT "gsf:character-count" + +/** + * GSF_META_NAME_DICTIONARY: + * + * (None) Reserved name (PID) for Dictionary + */ +#define GSF_META_NAME_DICTIONARY "gsf:dictionary" + +/** + * GSF_META_NAME_DOCUMENT_PARTS: + * + * (Vector of strings) Names of the 'interesting' parts of the document. In + * spreadsheets this is a list of the sheet names, and the named expressions. + * From MSOLE + */ +#define GSF_META_NAME_DOCUMENT_PARTS "gsf:document-parts" + +/** + * GSF_META_NAME_HEADING_PAIRS: + * + * (Vector of string value pairs stored in alternating elements) Store the + * counts of objects in the document as names 'worksheet' and count '4' + * From MSOLE + */ +#define GSF_META_NAME_HEADING_PAIRS "gsf:heading-pairs" + +/** + * GSF_META_NAME_HIDDEN_SLIDE_COUNT: + * + * (Integer) Count of hidden-slides in the presentation document. + */ +#define GSF_META_NAME_HIDDEN_SLIDE_COUNT "gsf:hidden-slide-count" + +/** + * GSF_META_NAME_IMAGE_COUNT: + * + * (Integer) Count of images in the document, if appropriate. + */ +#define GSF_META_NAME_IMAGE_COUNT "gsf:image-count" + +/** + * GSF_META_NAME_LAST_SAVED_BY: + * + * (String) The entity that made the last change to the document, typically a + * person, organization, or service. + */ +#define GSF_META_NAME_LAST_SAVED_BY "gsf:last-saved-by" + +/** + * GSF_META_NAME_LINKS_DIRTY: + * + * (Boolean) ??????? + */ +#define GSF_META_NAME_LINKS_DIRTY "gsf:links-dirty" + +/** + * GSF_META_NAME_LOCALE_SYSTEM_DEFAULT: + * + * (Unsigned Integer) Identifier representing the default system locale. + */ +#define GSF_META_NAME_LOCALE_SYSTEM_DEFAULT "gsf:default-locale" + +/** + * GSF_META_NAME_MANAGER: + * + * (String) Name of the manager of "CREATOR" entity. + */ +#define GSF_META_NAME_MANAGER "gsf:manager" + +/** + * GSF_META_NAME_PRESENTATION_FORMAT: + * + * (String) Type of presentation, like "On-screen Show", "SlideView" etc. + */ +#define GSF_META_NAME_PRESENTATION_FORMAT "gsf:presentation-format" + +/** + * GSF_META_NAME_SCALE: + * + * (Boolean) ????? + */ +#define GSF_META_NAME_SCALE "gsf:scale" + +/** + * GSF_META_NAME_SECURITY: + * + * (Integer) Level of security. + * + * + * + * + * LevelValue + * + * + * None0 + * Password protected1 + * Read-only recommended2 + * Read-only enforced3 + * Locked for annotations4 + * + */ +#define GSF_META_NAME_SECURITY "gsf:security" + +/** + * GSF_META_NAME_THUMBNAIL: + * + * (GsfClipData) Thumbnail data of the document, typically a + * preview image of the document. + */ +#define GSF_META_NAME_THUMBNAIL "gsf:thumbnail" + +/** + * GSF_META_NAME_LINE_COUNT: + * + * (Integer) Count of liness in the document. + */ +#define GSF_META_NAME_LINE_COUNT "gsf:line-count" + +/** + * GSF_META_NAME_MM_CLIP_COUNT: + * + * (Integer) Count of "multi-media" clips in the document. + */ +#define GSF_META_NAME_MM_CLIP_COUNT "gsf:MM-clip-count" + +/** + * GSF_META_NAME_NOTE_COUNT: + * + * (Integer) Count of "notes" in the document. + */ +#define GSF_META_NAME_NOTE_COUNT "gsf:note-count" + +/** + * GSF_META_NAME_OBJECT_COUNT: + * + * (Integer) Count of objects (OLE and other graphics) in the document, if + * appropriate. + */ +#define GSF_META_NAME_OBJECT_COUNT "gsf:object-count" + +/** + * GSF_META_NAME_PAGE_COUNT: + * + * (Integer) Count of pages in the document, if appropriate. + */ +#define GSF_META_NAME_PAGE_COUNT "gsf:page-count" + +/** + * GSF_META_NAME_PARAGRAPH_COUNT: + * + * (Integer) Count of paragraphs in the document, if appropriate. + */ +#define GSF_META_NAME_PARAGRAPH_COUNT "gsf:paragraph-count" + +/** + * GSF_META_NAME_SLIDE_COUNT: + * + * (Integer) Count of slides in the presentation document. + */ +#define GSF_META_NAME_SLIDE_COUNT "gsf:slide-count" + +/** + * GSF_META_NAME_SPREADSHEET_COUNT: + * + * (Integer) Count of pages in the document, if appropriate. + */ +#define GSF_META_NAME_SPREADSHEET_COUNT "gsf:spreadsheet-count" + +/** + * GSF_META_NAME_TABLE_COUNT: + * + * (Integer) Count of tables in the document, if appropriate. + */ +#define GSF_META_NAME_TABLE_COUNT "gsf:table-count" + +/** + * GSF_META_NAME_WORD_COUNT: + * + * (Integer) Count of words in the document. + */ +#define GSF_META_NAME_WORD_COUNT "gsf:word-count" + + +/****** Namespace - msole: ******/ + +/** + * GSF_META_NAME_MSOLE_UNKNOWN_17: + * + * (Unknown) User-defined name + */ +#define GSF_META_NAME_MSOLE_UNKNOWN_17 "msole:unknown-doc-17" + +/** + * GSF_META_NAME_MSOLE_UNKNOWN_18: + * + * (Unknown) User-defined name + */ +#define GSF_META_NAME_MSOLE_UNKNOWN_18 "msole:unknown-doc-18" + +/** + * GSF_META_NAME_MSOLE_UNKNOWN_19: + * + * (Boolean) User-defined name + */ +#define GSF_META_NAME_MSOLE_UNKNOWN_19 "msole:unknown-doc-19" + +/** + * GSF_META_NAME_MSOLE_UNKNOWN_20: + * + * (Unknown) User-defined name + */ +#define GSF_META_NAME_MSOLE_UNKNOWN_20 "msole:unknown-doc-20" + +/** + * GSF_META_NAME_MSOLE_UNKNOWN_21: + * + * (Unknown) User-defined name + */ +#define GSF_META_NAME_MSOLE_UNKNOWN_21 "msole:unknown-doc-21" + +/** + * GSF_META_NAME_MSOLE_UNKNOWN_22: + * + * (Boolean) User-defined name + */ +#define GSF_META_NAME_MSOLE_UNKNOWN_22 "msole:unknown-doc-22" + +/** + * GSF_META_NAME_MSOLE_UNKNOWN_23: + * + * (i4) User-defined name + */ +#define GSF_META_NAME_MSOLE_UNKNOWN_23 "msole:unknown-doc-23" + + +/****** Namespace - meta: ******/ + +/** + * GSF_META_NAME_DATE_CREATED: + * + * (Date as ISO String) A date associated with an event in the life cycle of + * the resource (creation/publication date). + * Moved from gsf:date-created to meta:creation-date. This way can be used correctly + * by OpenDocument and Gnumeric. + */ +#define GSF_META_NAME_DATE_CREATED "meta:creation-date" + +/** + * GSF_META_NAME_EDITING_DURATION: + * + * (Date as ISO String) The total-time taken until the last modification. + * Moved from "gsf" to "meta". This way can be used correctly by OpenDocument + * and Gnumeric. + */ +#define GSF_META_NAME_EDITING_DURATION "meta:editing-duration" + +/** + * GSF_META_NAME_GENERATOR: + * + * (String) The application that generated this document. AbiWord, Gnumeric, + * etc... + * + * 1.14.0 Moved from "gsf" to "meta". + */ +#define GSF_META_NAME_GENERATOR "meta:generator" + +/** + * GSF_META_NAME_KEYWORD: + * + * (String) Searchable, indexable keywords. Similar to PDF keywords or HTML's + * meta block. + */ +#define GSF_META_NAME_KEYWORD "meta:keyword" + +/** + * GSF_META_NAME_INITIAL_CREATOR: + * + * (String) Specifies the name of the person who created the document + * initially. + * 1.14.0 Moved from "gsf" to "meta". + */ +#define GSF_META_NAME_INITIAL_CREATOR "meta:initial-creator" + +/** + * GSF_META_NAME_COMPANY: + * + * (String) Name of the company/organization that the "CREATOR" entity is + * associated with. + * + * 1.14.1 Moved from "gsf:company" to "dc:publisher". + */ +#define GSF_META_NAME_COMPANY "dc:publisher" + +/** + * GSF_META_NAME_PRINT_DATE: + * + * (GsfTimestamp) Specifies the date and time when the document was last + * printed. + */ +#define GSF_META_NAME_PRINT_DATE "meta:print-date" + +/** + * GSF_META_NAME_LAST_PRINTED: + * + * (GSF_META_NAME_HEADING_PAIRS) The last time this document was printed. + * + * 1.14.0 Moved from "gsf" to "dc". + * 1.14.1 Moved back to "gsf" from "dc". + */ +#define GSF_META_NAME_LAST_PRINTED "gsf:last-printed" + +/** + * GSF_META_NAME_PRINTED_BY: + * + * (String) Specifies the name of the last person who printed the document. + * + * 1.14.0 Moved from "gsf" to "meta". + */ +#define GSF_META_NAME_PRINTED_BY "meta:printed-by" + +/** + * GSF_META_NAME_REVISION_COUNT: + * + * (Integer) Count of revision on the document, if appropriate. + * Moved from gsf:revision-count to meta:editing-cycles. This way can be used + * correctly by OpenDocument and Gnumeric. + */ +#define GSF_META_NAME_REVISION_COUNT "meta:editing-cycles" + +/** + * GSF_META_NAME_TEMPLATE: + * + * (String) The template file that is been used to generate this document. + * + * 1.14.0 Moved from "gsf" to "meta" + */ +#define GSF_META_NAME_TEMPLATE "meta:template" + +#endif /* GSF_META_NAMES_H */ diff --git a/gsf/gsf-msole-impl.h b/gsf/gsf-msole-impl.h new file mode 100644 index 0000000..4a80dd8 --- /dev/null +++ b/gsf/gsf-msole-impl.h @@ -0,0 +1,84 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-msole-impl.h: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_MSOLE_IMPL_H +#define GSF_MSOLE_IMPL_H + +#include + +G_BEGIN_DECLS + +#define OLE_HEADER_SIZE 0x200 /* independent of big block size size */ +#define OLE_HEADER_SIGNATURE 0x00 +#define OLE_HEADER_CLSID 0x08 /* See ReadClassStg */ +#define OLE_HEADER_MINOR_VER 0x18 /* 0x33 and 0x3e have been seen */ +#define OLE_HEADER_MAJOR_VER 0x1a /* 0x3 been seen in wild */ +#define OLE_HEADER_BYTE_ORDER 0x1c /* 0xfe 0xff == Intel Little Endian */ +#define OLE_HEADER_BB_SHIFT 0x1e +#define OLE_HEADER_SB_SHIFT 0x20 +/* 0x22..0x27 reserved == 0 */ +#define OLE_HEADER_CSECTDIR 0x28 +#define OLE_HEADER_NUM_BAT 0x2c +#define OLE_HEADER_DIRENT_START 0x30 +/* 0x34..0x37 transacting signature must be 0 */ +#define OLE_HEADER_THRESHOLD 0x38 +#define OLE_HEADER_SBAT_START 0x3c +#define OLE_HEADER_NUM_SBAT 0x40 +#define OLE_HEADER_METABAT_BLOCK 0x44 +#define OLE_HEADER_NUM_METABAT 0x48 +#define OLE_HEADER_START_BAT 0x4c +#define BAT_INDEX_SIZE 4 +#define OLE_HEADER_METABAT_SIZE ((OLE_HEADER_SIZE - OLE_HEADER_START_BAT) / BAT_INDEX_SIZE) + +#define DIRENT_MAX_NAME_SIZE 0x40 +#define DIRENT_DETAILS_SIZE 0x40 +#define DIRENT_SIZE (DIRENT_MAX_NAME_SIZE + DIRENT_DETAILS_SIZE) +#define DIRENT_NAME_LEN 0x40 /* length in bytes incl 0 terminator */ +#define DIRENT_TYPE 0x42 +#define DIRENT_COLOUR 0x43 +#define DIRENT_PREV 0x44 +#define DIRENT_NEXT 0x48 +#define DIRENT_CHILD 0x4c +#define DIRENT_CLSID 0x50 /* only for dirs */ +#define DIRENT_USERFLAGS 0x60 /* only for dirs */ +#define DIRENT_CREATE_TIME 0x64 /* for files */ +#define DIRENT_MODIFY_TIME 0x6c /* for files */ +#define DIRENT_FIRSTBLOCK 0x74 +#define DIRENT_FILE_SIZE 0x78 +/* 0x7c..0x7f reserved == 0 */ + +#define DIRENT_TYPE_INVALID 0 +#define DIRENT_TYPE_DIR 1 +#define DIRENT_TYPE_FILE 2 +#define DIRENT_TYPE_LOCKBYTES 3 /* ? */ +#define DIRENT_TYPE_PROPERTY 4 /* ? */ +#define DIRENT_TYPE_ROOTDIR 5 +#define DIRENT_MAGIC_END 0xffffffff + +/* flags in the block allocation list to denote special blocks */ +#define BAT_MAGIC_UNUSED 0xffffffff /* -1 */ +#define BAT_MAGIC_END_OF_CHAIN 0xfffffffe /* -2 */ +#define BAT_MAGIC_BAT 0xfffffffd /* a bat block, -3 */ +#define BAT_MAGIC_METABAT 0xfffffffc /* a metabat block -4 */ + +G_END_DECLS + +#endif /* GSF_MSOLE_IMPL_H */ diff --git a/gsf/gsf-msole-utils.c b/gsf/gsf-msole-utils.c new file mode 100644 index 0000000..057d18f --- /dev/null +++ b/gsf/gsf-msole-utils.c @@ -0,0 +1,2436 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-msole-utils.c: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * Copyright (C) 2002-2006 Dom Lachowicz (cinamod@hotmail.com) + * excel_iconv* family of functions (C) 2001 by Vlad Harchev + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#define NO_DEBUG_OLE_PROPS +#ifndef NO_DEBUG_OLE_PROPS +#define d(code) do { code } while (0) +#else +#define d(code) +#endif + +enum { + DEBUG_UNKNOWN_PROPS = 1 +}; + +static gboolean +msole_debug (guint what) +{ + static guint flags; + static gboolean inited = FALSE; + + if (!inited) { + /* not static */ + const GDebugKey keys[] = { + { (char*)"msole_prop", DEBUG_UNKNOWN_PROPS }, + }; + + const char *val = g_getenv ("GSF_DEBUG"); + flags = val + ? g_parse_debug_string (val, keys, G_N_ELEMENTS (keys)) + : 0; + + inited = TRUE; + } + + return (flags & what) != 0; +} + +/* + * The Format Identifier for Summary Information + * F29F85E0-4FF9-1068-AB91-08002B27B3D9 + */ +static guint8 const component_guid [] = { + 0xe0, 0x85, 0x9f, 0xf2, 0xf9, 0x4f, 0x68, 0x10, + 0xab, 0x91, 0x08, 0x00, 0x2b, 0x27, 0xb3, 0xd9 +}; + +/* + * The Format Identifier for Document Summary Information + * D5CDD502-2E9C-101B-9397-08002B2CF9AE + */ +static guint8 const document_guid [] = { + 0x02, 0xd5, 0xcd, 0xd5, 0x9c, 0x2e, 0x1b, 0x10, + 0x93, 0x97, 0x08, 0x00, 0x2b, 0x2c, 0xf9, 0xae +}; + +/* + * The Format Identifier for User-Defined Properties + * D5CDD505-2E9C-101B-9397-08002B2CF9AE + */ +static guint8 const user_guid [] = { + 0x05, 0xd5, 0xcd, 0xd5, 0x9c, 0x2e, 0x1b, 0x10, + 0x93, 0x97, 0x08, 0x00, 0x2b, 0x2c, 0xf9, 0xae +}; + +typedef enum { + COMMON_PROP, /* in either summary or docsummary */ + COMPONENT_PROP, /* SummaryInformation properties */ + DOC_PROP, /* DocumentSummaryInformation properties */ + USER_PROP +} GsfMSOleMetaDataType; + +typedef enum { + VT_EMPTY = 0, + VT_NULL = 1, + VT_I2 = 2, + VT_I4 = 3, + VT_R4 = 4, + VT_R8 = 5, + VT_CY = 6, + VT_DATE = 7, + VT_BSTR = 8, + VT_DISPATCH = 9, + VT_ERROR = 10, + VT_BOOL = 11, + VT_VARIANT = 12, + VT_UNKNOWN = 13, + VT_DECIMAL = 14, + + VT_I1 = 16, + VT_UI1 = 17, + VT_UI2 = 18, + VT_UI4 = 19, + VT_I8 = 20, + VT_UI8 = 21, + VT_INT = 22, + VT_UINT = 23, + VT_VOID = 24, + VT_HRESULT = 25, + VT_PTR = 26, + VT_SAFEARRAY = 27, + VT_CARRAY = 28, + VT_USERDEFINED = 29, + VT_LPSTR = 30, + VT_LPWSTR = 31, + + VT_FILETIME = 64, + VT_BLOB = 65, + VT_STREAM = 66, + VT_STORAGE = 67, + VT_STREAMED_OBJECT = 68, + VT_STORED_OBJECT = 69, + VT_BLOB_OBJECT = 70, + VT_CF = 71, + VT_CLSID = 72, + VT_VECTOR = 0x1000 +} GsfMSOleVariantType; + +typedef struct { + char const *ms_name; + GsfMSOleMetaDataType section; + char const *gsf_name; + guint32 id; + GsfMSOleVariantType prefered_type; +} GsfMSOleMetaDataPropMap; + +typedef struct { + guint32 id; + gsf_off_t offset; +} GsfMSOleMetaDataProp; + +typedef struct { + GsfMSOleMetaDataType type; + gsf_off_t offset; + guint32 size, num_props; + GIConv iconv_handle; + unsigned char_size; + GHashTable *dict; +} GsfMSOleMetaDataSection; + +static GsfMSOleMetaDataPropMap const builtin_props [] = { + { "Dictionary", COMMON_PROP, GSF_META_NAME_DICTIONARY, 0, 0, /* magic */}, + { "CodePage", COMMON_PROP, GSF_META_NAME_CODEPAGE, 1, VT_I2 }, + { "LOCALE_SYSTEM_DEFAULT",COMMON_PROP, GSF_META_NAME_LOCALE_SYSTEM_DEFAULT, 0x80000000, VT_UI4}, + { "CASE_SENSITIVE", COMMON_PROP, GSF_META_NAME_CASE_SENSITIVE, 0x80000003, VT_UI4}, + { "Category", DOC_PROP, GSF_META_NAME_CATEGORY, 2, VT_LPSTR }, + { "PresentationFormat", DOC_PROP, GSF_META_NAME_PRESENTATION_FORMAT, 3, VT_LPSTR }, + { "NumBytes", DOC_PROP, GSF_META_NAME_BYTE_COUNT, 4, VT_I4 }, + { "NumLines", DOC_PROP, GSF_META_NAME_LINE_COUNT, 5, VT_I4 }, + { "NumParagraphs", DOC_PROP, GSF_META_NAME_PARAGRAPH_COUNT, 6, VT_I4 }, + { "NumSlides", DOC_PROP, GSF_META_NAME_SLIDE_COUNT, 7, VT_I4 }, + { "NumNotes", DOC_PROP, GSF_META_NAME_NOTE_COUNT, 8, VT_I4 }, + { "NumHiddenSlides", DOC_PROP, GSF_META_NAME_HIDDEN_SLIDE_COUNT, 9, VT_I4 }, + { "NumMMClips", DOC_PROP, GSF_META_NAME_MM_CLIP_COUNT, 10, VT_I4 }, + { "Scale", DOC_PROP, GSF_META_NAME_SCALE, 11, VT_BOOL }, + { "HeadingPairs", DOC_PROP, GSF_META_NAME_HEADING_PAIRS, 12, VT_VECTOR | VT_VARIANT }, + { "DocumentParts", DOC_PROP, GSF_META_NAME_DOCUMENT_PARTS, 13, VT_VECTOR | VT_LPSTR }, + { "Manager", DOC_PROP, GSF_META_NAME_MANAGER, 14, VT_LPSTR }, + { "Company", DOC_PROP, GSF_META_NAME_COMPANY, 15, VT_LPSTR }, + { "LinksDirty", DOC_PROP, GSF_META_NAME_LINKS_DIRTY, 16, VT_BOOL }, + { "DocSumInfo_17", DOC_PROP, GSF_META_NAME_MSOLE_UNKNOWN_17, 17, VT_UNKNOWN }, + { "DocSumInfo_18", DOC_PROP, GSF_META_NAME_MSOLE_UNKNOWN_18, 18, VT_UNKNOWN }, + { "DocSumInfo_19", DOC_PROP, GSF_META_NAME_MSOLE_UNKNOWN_19, 19, VT_BOOL }, + { "DocSumInfo_20", DOC_PROP, GSF_META_NAME_MSOLE_UNKNOWN_20, 20, VT_UNKNOWN }, + { "DocSumInfo_21", DOC_PROP, GSF_META_NAME_MSOLE_UNKNOWN_21, 21, VT_UNKNOWN }, + { "DocSumInfo_22", DOC_PROP, GSF_META_NAME_MSOLE_UNKNOWN_22, 22, VT_BOOL }, + { "DocSumInfo_23", DOC_PROP, GSF_META_NAME_MSOLE_UNKNOWN_23, 23, VT_I4 }, + { "Title", COMPONENT_PROP, GSF_META_NAME_TITLE, 2, VT_LPSTR }, + { "Subject", COMPONENT_PROP, GSF_META_NAME_SUBJECT, 3, VT_LPSTR }, + { "Author", COMPONENT_PROP, GSF_META_NAME_CREATOR, 4, VT_LPSTR }, + { "Keywords", COMPONENT_PROP, GSF_META_NAME_KEYWORDS, 5, VT_LPSTR }, + { "Comments", COMPONENT_PROP, GSF_META_NAME_DESCRIPTION, 6, VT_LPSTR }, + { "Template", COMPONENT_PROP, GSF_META_NAME_TEMPLATE, 7, VT_LPSTR }, + { "LastSavedBy", COMPONENT_PROP, GSF_META_NAME_LAST_SAVED_BY, 8, VT_LPSTR }, + { "RevisionNumber", COMPONENT_PROP, GSF_META_NAME_REVISION_COUNT, 9, VT_LPSTR }, + { "TotalEditingTime", COMPONENT_PROP, GSF_META_NAME_EDITING_DURATION, 10, VT_FILETIME }, + { "LastPrinted", COMPONENT_PROP, GSF_META_NAME_LAST_PRINTED, 11, VT_FILETIME }, + { "CreateTime", COMPONENT_PROP, GSF_META_NAME_DATE_CREATED, 12, VT_FILETIME }, + { "LastSavedTime", COMPONENT_PROP, GSF_META_NAME_DATE_MODIFIED, 13, VT_FILETIME }, + { "NumPages", COMPONENT_PROP, GSF_META_NAME_PAGE_COUNT, 14, VT_I4 }, + { "NumWords", COMPONENT_PROP, GSF_META_NAME_WORD_COUNT, 15, VT_I4 }, + { "NumCharacters", COMPONENT_PROP, GSF_META_NAME_CHARACTER_COUNT, 16, VT_I4 }, + { "Thumbnail", COMPONENT_PROP, GSF_META_NAME_THUMBNAIL, 17, VT_CF }, + { "AppName", COMPONENT_PROP, GSF_META_NAME_GENERATOR, 18, VT_LPSTR }, + { "Security", COMPONENT_PROP, GSF_META_NAME_SECURITY, 19, VT_I4 } +}; + +static GHashTable *name_to_prop_hash = NULL; + +static char const * +msole_vt_name (GsfMSOleVariantType type) +{ + static char const *names[] = { + "VT_EMPTY", "VT_NULL", "VT_I2", "VT_I4", "VT_R4", + "VT_R8", "VT_CY", "VT_DATE", "VT_BSTR", "VT_DISPATCH", + "VT_ERROR", "VT_BOOL", "VT_VARIANT", "VT_UNKNOWN", "VT_DECIMAL", + NULL, "VT_I1", "VT_UI1", "VT_UI2", "VT_UI4", + "VT_I8", "VT_UI8", "VT_INT", "VT_UINT", "VT_VOID", + "VT_HRESULT", "VT_PTR", "VT_SAFEARRAY", "VT_CARRAY", "VT_USERDEFINED", + "VT_LPSTR", "VT_LPWSTR", + }; + static char const *names2[] = { + "VT_FILETIME", + "VT_BLOB", "VT_STREAM", "VT_STORAGE", "VT_STREAMED_OBJECT", + "VT_STORED_OBJECT", "VT_BLOB_OBJECT", "VT_CF", "VT_CLSID" + }; + + type &= ~VT_VECTOR; + if (type <= VT_LPWSTR) + return names[type]; + g_return_val_if_fail (type >= VT_FILETIME, "_UNKNOWN_"); + g_return_val_if_fail (type <= VT_CLSID, "_UNKNOWN_"); + return names2[type-VT_FILETIME]; +} + +static char const * +msole_prop_id_to_gsf (GsfMSOleMetaDataSection *section, guint32 id, gboolean *linked) +{ + char const *res = NULL; + GsfMSOleMetaDataPropMap const *map = NULL; + unsigned i = 0; + + *linked = FALSE; + if (section->dict != NULL) { + if (id & 0x1000000) { + *linked = TRUE; + id &= ~0x1000000; + d (g_print ("LINKED ");); + } + + res = g_hash_table_lookup (section->dict, GINT_TO_POINTER (id)); + + if (res != NULL) { + d (g_print (res);); + return res; + } + } + + map = builtin_props ; + i = G_N_ELEMENTS (builtin_props); + while (i-- > 0) + if (map[i].id == id && + (map[i].section == COMMON_PROP || map[i].section == section->type)) { + d (g_print (map[i].gsf_name);); + return map[i].gsf_name; + } + + d (g_print ("_UNKNOWN_(0x%x %d)", id, id);); + + return NULL; +} + +static GsfMSOleMetaDataPropMap const * +msole_gsf_name_to_prop (char const *name) +{ + if (NULL == name_to_prop_hash) { + int i; + name_to_prop_hash = g_hash_table_new (g_str_hash, g_str_equal); + for (i = G_N_ELEMENTS (builtin_props); i-- > 0; ) + g_hash_table_replace (name_to_prop_hash, + (gpointer) builtin_props[i].gsf_name, + (gpointer) (builtin_props+i)); + } + + return g_hash_table_lookup (name_to_prop_hash, (gpointer)name); +} + +static void +set_error_missing_data (GError **error, const char *property_name, gsize size_needed, gsize size_gotten) +{ + gchar *size_needed_str, *size_gotten_str; + + size_needed_str = g_strdup_printf ("%" G_GSIZE_FORMAT, size_needed); + size_gotten_str = g_strdup_printf ("%" G_GSIZE_FORMAT, size_gotten); + g_set_error (error, + GSF_ERROR, + GSF_ERROR_INVALID_DATA, + _("Missing data when reading the %s property; got %s bytes, " + "but %s bytes at least are needed."), + property_name, + size_needed_str, + size_gotten_str); + g_free (size_needed_str); + g_free (size_gotten_str); +} + +/* Can return errors from gsf_blob_new() and GSF_ERROR_INVALID_DATA */ +static gboolean +parse_vt_cf (GValue *res, guint8 const **data, guint8 const *data_end, GError **error) +{ + /* clipboard size uint32 sizeof (clipboard format tag) + sizeof (clipboard data) + * clipboard format tag int32 see below + * clipboard data byte[] see below + * + * Clipboard format tag: + * -1 - Windows clipboard format + * -2 - Macintosh clipboard format + * -3 - GUID that contains a format identifier (FMTID) + * >0 - custom clipboard format name plus data (see msdn site below) + * 0 - No data + * + * References: + * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/stg/stg/propvariant.asp + * http://jakarta.apache.org/poi/hpsf/thumbnails.html + * http://linux.com.hk/docs/poi/org/apache/poi/hpsf/Thumbnail.html + * http://sparks.discreet.com/knowledgebase/public/solutions/ExtractThumbnailImg.htm + */ + guint32 clip_size, clip_data_size; + gint32 clip_format; + GsfBlob *blob; + GsfClipData *clip_data; + + /* Clipboard size field */ + + if (data_end < *data + 4) { + set_error_missing_data (error, "VT_CF", 4, data_end - *data); + return FALSE; + } + + clip_size = GSF_LE_GET_GUINT32 (*data); + + if (clip_size < 4) { /* must emcompass int32 format plus data size */ + gchar *size_str; + + size_str = g_strdup_printf ("%" G_GSIZE_FORMAT, (gsize) clip_size); + g_set_error (error, + GSF_ERROR, + GSF_ERROR_INVALID_DATA, + _("Corrupt data in the VT_CF property; clipboard data length must be at least 4 bytes, " + "but the data says it only has %s bytes available."), + size_str); + g_free (size_str); + return FALSE; + } + + *data += 4; + + /* Check clipboard format plus data size */ + + if (data_end < *data + clip_size) { + set_error_missing_data (error, "VT_CF", clip_size, data_end - *data); + return FALSE; + } + + clip_format = GSF_LE_GET_GINT32 (*data); + *data += 4; + + switch (clip_format) { + case GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD: + case GSF_CLIP_FORMAT_MACINTOSH_CLIPBOARD: + case GSF_CLIP_FORMAT_GUID: + case GSF_CLIP_FORMAT_NO_DATA: + /* everything is ok */ + break; + + default: + if (clip_format > 0) + clip_format = GSF_CLIP_FORMAT_CLIPBOARD_FORMAT_NAME; + else + clip_format = GSF_CLIP_FORMAT_UNKNOWN; + + break; + } + + clip_data_size = clip_size - 4; + + blob = gsf_blob_new (clip_data_size, *data, error); + + *data += clip_data_size; + + if (!blob) + return FALSE; + + clip_data = gsf_clip_data_new (clip_format, blob); + g_object_unref (blob); + + g_value_init (res, GSF_TYPE_CLIP_DATA); + g_value_set_object (res, clip_data); + g_object_unref (clip_data); + + return TRUE; +} + +/* + * Return a number no bigger than the number of bytes used for a property + * value of a given type. The returned number might be too small, but + * we try to return as big a value as possible. + */ +static size_t +msole_prop_min_size (guint32 type) +{ + switch (type) { + case VT_EMPTY: + case VT_NULL: + return 0; + + case VT_BOOL: + case VT_I1: + case VT_UI1: + return 1; + + case VT_I2: + case VT_UI2: + return 2; + + case VT_I4: + case VT_R4: + case VT_ERROR: + case VT_VARIANT: + case VT_UI4: + case VT_LPSTR: + case VT_LPWSTR: + case VT_BLOB: + case VT_BLOB_OBJECT: + case VT_CF: + case VT_VECTOR: + return 4; + + case VT_BSTR: + return 5; + + case VT_R8: + case VT_CY: + case VT_DATE: + case VT_I8: + case VT_UI8: + case VT_FILETIME: + return 8; + + case VT_CLSID: + return 16; + + case VT_DISPATCH: + case VT_UNKNOWN: + case VT_DECIMAL: + case VT_INT: + case VT_UINT: + case VT_VOID: + case VT_HRESULT: + case VT_PTR: + case VT_SAFEARRAY: + case VT_CARRAY: + case VT_USERDEFINED: + case VT_STREAM: + case VT_STORAGE: + case VT_STREAMED_OBJECT: + case VT_STORED_OBJECT: + default: + return 0; + } +} + +#define NEED_RECS(_n,_size1) \ + do { \ + guint _s1 = (_size1); \ + bytes_needed = (_n); \ + if (_s1 > 0 && (data_end - *data) / _s1 < bytes_needed) { \ + g_warning ("Invalid MS property or file truncated"); \ + return NULL; \ + } \ + bytes_needed *= _s1; \ + } while (0) + +#define NEED_BYTES(_n) NEED_RECS(_n,1) + +#define ADVANCE do { *data += bytes_needed; } while (0) + +static GValue * +msole_prop_parse (GsfMSOleMetaDataSection *section, + guint32 type, guint8 const **data, guint8 const *data_end) +{ + GValue *res = NULL; + char *str; + guint32 len; + gboolean const is_vector = type & VT_VECTOR; + GError *error; + guint bytes_needed; + + g_return_val_if_fail (!(type & (unsigned)(~0x1fff)), NULL); /* not valid in a prop set */ + + type &= 0xfff; + + if (is_vector) { + /* + * A vector is basically an array. If the type associated with + * it is a variant, then each element can have a different + * variant type. Otherwise, each element has the same variant + * type associated with the vector. + */ + unsigned i, n, size1; + GsfDocPropVector *vector; + + NEED_BYTES (4); + n = GSF_LE_GET_GUINT32 (*data); + ADVANCE; + + d (g_print (" array with %d elem\n", n); + gsf_mem_dump (*data, (unsigned)(data_end - *data));); + + size1 = msole_prop_min_size (type); + NEED_RECS(n, size1); + + vector = gsf_docprop_vector_new (); + + for (i = 0 ; i < n ; i++) { + GValue *v; + d (g_print ("\t[%d] ", i);); + v = msole_prop_parse (section, type, data, data_end); + if (v) { + if (G_IS_VALUE (v)) { + gsf_docprop_vector_append (vector, v); + g_value_unset (v); + } + g_free (v); + } + } + + res = g_new0 (GValue, 1); + g_value_init (res, GSF_DOCPROP_VECTOR_TYPE); + g_value_set_object (res, vector); + g_object_unref (vector); + return res; + } + + res = g_new0 (GValue, 1); + d (g_print ("%s\n", msole_vt_name (type));); + switch (type) { + case VT_EMPTY : + /* + * A property with a type indicator of VT_EMPTY has no data + * associated with it; that is, the size of the value is zero. + */ + /* value::unset == empty */ + break; + + case VT_NULL : + /* This is like a pointer to NULL */ + /* value::unset == null too :-) do we need to distinguish ? */ + break; + + case VT_I2 : + /* 2-byte signed integer */ + NEED_BYTES (2); + g_value_init (res, G_TYPE_INT); + g_value_set_int (res, GSF_LE_GET_GINT16 (*data)); + ADVANCE; + break; + + case VT_I4 : + /* 4-byte signed integer */ + NEED_BYTES (4); + g_value_init (res, G_TYPE_INT); + g_value_set_int (res, GSF_LE_GET_GINT32 (*data)); + ADVANCE; + break; + + case VT_R4 : + /* 32-bit IEEE floating-point value */ + NEED_BYTES (4); + g_value_init (res, G_TYPE_FLOAT); + g_value_set_float (res, GSF_LE_GET_FLOAT (*data)); + ADVANCE; + break; + + case VT_R8 : + /* 64-bit IEEE floating-point value */ + NEED_BYTES (8); + g_value_init (res, G_TYPE_DOUBLE); + g_value_set_double (res, GSF_LE_GET_DOUBLE (*data)); + ADVANCE; + break; + + case VT_CY : + /* 8-byte two's complement integer (scaled by 10,000) */ + NEED_BYTES (8); + /* CHEAT : just store as an int64 for now */ + g_value_init (res, G_TYPE_INT64); + g_value_set_int64 (res, GSF_LE_GET_GINT64 (*data)); + break; + + case VT_DATE : + /* + * 64-bit floating-point number representing the number of days + * (not seconds) since December 31, 1899. + */ + if (msole_debug (DEBUG_UNKNOWN_PROPS)) + g_warning ("Unhandled property value type %d (0x%x)", + type, type); + NEED_BYTES (8); + break; + + case VT_BSTR : + /* + * Pointer to null-terminated Unicode string; the string is pre- + * ceeded by a DWORD representing the byte count of the number + * of bytes in the string (including the terminating null). + */ + if (msole_debug (DEBUG_UNKNOWN_PROPS)) + g_warning ("Unhandled property value type %d (0x%x)", + type, type); + NEED_BYTES (4); + ADVANCE; + break; + + case VT_DISPATCH : + if (msole_debug (DEBUG_UNKNOWN_PROPS)) + g_warning ("Unhandled property value type %d (0x%x)", + type, type); + break; + + case VT_BOOL : + /* A boolean (WORD) value containg 0 (false) or -1 (true). */ + NEED_BYTES (1); + g_value_init (res, G_TYPE_BOOLEAN); + g_value_set_boolean (res, **data ? TRUE : FALSE); + ADVANCE; + break; + + case VT_VARIANT : d (g_print ("\tcontaining a ");); + /* + * A type indicator (a DWORD) followed by the corresponding + * value. VT_VARIANT is only used in conjunction with + * VT_VECTOR. + */ + NEED_BYTES (4); + g_free (res); + type = GSF_LE_GET_GUINT32 (*data); + ADVANCE; + return msole_prop_parse (section, type, data, data_end); + + case VT_UI1 : + /* 1-byte unsigned integer */ + NEED_BYTES (1); + g_value_init (res, G_TYPE_UCHAR); + g_value_set_uchar (res, GSF_LE_GET_GUINT8 (*data)); + ADVANCE; + break; + + case VT_I1 : + /* 1-byte unsigned integer */ + NEED_BYTES (1); + g_value_init (res, G_TYPE_CHAR); + g_value_set_char (res, GSF_LE_GET_GINT8 (*data)); + ADVANCE; + break; + + case VT_UI2 : + /* 2-byte unsigned integer */ + NEED_BYTES (2); + g_value_init (res, G_TYPE_UINT); + g_value_set_uint (res, GSF_LE_GET_GUINT16 (*data)); + ADVANCE; + break; + + case VT_UI4 : + /* 4-type unsigned integer */ + NEED_BYTES (4); + g_value_init (res, G_TYPE_UINT); + g_value_set_uint (res, GSF_LE_GET_GUINT32 (*data)); + ADVANCE; + break; + + case VT_I8 : d (g_print ("VT_I8\n");); + /* 8-byte signed integer */ + NEED_BYTES (8); + g_value_init (res, G_TYPE_INT64); + g_value_set_int64 (res, GSF_LE_GET_GINT64 (*data)); + ADVANCE; + break; + + case VT_UI8 : + /* 8-byte unsigned integer */ + NEED_BYTES (8); + g_value_init (res, G_TYPE_UINT64); + g_value_set_uint64 (res, GSF_LE_GET_GUINT64 (*data)); + ADVANCE; + break; + + case VT_LPSTR : + /* + * This is the representation of many strings. It is stored in + * the same representation as VT_BSTR. Note that the serialized + * representation of VP_LPSTR has a preceding byte count, whereas + * the in-memory representation does not. + */ + NEED_BYTES (4); + len = GSF_LE_GET_GUINT32 (*data); + ADVANCE; + + NEED_RECS (len, section->char_size); + + g_return_val_if_fail (len < 0x10000, NULL); + + error = NULL; + d (gsf_mem_dump (*data, len * section->char_size);); + str = g_convert_with_iconv (*data, + len * section->char_size, + section->iconv_handle, NULL, NULL, &error); + + g_value_init (res, G_TYPE_STRING); + if (NULL != str) { + g_value_set_string (res, str); + g_free (str); + } else if (NULL != error) { + g_warning ("error: %s", error->message); + g_error_free (error); + } else { + g_warning ("unknown error converting string property, using blank"); + } + ADVANCE; + break; + + case VT_LPWSTR : + /* + * A counted and null-terminated Unicode string; a DWORD character + * count (where the count includes the terminating null) followed + * by that many Unicode (16-bit) characters. Note that the count + * is character count, not byte count. + */ + + NEED_BYTES (4); + len = GSF_LE_GET_GUINT32 (*data); + ADVANCE; + + NEED_RECS (len, 2); + + g_return_val_if_fail (len < 0x10000, NULL); + + error = NULL; + d (gsf_mem_dump (*data, len * 2);); + str = g_convert (*data, len * 2, + "UTF-8", "UTF-16LE", NULL, NULL, &error); + + g_value_init (res, G_TYPE_STRING); + if (NULL != str) { + g_value_set_string (res, str); + g_free (str); + } else if (NULL != error) { + g_warning ("error: %s", error->message); + g_error_free (error); + } else { + g_warning ("unknown error converting string property, using blank"); + } + ADVANCE; + break; + + case VT_FILETIME : { + /* 64-bit FILETIME structure, as defined by Win32. */ + guint64 ft; + GsfTimestamp *ts; + + NEED_BYTES (8); + + /* ft * 100ns since Jan 1 1601 */ + ft = GSF_LE_GET_GUINT64 (*data); + + ft /= 10000000; /* convert to seconds */ + ft -= G_GINT64_CONSTANT (11644473600); /* move to Jan 1 1970 */ + ts = gsf_timestamp_new (); + gsf_timestamp_set_time (ts, ft); + g_value_init (res, GSF_TIMESTAMP_TYPE); + gsf_value_set_timestamp (res, ts); + gsf_timestamp_free (ts); + + ADVANCE; + break; + } + + case VT_BLOB : + /* + * A DWORD count of bytes, followed by that many bytes of data. + * The byte count does not include the four bytes for the length + * of the count itself: An empty blob would have a count of + * zero, followed by zero bytes. Thus the serialized represen- + * tation of a VT_BLOB is similar to that of a VT_BSTR but does + * not guarantee a null byte at the end of the data. + */ + NEED_BYTES (4); + ADVANCE; + if (msole_debug (DEBUG_UNKNOWN_PROPS)) + g_warning ("Unhandled property value type %d (0x%x)", + type, type); + g_free (res); + res = NULL; + break; + + case VT_STREAM : + /* + * Indicates the value is stored in a stream that is sibling + * to the CONTENTS stream. Following this type indicator is + * data in the format of a serialized VT_LPSTR, which names + * the stream containing the data. + */ + if (msole_debug (DEBUG_UNKNOWN_PROPS)) + g_warning ("Unhandled property value type %d (0x%x)", + type, type); + g_free (res); + res = NULL; + break; + + case VT_STORAGE : + /* + * Indicates the value is stored in an IStorage that is + * sibling to the CONTENTS stream. Following this type + * indicator is data in the format of a serialized VT_LPSTR, + * which names the IStorage containing the data. + */ + if (msole_debug (DEBUG_UNKNOWN_PROPS)) + g_warning ("Unhandled property value type %d (0x%x)", + type, type); + g_free (res); + res = NULL; + break; + + case VT_STREAMED_OBJECT: + /* + * Same as VT_STREAM, but indicates that the stream contains a + * serialized object, which is a class ID followed by initiali- + * zation data for the class. + */ + if (msole_debug (DEBUG_UNKNOWN_PROPS)) + g_warning ("Unhandled property value type %d (0x%x)", + type, type); + g_free (res); + res = NULL; + break; + + case VT_STORED_OBJECT : + /* + * Same as VT_STORAGE, but indicates that the designated + * IStorage contains a loadable object. + */ + if (msole_debug (DEBUG_UNKNOWN_PROPS)) + g_warning ("Unhandled property value type %d (0x%x)", + type, type); + g_free (res); + res = NULL; + break; + + case VT_BLOB_OBJECT : + /* + * Contains a serialized object in the same representation as + * would appear in a VT_STREAMED_OBJECT. That is, following + * the VT_BLOB_OBJECT tag is a DWORD byte count of the + * remaining data (where the byte count does not include the + * size of itself) which is in the format of a class ID + * followed by initialization data for that class + */ + if (msole_debug (DEBUG_UNKNOWN_PROPS)) + g_warning ("Unhandled property value type %d (0x%x)", + type, type); + g_free (res); + res = NULL; + break; + + case VT_CF : + error = NULL; + if (!parse_vt_cf (res, data, data_end, &error)) { + /* suck, we can't propagate the error upwards */ + if (error) { + g_warning ("error: %s", error->message); + g_error_free (error); + } + else { + g_warning ("unknown error parsing vt_cf"); + } + g_free (res); + res = NULL; + } + break; + + case VT_CLSID : + /* A class ID (or other GUID) */ + NEED_BYTES (16); + ADVANCE; + g_free (res); + res = NULL; + break; + + case VT_ERROR : + /* A DWORD containing a status code. */ + case VT_UNKNOWN : + case VT_DECIMAL : + case VT_INT : + case VT_UINT : + case VT_VOID : + case VT_HRESULT : + case VT_PTR : + case VT_SAFEARRAY : + case VT_CARRAY : + case VT_USERDEFINED : + g_warning ("type %s (0x%x) is not permitted in property sets", + msole_vt_name (type), type); + g_free (res); + res = NULL; + break; + + default : + if (msole_debug (DEBUG_UNKNOWN_PROPS)) + g_warning ("Unknown property type %d (0x%x)", + type, type); + g_free (res); + res = NULL; + } + + if (res != NULL && G_IS_VALUE (res)) { + d ( { + char *val = g_strdup_value_contents (res); + g_print ("%s\n", val); + g_free (val); + }); + } else { + d ({ + char const *type_name = msole_vt_name (type); + if (type_name) { + g_printerr ("A '%s' property could not be parsed\n", type_name); + } else { + g_printerr ("A %d property could not be parsed\n", type); + } + }); + g_free (res); + res = NULL; + } + return res; +} +#undef NEED_BYTES +#undef NEED_RECS +#undef ADVANCE + +static gboolean +msole_prop_read (GsfInput *in, + GsfMSOleMetaDataSection *section, + GsfMSOleMetaDataProp *props, + unsigned i, + GsfDocMetaData *accum) +{ + guint32 type; + guint8 const *data; + gsf_off_t size = ((i+1) >= section->num_props) + ? section->size + : props[i+1].offset; + char *name; + GValue *val; + + g_return_val_if_fail (i < section->num_props, FALSE); + g_return_val_if_fail (size >= props[i].offset + 4, FALSE); + + size -= props[i].offset; /* includes the type id */ + /* From now on, size is actually a size. */ + if (gsf_input_seek (in, section->offset+props[i].offset, G_SEEK_SET) || + NULL == (data = gsf_input_read (in, size, NULL))) { + g_warning ("failed to read prop #%d", i); + return FALSE; + } + + type = GSF_LE_GET_GUINT32 (data); + data += 4; + + /* dictionary is magic */ + if (props[i].id == 0) { + guint32 len, id, j, n; + gsize gslen; + char *name; + guint8 const *start = data; + + g_return_val_if_fail (section->dict == NULL, FALSE); + + section->dict = g_hash_table_new_full ( + g_direct_hash, g_direct_equal, + NULL, g_free); + + d ({ g_print ("Dictionary = \n"); gsf_mem_dump (data-4, size); }); + n = type; + for (j = 0 ; j < n ; j++) { + id = GSF_LE_GET_GUINT32 (data); + len = GSF_LE_GET_GUINT32 (data + 4); + + g_return_val_if_fail (len < 0x10000, FALSE); + + gslen = 0; + name = g_convert_with_iconv (data + 8, + len * section->char_size, + section->iconv_handle, &gslen, NULL, NULL); + len = (guint32)gslen; + data += 8 + len; + + d (g_print ("\t%u == %s\n", id, name);); + g_hash_table_replace (section->dict, + GINT_TO_POINTER (id), name); + + /* MS documentation blows goats ! + * The docs claim there are padding bytes in the dictionary. + * Their examples show padding bytes. + * In reality non-unicode strings do not see to have padding. + */ + if (section->char_size != 1 && (data - start) % 4) + data += 4 - ((data - start) % 4); + } + } else { + gboolean linked; + d (g_print ("===> %u) ", i); + gsf_mem_dump (data-4, size);); + + name = g_strdup (msole_prop_id_to_gsf (section, props[i].id, &linked)); + d (g_print (" @ %x %x = ", (unsigned)props[i].offset, (unsigned)size);); + val = msole_prop_parse (section, type, &data, data + size); + + if (NULL != name && NULL != val) { + if (linked) { + GsfDocProp *prop = gsf_doc_meta_data_lookup (accum, name); + if (NULL == prop) { + g_warning ("linking property '%s' before it\'s value is specified", + (name ? name : "")); + } else if (!G_VALUE_HOLDS_STRING (val)) { + g_warning ("linking property '%s' before it\'s value is specified", + (name ? name : "")); + } else + gsf_doc_prop_set_link (prop, + g_value_dup_string (val)); + } else { + gsf_doc_meta_data_insert (accum, name, val); + val = NULL; + name = NULL; + } + } + + if (NULL != val) { + if (G_IS_VALUE (val)) + g_value_unset (val); + g_free (val); + } + g_free (name); + } + + return TRUE; +} + +static int +msole_prop_cmp (gconstpointer a, gconstpointer b) +{ + GsfMSOleMetaDataProp const *prop_a = a; + GsfMSOleMetaDataProp const *prop_b = b; + + if (prop_a->offset < prop_b->offset) + return -1; + else if (prop_a->offset > prop_b->offset) + return +1; + else + return 0; +} + +/** + * gsf_msole_metadata_read : + * @in : #GsfInput + * @accum : #GsfDocMetaData + * + * Read a stream formated as a set of MS OLE properties from @in and store the + * results in @accum. + * + * Returns: GError which the caller must free on error. + **/ +GError * +gsf_msole_metadata_read (GsfInput *in, GsfDocMetaData *accum) +{ + guint8 const *data; + guint16 version; + guint32 os, num_sections; + unsigned i, j; + GsfMSOleMetaDataSection *sections; + GsfMSOleMetaDataProp *props; + GsfDocProp *prop; + + /* http://bugzilla.gnome.org/show_bug.cgi?id=352055 + * psiwin generates files with empty property sections */ + if (gsf_input_size (in) <= 0) + return NULL; + + data = gsf_input_read (in, 28, NULL); + if (NULL == data) + return g_error_new (gsf_input_error_id (), 0, + "Unable to read MS property stream header"); + + d ({g_print ("===================================\n" + "header class id ==\n"); + gsf_mem_dump (data, 28);}); + /* + * Validate the Property Set Header. + * Format (bytes) : + * 00 - 01 Byte order 0xfffe + * 02 - 03 Format 0 + * 04 - 05 OS Version high word is the OS + * 06 - 07 low word is the OS version + * 0 = win16 + * 1 = mac + * 2 = win32 + * 08 - 23 Class Identifier Usually Format ID + * 24 - 27 Section count Should be at least 1 + */ + os = GSF_LE_GET_GUINT16 (data + 6); + version = GSF_LE_GET_GUINT16 (data + 2); + num_sections = GSF_LE_GET_GUINT32 (data + 24); + if (GSF_LE_GET_GUINT16 (data + 0) != 0xfffe + || (version != 0 && version != 1) + || os > 2 + || num_sections > gsf_input_size(in) / 20 + || num_sections > 100) /* arbitrary sanity check */ + return g_error_new (gsf_input_error_id (), 0, + "Invalid MS property stream header"); + + /* extract the section info */ + /* + * The Format ID/Offset list follows. + * Format: + * 00 - 16 Section Name Format ID + * 16 - 19 Section Offset The offset is the number of + * bytes from the start of the + * whole stream to where the + * section begins. + */ + sections = (GsfMSOleMetaDataSection *)g_alloca (sizeof (GsfMSOleMetaDataSection)* num_sections); + for (i = 0 ; i < num_sections ; i++) { + data = gsf_input_read (in, 20, NULL); + if (NULL == data) + return g_error_new (gsf_input_error_id (), 0, + "Unable to read MS property stream header"); + if (!memcmp (data, component_guid, sizeof (component_guid))) + sections [i].type = COMPONENT_PROP; + else if (!memcmp (data, document_guid, sizeof (document_guid))) + sections [i].type = DOC_PROP; + else if (!memcmp (data, user_guid, sizeof (user_guid))) + sections [i].type = USER_PROP; + else { + sections [i].type = USER_PROP; + g_warning ("Unknown property section type, treating it as USER"); + gsf_mem_dump (data, 16); + } + + sections [i].offset = GSF_LE_GET_GUINT32 (data + 16); + } + + /* + * A section is the third part of the property set stream. + * Format (bytes) : + * 00 - 03 Section size A byte count for the section (which is inclusive + * of the byte count itself and should always be a + * multiple of 4); + * 04 - 07 Property count A count of the number of properties + * 08 - xx An array of 32-bit Property ID/Offset pairs + * yy - zz An array of Property Type indicators/Value pairs + */ + for (i = 0 ; i < num_sections ; i++) { + if (gsf_input_seek (in, sections[i].offset, G_SEEK_SET) || + NULL == (data = gsf_input_read (in, 8, NULL))) + return g_error_new (gsf_input_error_id (), 0, + "Invalid MS property section"); + + sections[i].iconv_handle = (GIConv)-1; + sections[i].char_size = 1; + sections[i].dict = NULL; + sections[i].size = GSF_LE_GET_GUINT32 (data); /* includes header */ + sections[i].num_props = GSF_LE_GET_GUINT32 (data + 4); + + d (g_print ("=============================================\n" + "===> section #%d : type %d at offset 0x%x, size 0x%x, numprops = %u\n", + i, (int)sections [i].type, + (guint32)sections [i].offset, + sections[i].size, + sections[i].num_props);); + + if (sections[i].num_props <= 0) + continue; + if (sections[i].num_props > gsf_input_remaining(in) / 8) + return g_error_new (gsf_input_error_id (), 0, + "Invalid MS property stream header or file truncated"); + + if (sections[i].offset + sections[i].size > gsf_input_size(in)) + return g_error_new (gsf_input_error_id (), 0, + "Invalid MS property stream header or file truncated"); + + /* + * Get and save all the Property ID/Offset pairs. + * Format (bytes) : + * 00 - 03 id Property ID + * 04 - 07 offset The distance from the start of the section to the + * start of the Property Type/Value pair. + */ + d (g_print ("Offsets\n");); + props = g_new (GsfMSOleMetaDataProp, sections[i].num_props); + for (j = 0; j < sections[i].num_props; j++) { + if (NULL == (data = gsf_input_read (in, 8, NULL))) { + g_free (props); + return g_error_new (gsf_input_error_id (), 0, + "Invalid MS property section"); + } + + props[j].id = GSF_LE_GET_GUINT32 (data); + props[j].offset = GSF_LE_GET_GUINT32 (data + 4); + d (g_print ("%d) ID=%d, offset=0x%x\n", j, + props [j].id, (unsigned)props [j].offset);); + } + + /* FIXME: Should we check that ids are distinct? */ + + /* order prop info by offset to facilitate bounds checking */ + qsort (props, sections[i].num_props, + sizeof (GsfMSOleMetaDataProp), + msole_prop_cmp); + + /* Sanity checks. */ + for (j = 0; j < sections[i].num_props; j++) { + guint end = (j == sections[i].num_props - 1) + ? sections[i].size + : props[j + 1].offset; + if (props[j].offset < 0 || props[j].offset + 4 > end) { + g_free (props); + return g_error_new (gsf_input_error_id (), 0, + "Invalid MS property section"); + } + } + + /* + * Find and process the code page. + * Property ID 1 is reserved as an indicator of the code page. + */ + sections[i].iconv_handle = (GIConv)-1; + sections[i].char_size = 1; + for (j = 0; j < sections[i].num_props; j++) /* first codepage */ + if (props[j].id == 1) { + msole_prop_read (in, sections+i, props, j, accum); + if (NULL != (prop = gsf_doc_meta_data_lookup (accum, GSF_META_NAME_CODEPAGE))) { + GValue const *val = gsf_doc_prop_get_val (prop); + if (NULL != val && G_VALUE_HOLDS_INT (val)) { + int codepage = g_value_get_int (val); + sections[i].iconv_handle = + gsf_msole_iconv_open_for_import (codepage); + if (codepage == 1200 || codepage == 1201) + sections[i].char_size = 2; + } + } + } + + if (sections[i].iconv_handle == (GIConv)-1) + sections[i].iconv_handle = gsf_msole_iconv_open_for_import (1252); + + /* + * Find and process the Property Set Dictionary + * Property ID 0 is reserved as an indicator of the dictionary. + * For User Defined Sections, Property ID 0 is NOT a dictionary. + */ + for (j = 0; j < sections[i].num_props; j++) /* then dictionary */ + if (props[j].id == 0) + msole_prop_read (in, sections+i, props, j, accum); + + /* Process all the properties */ + for (j = 0; j < sections[i].num_props; j++) /* the rest */ + if (props[j].id > 1) + msole_prop_read (in, sections+i, props, j, accum); + + gsf_iconv_close (sections[i].iconv_handle); + g_free (props); + if (sections[i].dict != NULL) + g_hash_table_destroy (sections[i].dict); + } + return NULL; +} + +/****************************************************************************/ + +typedef struct { + GsfOutput *out; + gboolean doc_not_component; + + GHashTable *dict; + struct { + unsigned count; /* includes 2nd prop for links */ + GSList *props; + } builtin, user; + + unsigned codepage; +} WritePropState; + +static GsfMSOleVariantType +gvalue_to_msole_vt (GValue const *value, GsfMSOleMetaDataPropMap const *map) +{ + g_return_val_if_fail (value != NULL, VT_EMPTY); + + switch (G_TYPE_FUNDAMENTAL (G_VALUE_TYPE (value))) { + case G_TYPE_BOOLEAN: return VT_BOOL; + case G_TYPE_UCHAR: return VT_UI1; + case G_TYPE_FLOAT: return VT_R4; + case G_TYPE_DOUBLE: return VT_R8; + case G_TYPE_STRING: return VT_LPSTR; + case G_TYPE_INT: + return (NULL != map && map->prefered_type == VT_I2) + ? VT_I2 : VT_I4; + case G_TYPE_UINT: + return (NULL != map && map->prefered_type == VT_UI2) + ? VT_UI2 : VT_UI4; + case G_TYPE_BOXED: + if (VAL_IS_GSF_TIMESTAMP (value)) + return VT_FILETIME; + return VT_UNKNOWN; + case G_TYPE_OBJECT: + if (VAL_IS_GSF_DOCPROP_VECTOR (value)) { + GValueArray *vector = gsf_value_get_docprop_varray (value); + unsigned i, n; + GsfMSOleVariantType type, tmp; + + if (vector == NULL) + return VT_UNKNOWN; + + if (map != NULL) { + type = map->prefered_type & (~VT_VECTOR); + if (type == VT_VARIANT) + return VT_VECTOR | VT_VARIANT; + } else + type = VT_UNKNOWN; + n = vector->n_values; + for (i = 0; i < n; i++) { + tmp = gvalue_to_msole_vt ( + g_value_array_get_nth (vector, i), NULL); + if (type == VT_UNKNOWN) + type = tmp; + else if (type != tmp) + return VT_VECTOR | VT_VARIANT; + } + return VT_VECTOR | type; + } + break; + } + return VT_UNKNOWN; +} + +/* Returns: TRUE on success */ +static gboolean +msole_metadata_write_prop (WritePropState *state, + char const *name, + GValue const *value, + gboolean suppress_type) +{ + static guint8 const zero[1] = { '\0' }; + GsfMSOleMetaDataPropMap const *map = + (name != NULL) ? msole_gsf_name_to_prop (name) : NULL; + GsfMSOleVariantType type; + guint8 buf[8]; + + g_return_val_if_fail (value != NULL, FALSE); + + type = gvalue_to_msole_vt (value, map); + if (!suppress_type) { + GSF_LE_SET_GUINT32 (buf, type); + gsf_output_write (state->out, 4, buf); + } + if (NULL != map && map->prefered_type != type) { + d(g_print ("Exporting property '%s' with type 0x%x rather than the usual 0x%x\n", + map->gsf_name, type, map->prefered_type);); + } + + if (type & VT_VECTOR) { + GValueArray *vector = gsf_value_get_docprop_varray (value); + unsigned i, n = vector->n_values; + gboolean res; + + GSF_LE_SET_GINT32 (buf, n); + res = gsf_output_write (state->out, 4, buf); + for (i = 0; i < n; i++) + res &= msole_metadata_write_prop (state, NULL, + g_value_array_get_nth (vector, i), + type != (VT_VECTOR | VT_VARIANT)); + return res; + } + + switch (type) { + case VT_BOOL: + if (g_value_get_boolean (value)) + GSF_LE_SET_GINT32 (buf, 0xffffffff); + else + GSF_LE_SET_GINT32 (buf, 0); + return gsf_output_write (state->out, 4, buf); + case VT_UI1: + GSF_LE_SET_GUINT32 (buf, g_value_get_uchar (value)); + return gsf_output_write (state->out, 4, buf); + case VT_I2: + GSF_LE_SET_GINT16 (buf, g_value_get_int (value)); + GSF_LE_SET_GUINT16 (buf+2, 0); + return gsf_output_write (state->out, 4, buf); + case VT_I4: + GSF_LE_SET_GINT32 (buf, g_value_get_int (value)); + return gsf_output_write (state->out, 4, buf); + case VT_UI2: + case VT_UI4: + GSF_LE_SET_GUINT32 (buf, g_value_get_uint (value)); + return gsf_output_write (state->out, 4, buf); + case VT_R4: + GSF_LE_SET_FLOAT (buf, g_value_get_float (value)); + return gsf_output_write (state->out, 4, buf); + case VT_R8: + GSF_LE_SET_DOUBLE (buf, g_value_get_double (value)); + return gsf_output_write (state->out, 8, buf); + + case VT_LPSTR : { +/* FIXME FIXME FIXME TODO : use iconv from codepage */ + char const *txt = g_value_get_string (value); + unsigned len = (NULL != txt) ? strlen (txt) : 0; + GSF_LE_SET_GUINT32 (buf, len+1); + return gsf_output_write (state->out, 4, buf) && + gsf_output_write (state->out, len, txt) && + gsf_output_write (state->out, 1, zero); + } + + case VT_FILETIME : { + GsfTimestamp const *ts = g_value_get_boxed (value); + gint32 timet_signed = (gint32) ts->timet; + guint64 ft; + + ft = timet_signed + G_GINT64_CONSTANT (11644473600); + ft *= 10000000; + + GSF_LE_SET_GUINT64 (buf, ft); + + return gsf_output_write (state->out, 8, buf); + } + + default: + break; + } + + g_warning ("Ignoring property '%s', how do we export a property of type '%s'", + name ? name : "", + g_type_name (G_TYPE_FUNDAMENTAL (G_VALUE_TYPE (value)))); + return FALSE; +} + +static void +cb_write_dict (char const *name, gpointer id, WritePropState *state) +{ + static guint8 const zero[1] = { '\0' }; + guint8 buf [8]; + unsigned len = strlen (name) + 1; + GSF_LE_SET_GUINT32 (buf, GPOINTER_TO_UINT (id)); + GSF_LE_SET_GUINT32 (buf+4, len+1); + gsf_output_write (state->out, 8, buf); + gsf_output_write (state->out, len, name); + gsf_output_write (state->out, 1, zero); +} + +static gboolean +msole_metadata_write_section (WritePropState *state, gboolean user) +{ + char const *name; + guint8 buf [8]; + GSList *ptr = user ? state->user.props : state->builtin.props; + unsigned count = user ? state->user.count : state->builtin.count; + gsf_off_t len, base = gsf_output_tell (state->out); + GsfMSOleMetaDataProp *offsets; + GsfMSOleMetaDataPropMap const *map; + GsfDocProp const *prop; + gpointer tmp; + unsigned i; + GValue scratch; + + if (user && state->dict == NULL) + return TRUE; + + /* Skip past the size and id/offset pairs */ + if (!gsf_output_seek (state->out, + 4 /* length */ + + 4 /* count */ + + 8 * count /* id/offset pairs */, + G_SEEK_END)) + return FALSE; + + memset (&scratch, 0, sizeof (GValue)); + g_value_init (&scratch, G_TYPE_STRING); + + offsets = g_alloca (sizeof (GsfMSOleMetaDataProp) * count); + + /* 0) codepage */ + offsets[0].id = 1; + offsets[0].offset = gsf_output_tell (state->out); + GSF_LE_SET_GUINT32 (buf, VT_I2); + GSF_LE_SET_GUINT32 (buf+4, state->codepage); + gsf_output_write (state->out, 8, buf); + + /* 1) dictionary */ + if (user) { + offsets[1].id = 0; + offsets[1].offset = gsf_output_tell (state->out); + GSF_LE_SET_GUINT32 (buf, g_hash_table_size (state->dict)); + gsf_output_write (state->out, 4, buf); + g_hash_table_foreach (state->dict, + (GHFunc) cb_write_dict, state); + i = 2; + } else + i = 1; + + offsets[i].offset = gsf_output_tell (state->out); + + /* 2) props */ + for (; ptr != NULL && i < count ; ptr = ptr->next, i++) { + offsets[i].offset = gsf_output_tell (state->out); + prop = ptr->data; + name = gsf_doc_prop_get_name (prop); + if (user) { + tmp = g_hash_table_lookup (state->dict, name); + offsets[i].id = GPOINTER_TO_INT (tmp); + if (offsets[i].id < 2) { + g_warning ("Invalid ID (%d) for custom name '%s'", offsets[i].id, name); + continue; + } + } else { + map = msole_gsf_name_to_prop (name); + if (map == NULL) { + g_warning ("Missing map for built-in property '%s'", name); + continue; + } + offsets[i].id = map->id; + } + + msole_metadata_write_prop (state, name, + gsf_doc_prop_get_val (prop), FALSE); + if (gsf_doc_prop_get_link (prop)) { + i++; + offsets[i].id = offsets[i-1].id | 0x1000000; + offsets[i].offset = gsf_output_tell (state->out); + g_value_set_static_string (&scratch, + gsf_doc_prop_get_link (prop)); + msole_metadata_write_prop (state, NULL, &scratch, FALSE); + } + } + + len = gsf_output_tell (state->out) - base; + gsf_output_seek (state->out, base, G_SEEK_SET); + GSF_LE_SET_GUINT32 (buf, len); + GSF_LE_SET_GUINT32 (buf+4, count); + gsf_output_write (state->out, 8, buf); + for (i = 0 ; i < count ; i++) { + GSF_LE_SET_GUINT32 (buf, offsets[i].id); + GSF_LE_SET_GUINT32 (buf+4, offsets[i].offset - base); + gsf_output_write (state->out, 8, buf); + } + + return gsf_output_seek (state->out, 0, G_SEEK_END); +} + +static void +cb_count_props (char const *name, GsfDocProp *prop, WritePropState *state) +{ + GsfMSOleMetaDataPropMap const *map = msole_gsf_name_to_prop (name); + + /* allocate predefined ids or add it to the dictionary */ + if (map != NULL) { + if (map->id == 0) return; /* dictionary is handled elsewhere */ + if (map->section == (state->doc_not_component ? COMPONENT_PROP : DOC_PROP)) + return; + if (map->id == 1) { /*codepage */ + GValue const *val = gsf_doc_prop_get_val (prop); + if (NULL != val && G_VALUE_HOLDS_INT (val)) + state->codepage = g_value_get_int (val); + return; + } + + d (g_print ("%d) Adding builtin %s'\n", + state->builtin.count, map->gsf_name);); + state->builtin.count += gsf_doc_prop_get_link (prop) ? 2 : 1; + state->builtin.props = g_slist_prepend (state->builtin.props, prop); + } else if (state->doc_not_component) { /* keep user props in the document */ + d (g_print("user defined named '%s' assigned id = %d\n", + name, state->user.count);); + if (NULL == state->dict) + state->dict = g_hash_table_new (g_str_hash, g_str_equal); + g_hash_table_insert (state->dict, + (gpointer) name, GINT_TO_POINTER (state->user.count)); + state->user.count += gsf_doc_prop_get_link (prop) ? 2 : 1; + state->user.props = g_slist_prepend (state->user.props, prop); + } +} + +/** + * gsf_msole_metadata_write : + * @out : #GsfOutput + * @meta_data : #GsfDocMetaData + * @doc_not_component : a kludge to differentiate DocumentSummary from Summary + * + * Returns: %TRUE on success; + **/ +gboolean +gsf_msole_metadata_write (GsfOutput *out, + GsfDocMetaData const *meta_data, + gboolean doc_not_component) +{ + static guint8 const header[] = { + 0xfe, 0xff, /* byte order */ + 0, 0, /* Format */ + 0x04, 0x0a, /* OS : XP == 0xA04 */ + 0x02, 0x00, /* win32 == 2 */ + 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, /* clasid = 0 */ + }; + + gboolean success = FALSE; + guint8 buf [4]; + WritePropState state; + + state.codepage = 1252; + state.out = out; + state.dict = NULL; + state.builtin.count = 1; /* codepage */ + state.user.count = 2; /* codepage and dictionary */ + state.builtin.props = state.user.props = NULL; + state.doc_not_component = doc_not_component; + d (g_print ("================================\nFinding props\n");); + gsf_doc_meta_data_foreach (meta_data, + (GHFunc) cb_count_props, &state); + d (g_print ("Done\n" + "================================\n");); + + /* Write stream header */ + GSF_LE_SET_GUINT32 (buf, (state.dict != NULL) ? 2 : 1); + if (!gsf_output_write (out, sizeof (header), header) || + !gsf_output_write (out, 4, buf)) + goto err; + + /* Write section header(s) */ + GSF_LE_SET_GUINT32 (buf, (state.dict != NULL) ? 0x44 : 0x30); + if (!gsf_output_write (out, 16, + doc_not_component ? document_guid : component_guid) || + !gsf_output_write (out, 4, buf)) + goto err; + if (state.dict != NULL) { + GSF_LE_SET_GUINT32 (buf, 0); + if (!gsf_output_write (out, sizeof (user_guid), user_guid) || + !gsf_output_write (out, 4, buf)) /* bogus position, fix it later */ + goto err; + } + + /* Write section(s) */ + if (!msole_metadata_write_section (&state, FALSE)) + goto err; + if (state.dict != NULL) { + gsf_off_t base = gsf_output_tell (state.out); + GSF_LE_SET_GUINT32 (buf, base); + if (!gsf_output_seek (state.out, 0x40, G_SEEK_SET) || + !gsf_output_write (out, 4, buf) || + !gsf_output_seek (state.out, 0, G_SEEK_END) || + !msole_metadata_write_section (&state, TRUE)) + goto err; + } + + success = TRUE; +err : + g_slist_free (state.builtin.props); + g_slist_free (state.user.props); + if (state.dict != NULL) + g_hash_table_destroy (state.dict); + return success; +} + +static struct { + char const *tag; + guint lid; +} const gsf_msole_language_ids[] = { + { "-none-", 0x0000 }, /* none (language neutral) */ + { "-none-", 0x0400 }, /* none */ + { "af_ZA", 0x0436 }, /* Afrikaans */ + { "am", 0x045e }, /* Amharic */ + { "sq_AL", 0x041c }, /* Albanian */ + { "ar_SA", 0x0401 }, /* Arabic (Saudi) */ + { "ar_IQ", 0x0801 }, /* Arabic (Iraq) */ + { "ar_EG", 0x0c01 }, /* Arabic (Egypt) */ + { "ar_LY", 0x1001 }, /* Arabic (Libya) */ + { "ar_DZ", 0x1401 }, /* Arabic (Algeria) */ + { "ar_MA", 0x1801 }, /* Arabic (Morocco) */ + { "ar_TN", 0x1c01 }, /* Arabic (Tunisia) */ + { "ar_OM", 0x2001 }, /* Arabic (Oman) */ + { "ar_YE", 0x2401 }, /* Arabic (Yemen) */ + { "ar_SY", 0x2801 }, /* Arabic (Syria) */ + { "ar_JO", 0x2c01 }, /* Arabic (Jordan) */ + { "ar_LB", 0x3001 }, /* Arabic (Lebanon) */ + { "ar_KW", 0x3401 }, /* Arabic (Kuwait) */ + { "ar_AE", 0x3801 }, /* Arabic (United Arab Emirates) */ + { "ar_BH", 0x3c01 }, /* Arabic (Bahrain) */ + { "ar_QA", 0x4001 }, /* Arabic (Qatar) */ + { "as", 0x044d }, /* Assamese */ + { "az", 0x042c }, /* Azerbaijani */ + { "hy_AM", 0x042b }, /* Armenian */ + { "az", 0x044c }, /* Azeri (Latin) az_ */ + { "az", 0x082c }, /* Azeri (Cyrillic) az_ */ + { "eu_ES", 0x042d }, /* Basque */ + { "be_BY", 0x0423 }, /* Belarussian */ + { "bn", 0x0445 }, /* Bengali bn_ */ + { "bg_BG", 0x0402 }, /* Bulgarian */ + { "ca_ES", 0x0403 }, /* Catalan */ + { "zh_TW", 0x0404 }, /* Chinese (Taiwan) */ + { "zh_CN", 0x0804 }, /* Chinese (PRC) */ + { "zh_HK", 0x0c04 }, /* Chinese (Hong Kong) */ + { "zh_SG", 0x1004 }, /* Chinese (Singapore) */ + { "ch_MO", 0x1404 }, /* Chinese (Macau SAR) */ + { "hr_HR", 0x041a }, /* Croatian */ + { "cs_CZ", 0x0405 }, /* Czech */ + { "da_DK", 0x0406 }, /* Danish */ + { "div", 0x465 }, /* Divehi div_*/ + { "nl_NL", 0x0413 }, /* Dutch (Netherlands) */ + { "nl_BE", 0x0813 }, /* Dutch (Belgium) */ + { "en_US", 0x0409 }, /* English (USA) */ + { "en_GB", 0x0809 }, /* English (UK) */ + { "en_AU", 0x0c09 }, /* English (Australia) */ + { "en_CA", 0x1009 }, /* English (Canada) */ + { "en_NZ", 0x1409 }, /* English (New Zealand) */ + { "en_IE", 0x1809 }, /* English (Ireland) */ + { "en_ZA", 0x1c09 }, /* English (South Africa) */ + { "en_JM", 0x2009 }, /* English (Jamaica) */ + { "en", 0x2409 }, /* English (Caribbean) */ + { "en_BZ", 0x2809 }, /* English (Belize) */ + { "en_TT", 0x2c09 }, /* English (Trinidad) */ + { "en_ZW", 0x3009 }, /* English (Zimbabwe) */ + { "en_PH", 0x3409 }, /* English (Phillipines) */ + { "et_EE", 0x0425 }, /* Estonian */ + { "fo", 0x0438 }, /* Faeroese fo_ */ + { "fa_IR", 0x0429 }, /* Farsi */ + { "fi_FI", 0x040b }, /* Finnish */ + { "fr_FR", 0x040c }, /* French (France) */ + { "fr_BE", 0x080c }, /* French (Belgium) */ + { "fr_CA", 0x0c0c }, /* French (Canada) */ + { "fr_CH", 0x100c }, /* French (Switzerland) */ + { "fr_LU", 0x140c }, /* French (Luxembourg) */ + { "fr_MC", 0x180c }, /* French (Monaco) */ + { "gl", 0x0456 }, /* Galician gl_ */ + { "ga_IE", 0x083c }, /* Irish Gaelic */ + { "gd_GB", 0x100c }, /* Scottish Gaelic */ + { "ka_GE", 0x0437 }, /* Georgian */ + { "de_DE", 0x0407 }, /* German (Germany) */ + { "de_CH", 0x0807 }, /* German (Switzerland) */ + { "de_AT", 0x0c07 }, /* German (Austria) */ + { "de_LU", 0x1007 }, /* German (Luxembourg) */ + { "de_LI", 0x1407 }, /* German (Liechtenstein) */ + { "el_GR", 0x0408 }, /* Greek */ + { "gu", 0x0447 }, /* Gujarati gu_ */ + { "ha", 0x0468 }, /* Hausa */ + { "he_IL", 0x040d }, /* Hebrew */ + { "hi_IN", 0x0439 }, /* Hindi */ + { "hu_HU", 0x040e }, /* Hungarian */ + { "is_IS", 0x040f }, /* Icelandic */ + { "id_ID", 0x0421 }, /* Indonesian */ + { "iu", 0x045d }, /* Inkutitut */ + { "it_IT", 0x0410 }, /* Italian (Italy) */ + { "it_CH", 0x0810 }, /* Italian (Switzerland) */ + { "ja_JP", 0x0411}, /* Japanese */ + { "kn", 0x044b }, /* Kannada kn_ */ + { "ks", 0x0860 }, /* Kashmiri (India) ks_ */ + { "kk", 0x043f }, /* Kazakh kk_ */ + { "kok", 0x0457 }, /* Konkani kok_ */ + { "ko_KR", 0x0412 }, /* Korean */ + { "ko", 0x0812 }, /* Korean (Johab) ko_ */ + { "kir", 0x0440 }, /* Kyrgyz */ + { "la", 0x0476 }, /* Latin */ + { "lo", 0x0454 }, /* Laothian */ + { "lv_LV", 0x0426 }, /* Latvian */ + { "lt_LT", 0x0427 }, /* Lithuanian */ + { "lt_LT", 0x0827 }, /* Lithuanian (Classic) */ + { "mk", 0x042f }, /* FYRO Macedonian */ + { "my_MY", 0x043e }, /* Malaysian */ + { "my_BN", 0x083e }, /* Malay Brunei Darussalam */ + { "ml", 0x044c }, /* Malayalam ml_ */ + { "mr", 0x044e }, /* Marathi mr_ */ + { "mt", 0x043a }, /* Maltese */ + { "mo", 0x0450 }, /* Mongolian */ + { "ne_NP", 0x0461 }, /* Napali (Nepal) */ + { "ne_IN", 0x0861 }, /* Nepali (India) */ + { "nb_NO", 0x0414 }, /* Norwegian (Bokmaal) */ + { "nn_NO", 0x0814 }, /* Norwegian (Nynorsk) */ + { "or", 0x0448 }, /* Oriya or_ */ + { "om", 0x0472 }, /* Oromo (Afan, Galla) */ + { "pl_PL", 0x0415 }, /* Polish */ + { "pt_BR", 0x0416 }, /* Portuguese (Brazil) */ + { "pt_PT", 0x0816 }, /* Portuguese (Portugal) */ + { "pa", 0x0446 }, /* Punjabi pa_ */ + { "ps", 0x0463 }, /* Pashto (Pushto) */ + { "rm", 0x0417 }, /* Rhaeto_Romanic rm_ */ + { "ro_RO", 0x0418 }, /* Romanian */ + { "ro_MD", 0x0818 }, /* Romanian (Moldova) */ + { "ru_RU", 0x0419 }, /* Russian */ + { "ru_MD", 0x0819 }, /* Russian (Moldova) */ + { "se", 0x043b }, /* Sami (Lappish) se_ */ + { "sa", 0x044f }, /* Sanskrit sa_ */ + { "sr", 0x0c1a }, /* Serbian (Cyrillic) sr_ */ + { "sr", 0x081a }, /* Serbian (Latin) sr_ */ + { "sd", 0x0459 }, /* Sindhi sd_ */ + { "sk_SK", 0x041b }, /* Slovak */ + { "sl_SI", 0x0424 }, /* Slovenian */ + { "wen", 0x042e }, /* Sorbian wen_ */ + { "so", 0x0477 }, /* Somali */ + { "es_ES", 0x040a }, /* Spanish (Spain, Traditional) */ + { "es_MX", 0x080a }, /* Spanish (Mexico) */ + { "es_ES", 0x0c0a }, /* Spanish (Modern) */ + { "es_GT", 0x100a }, /* Spanish (Guatemala) */ + { "es_CR", 0x140a }, /* Spanish (Costa Rica) */ + { "es_PA", 0x180a }, /* Spanish (Panama) */ + { "es_DO", 0x1c0a }, /* Spanish (Dominican Republic) */ + { "es_VE", 0x200a }, /* Spanish (Venezuela) */ + { "es_CO", 0x240a }, /* Spanish (Colombia) */ + { "es_PE", 0x280a }, /* Spanish (Peru) */ + { "es_AR", 0x2c0a }, /* Spanish (Argentina) */ + { "es_EC", 0x300a }, /* Spanish (Ecuador) */ + { "es_CL", 0x340a }, /* Spanish (Chile) */ + { "es_UY", 0x380a }, /* Spanish (Uruguay) */ + { "es_PY", 0x3c0a }, /* Spanish (Paraguay) */ + { "es_BO", 0x400a }, /* Spanish (Bolivia) */ + { "es_SV", 0x440a }, /* Spanish (El Salvador) */ + { "es_HN", 0x480a }, /* Spanish (Honduras) */ + { "es_NI", 0x4c0a }, /* Spanish (Nicaragua) */ + { "es_PR", 0x500a }, /* Spanish (Puerto Rico) */ + { "sx", 0x0430 }, /* Sutu */ + { "sw", 0x0441 }, /* Swahili (Kiswahili/Kenya) */ + { "sv_SE", 0x041d }, /* Swedish */ + { "sv_FI", 0x081d }, /* Swedish (Finland) */ + { "ta", 0x0449 }, /* Tamil ta_ */ + { "tt", 0x0444 }, /* Tatar (Tatarstan) tt_ */ + { "te", 0x044a }, /* Telugu te_ */ + { "th_TH", 0x041e }, /* Thai */ + { "ts", 0x0431 }, /* Tsonga ts_ */ + { "tn", 0x0432 }, /* Tswana tn_ */ + { "tr_TR", 0x041f }, /* Turkish */ + { "tl", 0x0464 }, /* Tagalog */ + { "tg", 0x0428 }, /* Tajik */ + { "bo", 0x0451 }, /* Tibetan */ + { "ti", 0x0473 }, /* Tigrinya */ + { "uk_UA", 0x0422 }, /* Ukrainian */ + { "ur_PK", 0x0420 }, /* Urdu (Pakistan) */ + { "ur_IN", 0x0820 }, /* Urdu (India) */ + { "uz", 0x0443 }, /* Uzbek (Latin) uz_ */ + { "uz", 0x0843 }, /* Uzbek (Cyrillic) uz_ */ + { "ven", 0x0433 }, /* Venda ven_ */ + { "vi_VN", 0x042a }, /* Vietnamese */ + { "cy_GB", 0x0452 }, /* Welsh */ + { "xh", 0x0434 }, /* Xhosa xh */ + { "yi", 0x043d }, /* Yiddish yi_ */ + { "yo", 0x046a }, /* Yoruba */ + { "zu", 0x0435 }, /* Zulu zu_ */ + { "en_US", 0x0800 } /* Default */ +}; + +/** + * gsf_msole_lid_for_language + * @lang : + * + * Returns: the LID (Language Identifier) for the input language. + * If lang is %null, return 0x0400 ("-none-"), and not 0x0000 ("no proofing") + **/ +guint +gsf_msole_lid_for_language (char const *lang) +{ + guint i = 0 ; + size_t len; + + if (lang == NULL) + return 0x0400; /* return -none- */ + + /* Allow lang to match as a prefix (eg fr == fr_FR@euro) */ + len = strlen (lang); + for (i = 0 ; i < G_N_ELEMENTS(gsf_msole_language_ids); i++) + if (!strncmp (lang, gsf_msole_language_ids[i].tag, len)) + return gsf_msole_language_ids[i].lid; + + return 0x0400 ; /* return -none- */ +} + +/** + * gsf_msole_language_for_lid : + * @lid : + * + * Returns: the xx_YY style string (can be just xx or xxx) for the given LID. + * Return value must not be freed. If the LID is not found, is set to + * 0x0400, or is set to 0x0000, will return "-none-" + **/ +char const * +gsf_msole_language_for_lid (guint lid) +{ + guint i = 0 ; + + for (i = 0 ; i < G_N_ELEMENTS(gsf_msole_language_ids); i++) + if (gsf_msole_language_ids[i].lid == lid) + return gsf_msole_language_ids[i].tag; + + return "-none-"; /* default */ +} + +/** + * gsf_msole_locale_to_lid : + * + * Covert the the codepage into an applicable LID + **/ +guint +gsf_msole_codepage_to_lid (int codepage) +{ + switch (codepage) { + case 77: /* MAC_CHARSET */ + return 0xFFF; /* This number is a hack */ + case 128: /* SHIFTJIS_CHARSET */ + return 0x411; /* Japanese */ + case 129: /* HANGEUL_CHARSET */ + return 0x412; /* Korean */ + case 130: /* JOHAB_CHARSET */ + return 0x812; /* Korean (Johab) */ + case 134: /* GB2312_CHARSET - Chinese Simplified */ + return 0x804; /* China PRC - And others!! */ + case 136: /* CHINESEBIG5_CHARSET - Chinese Traditional */ + return 0x404; /* Taiwan - And others!! */ + case 161: /* GREEK_CHARSET */ + return 0x408; /* Greek */ + case 162: /* TURKISH_CHARSET */ + return 0x41f; /* Turkish */ + case 163: /* VIETNAMESE_CHARSET */ + return 0x42a; /* Vietnamese */ + case 177: /* HEBREW_CHARSET */ + return 0x40d; /* Hebrew */ + case 178: /* ARABIC_CHARSET */ + return 0x01; /* Arabic */ + case 186: /* BALTIC_CHARSET */ + return 0x425; /* Estonian - And others!! */ + case 204: /* RUSSIAN_CHARSET */ + return 0x419; /* Russian - And others!! */ + case 222: /* THAI_CHARSET */ + return 0x41e; /* Thai */ + case 238: /* EASTEUROPE_CHARSET */ + return 0x405; /* Czech - And many others!! */ + } + + /* default */ + return 0x0; +} + +/** + * gsf_msole_lid_to_codepage + * @lid : + * + * Returns: our best guess at the codepage for the given language id + **/ +int +gsf_msole_lid_to_codepage (guint lid) +{ + if (lid == 0x0FFF) /* Macintosh Hack */ + return 0x0FFF; + + switch (lid & 0xff) { + case 0x01: /* Arabic */ + return 1256; + case 0x02: /* Bulgarian */ + return 1251; + case 0x03: /* Catalan */ + return 1252; + case 0x04: /* Chinese */ + switch (lid) { + case 0x1004: /* Chinese (Singapore) */ + case 0x0404: /* Chinese (Taiwan) */ + case 0x1404: /* Chinese (Macau SAR) */ + case 0x0c04: /* Chinese (Hong Kong SAR, PRC) */ + return 950; + + case 0x0804: /* Chinese (PRC) */ + return 936; + default : + break; + } + break; + case 0x05: /* Czech */ + return 1250; + case 0x06: /* Danish */ + return 1252; + case 0x07: /* German */ + return 1252; + case 0x08: /* Greek */ + return 1253; + case 0x09: /* English */ + return 1252; + case 0x0a: /* Spanish */ + return 1252; + case 0x0b: /* Finnish */ + return 1252; + case 0x0c: /* French */ + return 1252; + case 0x0d: /* Hebrew */ + return 1255; + case 0x0e: /* Hungarian */ + return 1250; + case 0x0f: /* Icelandic */ + return 1252; + case 0x10: /* Italian */ + return 1252; + case 0x11: /* Japanese */ + return 932; + case 0x12: /* Korean */ + switch (lid) { + case 0x0812: /* Korean (Johab) */ + return 1361; + case 0x0412: /* Korean */ + return 949; + default : + break; + } + break; + case 0x13: /* Dutch */ + return 1252; + case 0x14: /* Norwegian */ + return 1252; + case 0x15: /* Polish */ + return 1250; + case 0x16: /* Portuguese */ + return 1252; + case 0x17: /* Rhaeto-Romanic */ + return 1252; + case 0x18: /* Romanian */ + return 1250; + case 0x19: /* Russian */ + return 1251; + case 0x1a: /* Serbian, Croatian, (Bosnian?) */ + switch (lid) { + case 0x041a: /* Croatian */ + return 1252; + case 0x0c1a: /* Serbian (Cyrillic) */ + return 1251; + case 0x081a: /* Serbian (Latin) */ + return 1252; + default : + break; + } + break; + case 0x1b: /* Slovak */ + return 1250; + case 0x1c: /* Albanian */ + return 1251; + case 0x1d: /* Swedish */ + return 1252; + case 0x1e: /* Thai */ + return 874; + case 0x1f: /* Turkish */ + return 1254; + case 0x20: /* Urdu. This is Unicode only. */ + return 0; + case 0x21: /* Bahasa Indonesian */ + return 1252; + case 0x22: /* Ukrainian */ + return 1251; + case 0x23: /* Byelorussian / Belarusian */ + return 1251; + case 0x24: /* Slovenian */ + return 1250; + case 0x25: /* Estonian */ + return 1257; + case 0x26: /* Latvian */ + return 1257; + case 0x27: /* Lithuanian */ + return 1257; + case 0x29: /* Farsi / Persian. This is Unicode only. */ + return 0; + case 0x2a: /* Vietnamese */ + return 1258; + case 0x2b: /* Windows 2000: Armenian. This is Unicode only. */ + return 0; + case 0x2c: /* Azeri */ + switch (lid) { + case 0x082c: /* Azeri (Cyrillic) */ + return 1251; + default : + break; + } + break; + case 0x2d: /* Basque */ + return 1252; + case 0x2f: /* Macedonian */ + return 1251; + case 0x36: /* Afrikaans */ + return 1252; + case 0x37: /* Windows 2000: Georgian. This is Unicode only. */ + return 0; + case 0x38: /* Faeroese */ + return 1252; + case 0x39: /* Windows 2000: Hindi. This is Unicode only. */ + return 0; + case 0x3E: /* Malaysian / Malay */ + return 1252; + case 0x41: /* Swahili */ + return 1252; + case 0x43: /* Uzbek */ + switch (lid) { + case 0x0843: /* Uzbek (Cyrillic) */ + return 1251; + default : + break; + } + break; + case 0x45: /* Windows 2000: Bengali. This is Unicode only. */ + case 0x46: /* Windows 2000: Punjabi. This is Unicode only. */ + case 0x47: /* Windows 2000: Gujarati. This is Unicode only. */ + case 0x48: /* Windows 2000: Oriya. This is Unicode only. */ + case 0x49: /* Windows 2000: Tamil. This is Unicode only. */ + case 0x4a: /* Windows 2000: Telugu. This is Unicode only. */ + case 0x4b: /* Windows 2000: Kannada. This is Unicode only. */ + case 0x4c: /* Windows 2000: Malayalam. This is Unicode only. */ + case 0x4d: /* Windows 2000: Assamese. This is Unicode only. */ + case 0x4e: /* Windows 2000: Marathi. This is Unicode only. */ + case 0x4f: /* Windows 2000: Sanskrit. This is Unicode only. */ + case 0x55: /* Myanmar / Burmese. This is Unicode only. */ + case 0x57: /* Windows 2000: Konkani. This is Unicode only. */ + case 0x61: /* Windows 2000: Nepali (India). This is Unicode only. */ + return 0; + +#if 0 + /****************************************************************** + * Below this line is untested, unproven, and are just guesses. * + * Insert above and use at your own risk * + ******************************************************************/ + + case 0x042c: /* Azeri (Latin) */ + case 0x0443: /* Uzbek (Latin) */ + case 0x30: /* Sutu */ + return 1252; /* UNKNOWN, believed to be CP1252 */ + + case 0x3f: /* Kazakh */ + return 1251; /* JUST UNKNOWN, probably CP1251 */ + + case 0x44: /* Tatar */ + case 0x58: /* Manipuri */ + case 0x59: /* Sindhi */ + case 0x60: /* Kashmiri (India) */ + return 0; /* UNKNOWN, believed to be Unicode only */ +#endif + }; + + /* This is just a guess, but it will be a frequent guess */ + return 1252; +} + +/** + * gsf_msole_lid_to_codepage_str + * @lid : + * + * Returns: the Iconv codepage string for the given LID. + * Return value must be g_free ()'d + **/ +gchar * +gsf_msole_lid_to_codepage_str (guint lid) +{ + guint cp = 0; + + if (lid == 0x0FFF) /* Macintosh Hack */ + return g_strdup ("MACINTOSH"); + + cp = gsf_msole_lid_to_codepage (lid); + return g_strdup_printf ("CP%d", cp); +} + +/** + * gsf_msole_iconv_win_codepage : + * + * Returns: our best guess at the applicable windows code page based on an + * environment variable or the current locale. + **/ +int +gsf_msole_iconv_win_codepage (void) +{ + char *lang; + + if ((lang = getenv("WINDOWS_LANGUAGE")) == NULL) { + char const *locale = setlocale (LC_CTYPE, NULL); + if (locale != NULL) { + char const *lang_sep = strchr (locale, '.'); + if (lang_sep) + lang = g_strndup (locale, (unsigned)(lang_sep - locale)); + else + lang = g_strdup (locale); /* simplifies exit */ + } + } + + if (lang != NULL) { + guint lid = gsf_msole_lid_for_language (lang); + g_free (lang); + return gsf_msole_lid_to_codepage (lid); + } + return 1252; /* default ansi */ +} + +static GSList * +gsf_msole_iconv_get_codepage_string_list (int codepage) +{ + GSList *cp_list = NULL; + + switch (codepage) { + case 1200: + cp_list = g_slist_prepend (cp_list, g_strdup ("UTF-16LE")); + break; + case 1201: + cp_list = g_slist_prepend (cp_list, g_strdup ("UTF-16BE")); + break; + case 0x8000: + case 10000: + cp_list = g_slist_prepend (cp_list, g_strdup ("MACROMAN")); + cp_list = g_slist_prepend (cp_list, g_strdup ("MACINTOSH")); + break; + case -535: + case 65001: + cp_list = g_slist_prepend (cp_list, g_strdup ("UTF-8")); + break; + case 0x8001: + /* according to OOo docs 8001 is a synonym CP1252 */ + codepage = 1252; + /* fallthrough */ + + default: + cp_list = g_slist_prepend (cp_list, g_strdup_printf ("CP%u", codepage)); + } + + return cp_list; +} + +/** + * gsf_msole_iconv_open_codepage_for_import : + * @to: + * @codepage : + * + * Returns: an iconv converter for @codepage -> utf8. + **/ +GIConv +gsf_msole_iconv_open_codepage_for_import (char const *to, int codepage) +{ + GIConv iconv_handle = (GIConv)(-1); + gchar *codepage_str; + GSList *codepage_list, *cp; + g_return_val_if_fail (to != NULL, (GIConv)(-1)); + + cp = codepage_list = gsf_msole_iconv_get_codepage_string_list (codepage); + while (cp) { + codepage_str = cp->data; + if (iconv_handle == (GIConv)(-1)) + iconv_handle = g_iconv_open (to, codepage_str); + g_free (codepage_str); + cp = cp->next; + } + g_slist_free (codepage_list); + + if (iconv_handle == (GIConv)(-1)) + g_warning ("Unable to open an iconv handle from codepage %d -> %s", + codepage, to); + return iconv_handle; +} + +/** + * gsf_msole_iconv_open_for_import : + * @codepage : + * + * Returns: an iconv converter for single byte encodings @codepage -> utf8. + * Attempt to handle the semantics of a specification for multibyte encodings + * since this is only supposed to be used for single bytes. + **/ +GIConv +gsf_msole_iconv_open_for_import (int codepage) +{ + return gsf_msole_iconv_open_codepage_for_import ("UTF-8", codepage); +} + +/** + * gsf_msole_iconv_open_codepages_for_export : + * @codepage_to : + * @from : + * + * Returns: an iconv converter to go from utf8 -> to our best guess at a useful + * windows codepage. + **/ +GIConv +gsf_msole_iconv_open_codepages_for_export (int codepage_to, char const *from) +{ + GIConv iconv_handle = (GIConv)(-1); + gchar *codepage_str; + GSList *codepage_list, *cp; + g_return_val_if_fail (from != NULL, (GIConv)(-1)); + + cp = codepage_list = gsf_msole_iconv_get_codepage_string_list (codepage_to); + while (cp) { + codepage_str = cp->data; + if (iconv_handle == (GIConv)(-1)) + iconv_handle = g_iconv_open (codepage_str, from); + g_free (codepage_str); + cp = cp->next; + } + g_slist_free (codepage_list); + + if (iconv_handle == (GIConv)(-1)) + g_warning ("Unable to open an iconv handle from %s -> codepage %u", + from, codepage_to); + return iconv_handle; +} + +/** + * gsf_msole_iconv_open_codepage_for_export : + * @codepage_to: + * + * Returns: an iconv converter to go from utf8 -> to our best guess at a useful + * windows codepage. + **/ +GIConv +gsf_msole_iconv_open_codepage_for_export (int codepage_to) +{ + return gsf_msole_iconv_open_codepages_for_export (codepage_to, "UTF-8"); +} + +/** + * gsf_msole_iconv_open_for_export : + * + * Returns: an iconv convert to go from utf8 -> to our best guess at a useful + * windows codepage. + **/ +GIConv +gsf_msole_iconv_open_for_export (void) +{ + return gsf_msole_iconv_open_codepage_for_export (gsf_msole_iconv_win_codepage ()); +} + +#define VBA_COMPRESSION_WINDOW 4096 + +/** + * gsf_msole_inflate: + * @input: stream to read from + * @offset: offset into it for start byte of compresse stream + * + * Decompresses an LZ compressed stream. + * + * Return value: A GByteArray that the caller is responsible for freeing + **/ +GByteArray * +gsf_msole_inflate (GsfInput *input, gsf_off_t offset) +{ + GByteArray *res; + unsigned i, win_pos, pos = 0; + unsigned mask, shift, distance; + guint8 flag, buffer [VBA_COMPRESSION_WINDOW]; + guint8 const *tmp; + guint16 token, len; + gboolean clean = TRUE; + + if (gsf_input_seek (input, offset, G_SEEK_SET)) + return NULL; + + res = g_byte_array_new (); + + /* explaination from libole2/ms-ole-vba.c */ + /* The first byte is a flag byte. Each bit in this byte + * determines what the next byte is. If the bit is zero, + * the next byte is a character. Otherwise the next two + * bytes contain the number of characters to copy from the + * umcompresed buffer and where to copy them from (offset, + * length). + */ + while (NULL != gsf_input_read (input, 1, &flag)) + for (mask = 1; mask < 0x100 ; mask <<= 1) + if (flag & mask) { + if (NULL == (tmp = gsf_input_read (input, 2, NULL))) + break; + win_pos = pos % VBA_COMPRESSION_WINDOW; + if (win_pos <= 0x80) { + if (win_pos <= 0x20) + shift = (win_pos <= 0x10) ? 12 : 11; + else + shift = (win_pos <= 0x40) ? 10 : 9; + } else { + if (win_pos <= 0x200) + shift = (win_pos <= 0x100) ? 8 : 7; + else if (win_pos <= 0x800) + shift = (win_pos <= 0x400) ? 6 : 5; + else + shift = 4; + } + + token = GSF_LE_GET_GUINT16 (tmp); + len = (token & ((1 << shift) - 1)) + 3; + distance = token >> shift; + clean = TRUE; +/* fprintf (stderr, "Shift %d, token len %d, distance %d bytes %.2x %.2x\n", + shift, len, distance, (token & 0xff), (token >> 8)); */ + + for (i = 0; i < len; i++) { + unsigned srcpos = (pos - distance - 1) % VBA_COMPRESSION_WINDOW; + guint8 c = buffer [srcpos]; + buffer [pos++ % VBA_COMPRESSION_WINDOW] = c; + } + } else { + if ((pos != 0) && ((pos % VBA_COMPRESSION_WINDOW) == 0) && clean) { + (void) gsf_input_read (input, 2, NULL); + clean = FALSE; + g_byte_array_append (res, buffer, VBA_COMPRESSION_WINDOW); + break; + } + if (NULL != gsf_input_read (input, 1, buffer + (pos % VBA_COMPRESSION_WINDOW))) + pos++; + clean = TRUE; + } + + if (pos % VBA_COMPRESSION_WINDOW) + g_byte_array_append (res, buffer, pos % VBA_COMPRESSION_WINDOW); + return res; +} diff --git a/gsf/gsf-msole-utils.h b/gsf/gsf-msole-utils.h new file mode 100644 index 0000000..b3e6940 --- /dev/null +++ b/gsf/gsf-msole-utils.h @@ -0,0 +1,54 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-msole-utils.h: various tools for handling MS OLE files + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_MSOLE_UTILS_H +#define GSF_MSOLE_UTILS_H + +#include +#include + +G_BEGIN_DECLS + +GError *gsf_msole_metadata_read (GsfInput *in, + GsfDocMetaData *accum); +gboolean gsf_msole_metadata_write (GsfOutput *out, + GsfDocMetaData const *meta_data, + gboolean doc_not_component); + +guint gsf_msole_lid_for_language (char const *lang); +guint gsf_msole_codepage_to_lid (int codepage); +int gsf_msole_lid_to_codepage (guint lid); +gchar *gsf_msole_lid_to_codepage_str (guint lid); +char const *gsf_msole_language_for_lid (guint lid); + +int gsf_msole_iconv_win_codepage (void) ; +GIConv gsf_msole_iconv_open_for_import (int codepage) ; +GIConv gsf_msole_iconv_open_for_export (void) ; + +GIConv gsf_msole_iconv_open_codepage_for_import (char const *to, int codepage); +GIConv gsf_msole_iconv_open_codepages_for_export (int codepage_to, char const *from); +GIConv gsf_msole_iconv_open_codepage_for_export (int codepage_to); + +GByteArray *gsf_msole_inflate (GsfInput *input, gsf_off_t offset); + +G_END_DECLS + +#endif /* GSF_MSOLE_UTILS_H */ diff --git a/gsf/gsf-open-pkg-utils.c b/gsf/gsf-open-pkg-utils.c new file mode 100644 index 0000000..3db2426 --- /dev/null +++ b/gsf/gsf-open-pkg-utils.c @@ -0,0 +1,897 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-open-pkg-utils.c: Utilities for handling Open Package zip files + * from MS Office 2007 or XPS. + * + * Copyright (C) 2006-2007 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include + +#include +#include + +#undef G_LOG_DOMAIN +#define G_LOG_DOMAIN "libgsf:open_pkg" + +enum { + OPEN_PKG_NS_REL +}; + +static GsfXMLInNS const open_pkg_ns[] = { + GSF_XML_IN_NS (OPEN_PKG_NS_REL, "http://schemas.openxmlformats.org/package/2006/relationships"), + GSF_XML_IN_NS_END +}; + +struct _GsfOpenPkgRel { + char *id, *type, *target; + gboolean is_extern; +}; + +struct _GsfOpenPkgRels { + GHashTable *by_id; + GHashTable *by_type; +}; + +static void +gsf_open_pkg_rels_free (GsfOpenPkgRels *rels) +{ + g_hash_table_destroy (rels->by_id); + g_hash_table_destroy (rels->by_type); + g_free (rels); +} + +static void +gsf_open_pkg_rel_free (GsfOpenPkgRel *rel) +{ + g_free (rel->id); rel->id = NULL; + g_free (rel->type); rel->type = NULL; + g_free (rel->target); rel->target = NULL; + g_free (rel); +} + +static void +open_pkg_rel_begin (GsfXMLIn *xin, xmlChar const **attrs) +{ + GsfOpenPkgRels *rels = xin->user_state; + GsfOpenPkgRel *rel; + xmlChar const *id = NULL; + xmlChar const *type = NULL; + xmlChar const *target = NULL; + gboolean is_extern = FALSE; + + for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2) + if (0 == strcmp (attrs[0], "Id")) + id = attrs[1]; + else if (0 == strcmp (attrs[0], "Type")) + type = attrs[1]; + else if (0 == strcmp (attrs[0], "Target")) + target = attrs[1]; + else if (0 == strcmp (attrs[0], "TargetMode")) + is_extern = 0 == strcmp (attrs[1], "External"); + + g_return_if_fail (id != NULL); + g_return_if_fail (type != NULL); + g_return_if_fail (target != NULL); + + rel = g_new0 (GsfOpenPkgRel, 1); + rel->id = g_strdup (id); + rel->type = g_strdup (type); + rel->target = g_strdup (target); + rel->is_extern = is_extern; + + g_hash_table_replace (rels->by_id, rel->id, rel); + g_hash_table_replace (rels->by_type, rel->type, rel); +} + +static GsfXMLInNode const open_pkg_rel_dtd[] = { +GSF_XML_IN_NODE_FULL (START, START, -1, NULL, GSF_XML_NO_CONTENT, FALSE, TRUE, NULL, NULL, 0), +GSF_XML_IN_NODE_FULL (START, RELS, OPEN_PKG_NS_REL, "Relationships", GSF_XML_NO_CONTENT, FALSE, TRUE, NULL, NULL, 0), + GSF_XML_IN_NODE (RELS, REL, OPEN_PKG_NS_REL, "Relationship", GSF_XML_NO_CONTENT, open_pkg_rel_begin, NULL), + +GSF_XML_IN_NODE_END +}; + +/** + * gsf_open_pkg_rel_is_extern : + * @rel : #GsfOpenPkgRel + * + * Returns: %TRUE if @rel has mode 'External' + **/ +gboolean +gsf_open_pkg_rel_is_extern (GsfOpenPkgRel const *rel) +{ + g_return_val_if_fail (rel != NULL, FALSE); + return rel->is_extern; +} + +/** + * gsf_open_pkg_rel_get_target : + * @rel : #GsfOpenPkgRel + * + * Returns: const pointer to @rel's target. + **/ +char const * +gsf_open_pkg_rel_get_target (GsfOpenPkgRel const *rel) +{ + g_return_val_if_fail (rel != NULL, NULL); + return rel->target; +} + +/** + * gsf_open_pkg_rel_get_type : + * @rel : #GsfOpenPkgRel + * + * Returns: const pointer to @rel's type. + **/ +char const * +gsf_open_pkg_rel_get_type (GsfOpenPkgRel const *rel) +{ + g_return_val_if_fail (rel != NULL, NULL); + return rel->type; +} + +static GsfOpenPkgRels * +gsf_open_pkg_get_rels (GsfInput *opkg) +{ + GsfOpenPkgRels *rels = NULL; + + g_return_val_if_fail (opkg != NULL, NULL); + + if (NULL == (rels = g_object_get_data (G_OBJECT (opkg), "OpenPkgRels"))) { + char const *part_name = gsf_input_name (opkg); + GsfXMLInDoc *rel_doc; + GsfInput *rel_stream; + + if (NULL != part_name) { + GsfInfile *container = gsf_input_container (opkg); + char *rel_name; + + g_return_val_if_fail (container != NULL, NULL); + + rel_name = g_strconcat (part_name, ".rels", NULL); + rel_stream = gsf_infile_child_by_vname (container, "_rels", rel_name, NULL); + g_free (rel_name); + } else /* the root */ + rel_stream = gsf_infile_child_by_vname (GSF_INFILE (opkg), "_rels", ".rels", NULL); + + if (NULL != rel_stream) { + rels = g_new (GsfOpenPkgRels, 1); + rels->by_id = g_hash_table_new_full (g_str_hash, g_str_equal, + NULL, (GDestroyNotify)gsf_open_pkg_rel_free); + rels->by_type = g_hash_table_new (g_str_hash, g_str_equal); + + rel_doc = gsf_xml_in_doc_new (open_pkg_rel_dtd, open_pkg_ns); + (void) gsf_xml_in_doc_parse (rel_doc, rel_stream, rels); + + gsf_xml_in_doc_free (rel_doc); + g_object_unref (G_OBJECT (rel_stream)); + } + + g_object_set_data_full (G_OBJECT (opkg), "OpenPkgRels", rels, + (GDestroyNotify) gsf_open_pkg_rels_free); + } + + return rels; +} + +/** + * gsf_open_pkg_open_rel : + * @opkg : #GsfInput + * @rel : #GsfOpenPkgRel + * @err : #GError. + * + * Returns: a new #GsfInput which the called needs to unref, or %NULL and sets @err + **/ +GsfInput * +gsf_open_pkg_open_rel (GsfInput *opkg, GsfOpenPkgRel const *rel, + G_GNUC_UNUSED GError **err /* just in case we need it one day */ ) +{ + GsfInput *res = NULL; + GsfInfile *parent, *prev_parent; + gchar **elems; + unsigned i; + + g_return_val_if_fail (rel != NULL, NULL); + g_return_val_if_fail (opkg != NULL, NULL); + + /* References from the root use children of opkg + * References from a child are relative to siblings of opkg */ + parent = gsf_input_name (opkg) + ? gsf_input_container (opkg) : GSF_INFILE (opkg); + g_object_ref (parent); + + elems = g_strsplit (rel->target, "/", 0); + for (i = 0 ; elems[i] && NULL != parent ; i++) { + if (0 == strcmp (elems[i], ".") || '\0' == *elems[i]) + continue; /* ignore '.' and empty */ + + prev_parent = parent; + if (0 == strcmp (elems[i], "..")) { + parent = gsf_input_container (GSF_INPUT (parent)); + res = NULL; /* only return newly created children */ + if (NULL != parent) { + /* check for attempt to gain access outside the zip file */ + if (G_OBJECT_TYPE (parent) == G_OBJECT_TYPE (prev_parent)) + g_object_ref (G_OBJECT (parent)); + else + parent = NULL; + } + } else { + res = gsf_infile_child_by_name (parent, elems[i]); + if (NULL != elems[i+1]) { + g_return_val_if_fail (GSF_IS_INFILE (res), NULL); + parent = GSF_INFILE (res); + } + } + g_object_unref (G_OBJECT (prev_parent)); + } + g_strfreev (elems); + + return res; +} + +/** + * gsf_open_pkg_lookup_rel_by_type : + * @opkg : #GsfInput + * @type : target + * + * New in 1.14.6 + * + * Finds _a_ relation of @opkg with @type (no order is guaranteed) + * + * Returns: A #GsfOpenPkgRel or %NULL + **/ +GsfOpenPkgRel * +gsf_open_pkg_lookup_rel_by_type (GsfInput *opkg, char const *type) +{ + GsfOpenPkgRels *rels = gsf_open_pkg_get_rels (opkg); + return rels ? g_hash_table_lookup (rels->by_type, type) : NULL; +} + +/** + * gsf_open_pkg_open_rel_by_id : + * @opkg : #GsfInput + * @id : + * + * New in 1.14.6 + * + * Finds @opkg's relation with @id + * + * Returns: A #GsfOpenPkgRel or %NULL + **/ +GsfOpenPkgRel * +gsf_open_pkg_lookup_rel_by_id (GsfInput *opkg, char const *id) +{ + GsfOpenPkgRels *rels = gsf_open_pkg_get_rels (opkg); + return rels ? g_hash_table_lookup (rels->by_id, id) : NULL; +} + +struct pkg_iter_data { + GsfInput *opkg; + GsfOpenPkgIter func; + gpointer user_data; +}; + +static void +cb_foreach_rel (G_GNUC_UNUSED gpointer id, + GsfOpenPkgRel *rel, + struct pkg_iter_data *dat) +{ + (*dat->func) (dat->opkg, rel, dat->user_data); +} + +/** + * gsf_open_pkg_foreach_rel: + * @opkg : #GsfInput + * @func : #GsfOpenPkgIter + * @user_data : gpointer + * + * New in 1.14.9 + * + * Walks each relationship associated with @opkg and calls @func with @user_data. + **/ +void +gsf_open_pkg_foreach_rel (GsfInput *opkg, + GsfOpenPkgIter func, + gpointer user_data) +{ + GsfOpenPkgRels *rels = gsf_open_pkg_get_rels (opkg); + struct pkg_iter_data dat; + + if (NULL != rels) { + dat.opkg = opkg; + dat.func = func; + dat.user_data = user_data; + g_hash_table_foreach (rels->by_id, (GHFunc)&cb_foreach_rel, &dat); + } +} + +/** + * gsf_open_pkg_open_rel_by_id : + * @opkg : #GsfInput + * @id : target id + * @err : optionally %NULL + * + * New in 1.14.7 + * + * Open @opkg's relation @id + * + * Returns: A new GsfInput or %NULL, and sets @err if possible. + **/ +GsfInput * +gsf_open_pkg_open_rel_by_id (GsfInput *opkg, char const *id, GError **err) +{ + GsfOpenPkgRel *rel = NULL; + GsfOpenPkgRels *rels = gsf_open_pkg_get_rels (opkg); + + if (NULL != rels && NULL != (rel = g_hash_table_lookup (rels->by_id, id))) + return gsf_open_pkg_open_rel (opkg, rel, err); + if (err) + *err = g_error_new (gsf_input_error_id(), gsf_open_pkg_error_id (), + _("Unable to find part id='%s' for '%s'"), + id, gsf_input_name (opkg) ); + return NULL; +} + +/** + * gsf_open_pkg_open_rel_by_type : + * @opkg : #GsfInput + * @type : target type + * @err : optionally %NULL + * + * New in 1.14.9 + * + * Open one of @opkg's relationships with type=@type. + * + * Returns: A new GsfInput or %NULL, and sets @err if possible. + **/ +GsfInput * +gsf_open_pkg_open_rel_by_type (GsfInput *opkg, char const *type, GError **err) +{ + GsfOpenPkgRel *rel = NULL; + GsfOpenPkgRels *rels = gsf_open_pkg_get_rels (opkg); + + if (NULL != rels && NULL != (rel = g_hash_table_lookup (rels->by_type, type))) + return gsf_open_pkg_open_rel (opkg, rel, err); + + if (err) + *err = g_error_new (gsf_input_error_id(), gsf_open_pkg_error_id (), + _("Unable to find part with type='%s' for '%s'"), + type, gsf_input_name (opkg) ); + return NULL; +} + +/** + * gsf_open_pkg_parse_rel_by_id : + * @xin : #GsfXMLIn + * @id : target id + * @dtd : #GsfXMLInNode + * @ns : #GsfXMLInNS + * + * Convenience function to parse a related part. + * + * Returns: NULL on success or a GError which callerss need to free on failure. + **/ +GError * +gsf_open_pkg_parse_rel_by_id (GsfXMLIn *xin, char const *id, + GsfXMLInNode const *dtd, + GsfXMLInNS const *ns) +{ + GError *res = NULL; + GsfInput *cur_stream, *part_stream; + + g_return_val_if_fail (xin != NULL, NULL); + + cur_stream = gsf_xml_in_get_input (xin); + + if (NULL == id) + return g_error_new (gsf_input_error_id(), gsf_open_pkg_error_id (), + _("Missing id for part in '%s'"), + gsf_input_name (cur_stream) ); + + part_stream = gsf_open_pkg_open_rel_by_id (cur_stream, id, &res); + if (NULL != part_stream) { + GsfXMLInDoc *doc = gsf_xml_in_doc_new (dtd, ns); + + if (!gsf_xml_in_doc_parse (doc, part_stream, xin->user_state)) + res = g_error_new (gsf_input_error_id(), gsf_open_pkg_error_id (), + _("Part '%s' in '%s' from '%s' is corrupt!"), + id, + gsf_input_name (part_stream), + gsf_input_name (cur_stream) ); + gsf_xml_in_doc_free (doc); + + g_object_unref (G_OBJECT (part_stream)); + } + return res; +} + +/* DEPRECATED in 1.14.6 */ +GsfInput *gsf_open_pkg_get_rel_by_type (GsfInput *opkg, char const *type) { return gsf_open_pkg_open_rel_by_type (opkg, type, NULL); } +GsfInput *gsf_open_pkg_get_rel_by_id (GsfInput *opkg, char const *id) { return gsf_open_pkg_open_rel_by_id (opkg, id, NULL); } + +/*************************************************************/ + +struct _GsfOutfileOpenPkg { + GsfOutfile parent; + + GsfOutput *sink; + gboolean is_dir; + char *content_type; + GSList *children; + GSList *relations; +}; + +typedef GsfOutfileClass GsfOutfileOpenPkgClass; + +enum { + PROP_0, + PROP_SINK, + PROP_CONTENT_TYPE, + PROP_IS_DIR, + PROP_IS_ROOT +}; + +static GObjectClass *parent_class; + +static void +gsf_outfile_open_pkg_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) +{ + GsfOutfileOpenPkg *open_pkg = (GsfOutfileOpenPkg *)object; + + switch (property_id) { + case PROP_SINK: + g_value_set_object (value, open_pkg->sink); + break; + case PROP_CONTENT_TYPE: + g_value_set_string (value, open_pkg->content_type); + break; + case PROP_IS_DIR: + g_value_set_boolean (value, open_pkg->is_dir); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gsf_outfile_open_pkg_set_property (GObject *object, + guint property_id, + GValue const *value, + GParamSpec *pspec) +{ + GsfOutfileOpenPkg *open_pkg = (GsfOutfileOpenPkg *)object; + + switch (property_id) { + case PROP_SINK: + gsf_outfile_open_pkg_set_sink (open_pkg, g_value_get_object (value)); + break; + case PROP_CONTENT_TYPE: + gsf_outfile_open_pkg_set_content_type (open_pkg, g_value_get_string (value)); + break; + case PROP_IS_DIR: + open_pkg->is_dir = g_value_get_boolean (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gsf_outfile_open_pkg_init (GObject *obj) +{ + GsfOutfileOpenPkg *open_pkg = GSF_OUTFILE_OPEN_PKG (obj); + + open_pkg->sink = NULL; + open_pkg->content_type = NULL; + open_pkg->is_dir = FALSE; + open_pkg->children = NULL; + open_pkg->relations = NULL; +} + +static void +gsf_outfile_open_pkg_finalize (GObject *obj) +{ + GsfOutfileOpenPkg *open_pkg = GSF_OUTFILE_OPEN_PKG (obj); + GSList *ptr; + + if (open_pkg->sink != NULL) { + g_object_unref (open_pkg->sink); + open_pkg->sink = NULL; + } + g_free (open_pkg->content_type); + open_pkg->content_type = NULL; + + for (ptr = open_pkg->children ; ptr != NULL ; ptr = ptr->next) + g_object_unref (ptr->data); + g_slist_free (open_pkg->children); + parent_class->finalize (obj); +} + +static gboolean +gsf_outfile_open_pkg_write (GsfOutput *output, size_t num_bytes, guint8 const *data) +{ + GsfOutfileOpenPkg *open_pkg = GSF_OUTFILE_OPEN_PKG (output); + return gsf_output_write (open_pkg->sink, num_bytes, data); +} +static gboolean +gsf_outfile_open_pkg_seek (GsfOutput *output, gsf_off_t offset, GSeekType whence) +{ + GsfOutfileOpenPkg *open_pkg = GSF_OUTFILE_OPEN_PKG (output); + return gsf_output_seek (open_pkg->sink, offset, whence); +} +static GsfOutput * +gsf_outfile_open_pkg_new_child (GsfOutfile *parent, + char const *name, gboolean is_dir, + char const *first_property_name, va_list args) +{ + GsfOutfileOpenPkg *child, *open_pkg = GSF_OUTFILE_OPEN_PKG (parent); + GsfOutput *sink; + + if (!open_pkg->is_dir) + return NULL; + + child = (GsfOutfileOpenPkg *)g_object_new_valist ( + GSF_OUTFILE_OPEN_PKG_TYPE, first_property_name, args); + gsf_output_set_name (GSF_OUTPUT (child), name); + gsf_output_set_container (GSF_OUTPUT (child), parent); + child->is_dir = is_dir; + + sink = gsf_outfile_new_child (GSF_OUTFILE (open_pkg->sink), name, is_dir); + gsf_outfile_open_pkg_set_sink (child, sink); + g_object_unref (sink); + + open_pkg->children = g_slist_prepend (open_pkg->children, child); + g_object_ref (child); + + return GSF_OUTPUT (child); +} + +static void +gsf_open_pkg_write_content_default (GsfXMLOut *xml, char const *ext, char const *type) +{ + gsf_xml_out_start_element (xml, "Default"); + gsf_xml_out_add_cstr (xml, "Extension", ext); + gsf_xml_out_add_cstr (xml, "ContentType", type); + gsf_xml_out_end_element (xml); /* */ +} +static void +gsf_open_pkg_write_content_override (GsfOutfileOpenPkg const *open_pkg, + char const *base, + GsfXMLOut *xml) +{ + GsfOutfileOpenPkg const *child; + char *path; + GSList *ptr; + + for (ptr = open_pkg->children ; ptr != NULL ; ptr = ptr->next) { + child = ptr->data; + if (child->is_dir) { + path = g_strconcat (base, gsf_output_name (GSF_OUTPUT (child)), "/", NULL); + gsf_open_pkg_write_content_override (child, path, xml); + } else { + path = g_strconcat (base, gsf_output_name (GSF_OUTPUT (child)), NULL); + /* rels files do need content types, the defaults handle them */ + if (NULL != child->content_type) { + gsf_xml_out_start_element (xml, "Override"); + gsf_xml_out_add_cstr (xml, "PartName", path); + gsf_xml_out_add_cstr (xml, "ContentType", child->content_type); + gsf_xml_out_end_element (xml); /* */ + } + } + g_free (path); + } +} + +static gboolean +gsf_outfile_open_pkg_close (GsfOutput *output) +{ + GsfOutfileOpenPkg *open_pkg = GSF_OUTFILE_OPEN_PKG (output); + GsfOutput *dir; + gboolean res = FALSE; + char *rels_name; + + if (NULL == open_pkg->sink || gsf_output_is_closed (open_pkg->sink)) + return TRUE; + + /* Generate [Content_types].xml when we close the root dir */ + if (NULL == gsf_output_name (output)) { + GsfOutput *out = gsf_outfile_new_child (GSF_OUTFILE (open_pkg->sink), + "[Content_Types].xml", FALSE); + GsfXMLOut *xml = gsf_xml_out_new (out); + + gsf_xml_out_start_element (xml, "Types"); + gsf_xml_out_add_cstr_unchecked (xml, "xmlns", + "http://schemas.openxmlformats.org/package/2006/content-types"); + gsf_open_pkg_write_content_default (xml, "rels", + "application/vnd.openxmlformats-package.relationships+xml"); + gsf_open_pkg_write_content_default (xml, "xlbin", + "application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings"); + gsf_open_pkg_write_content_default (xml, "xml", + "application/xml"); + gsf_open_pkg_write_content_override (open_pkg, "/", xml); + gsf_xml_out_end_element (xml); /* */ + g_object_unref (xml); + + gsf_output_close (out); + g_object_unref (out); + + dir = open_pkg->sink; + rels_name = g_strdup (".rels"); + } else { + res = gsf_output_close (open_pkg->sink); + + dir = (GsfOutput *)gsf_output_container (open_pkg->sink); + rels_name = g_strconcat (gsf_output_name (output), ".rels", NULL); + } + + if (NULL != open_pkg->relations) { + GsfOutput *rels; + GsfXMLOut *xml; + GsfOpenPkgRel *rel; + GSList *ptr; + + dir = gsf_outfile_new_child (GSF_OUTFILE (dir), "_rels", TRUE); + rels = gsf_outfile_new_child (GSF_OUTFILE (dir), rels_name, FALSE); + xml = gsf_xml_out_new (rels); + + gsf_xml_out_start_element (xml, "Relationships"); + gsf_xml_out_add_cstr_unchecked (xml, "xmlns", + "http://schemas.openxmlformats.org/package/2006/relationships"); + + for (ptr = open_pkg->relations ; ptr != NULL ; ptr = ptr->next) { + rel = ptr->data; + gsf_xml_out_start_element (xml, "Relationship"); + gsf_xml_out_add_cstr (xml, "Id", rel->id); + gsf_xml_out_add_cstr (xml, "Type", rel->type); + gsf_xml_out_add_cstr (xml, "Target", rel->target); + if (rel->is_extern) + gsf_xml_out_add_cstr_unchecked (xml, "TargetMode", "External"); + gsf_xml_out_end_element (xml); /* */ + + g_free (rel->id); + g_free (rel->type); + g_free (rel->target); + g_free (rel); + } + g_slist_free (open_pkg->relations); + + gsf_xml_out_end_element (xml); /* */ + g_object_unref (xml); + gsf_output_close (rels); + g_object_unref (rels); + g_object_unref (dir); + } + g_free (rels_name); + + /* close the container */ + if (NULL == gsf_output_name (output)) + return gsf_output_close (open_pkg->sink); + return res; +} + +static void +gsf_outfile_open_pkg_class_init (GObjectClass *gobject_class) +{ + GsfOutputClass *output_class = GSF_OUTPUT_CLASS (gobject_class); + GsfOutfileClass *outfile_class = GSF_OUTFILE_CLASS (gobject_class); + + gobject_class->finalize = gsf_outfile_open_pkg_finalize; + gobject_class->get_property = gsf_outfile_open_pkg_get_property; + gobject_class->set_property = gsf_outfile_open_pkg_set_property; + + output_class->Write = gsf_outfile_open_pkg_write; + output_class->Seek = gsf_outfile_open_pkg_seek; + output_class->Close = gsf_outfile_open_pkg_close; + outfile_class->new_child = gsf_outfile_open_pkg_new_child; + + parent_class = g_type_class_peek_parent (gobject_class); + + g_object_class_install_property (gobject_class, PROP_SINK, + g_param_spec_object ("sink", "Sink", "The GsfOutput that stores the Open Package content.", + GSF_OUTFILE_TYPE, GSF_PARAM_STATIC | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + g_object_class_install_property (gobject_class, PROP_CONTENT_TYPE, + g_param_spec_string ("content-type", "ContentType", "The ContentType stored in the root [Content_Types].xml file.", + "", GSF_PARAM_STATIC | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + g_object_class_install_property (gobject_class, PROP_IS_DIR, + g_param_spec_boolean ("is-dir", "IsDir", "Can the outfile have children.", + FALSE, GSF_PARAM_STATIC | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); +} + +GSF_CLASS (GsfOutfileOpenPkg, gsf_outfile_open_pkg, + gsf_outfile_open_pkg_class_init, gsf_outfile_open_pkg_init, + GSF_OUTFILE_TYPE) + +/** + * gsf_outfile_open_pkg_new : + * @sink : #GsfOutfile + * + * Convenience routine to create a GsfOutfileOpenPkg inside @sink. + * + * Returns: a GsfOutfile that the caller is responsible for. + **/ +GsfOutfile * +gsf_outfile_open_pkg_new (GsfOutfile *sink) +{ + return g_object_new (GSF_OUTFILE_OPEN_PKG_TYPE, + "sink", sink, "is-dir", TRUE, + NULL); +} + +/** + * gsf_outfile_open_pkg_set_sink : + * @open_pkg : #GsfOutfileOpenPkg + * @sink : #GsfOutput + * + * Assigns a GsfOutput (@sink) to store the package into. + **/ +void +gsf_outfile_open_pkg_set_sink (GsfOutfileOpenPkg *open_pkg, GsfOutput *sink) +{ + if (sink) + g_object_ref (sink); + if (open_pkg->sink) + g_object_unref (open_pkg->sink); + open_pkg->sink = sink; +} + +/** + * gsf_outfile_open_pkg_set_content_type : + * @open_pkg : #GsfOutfileOpenPkg + * @content_type : + * + **/ +void +gsf_outfile_open_pkg_set_content_type (GsfOutfileOpenPkg *open_pkg, + char const *content_type) +{ + g_return_if_fail (content_type != NULL); + + if (open_pkg->content_type != content_type) { + g_free (open_pkg->content_type); + open_pkg->content_type = g_strdup (content_type); + } +} + +static char const * +gsf_outfile_open_pkg_create_rel (GsfOutfileOpenPkg *parent, + char *target, + char const *type, + gboolean is_extern) +{ + GsfOpenPkgRel *rel = g_new0 (GsfOpenPkgRel, 1); + rel->target = target; + rel->type = g_strdup (type); + rel->id = g_strdup_printf ("rId%u", g_slist_length (parent->relations) + 1); + rel->is_extern = is_extern; + parent->relations = g_slist_prepend (parent->relations, rel); + return rel->id; +} + +/** + * gsf_outfile_open_pkg_relate: + * @child : #GsfOutfileOpenPkg + * @parent : #GsfOutfileOpenPkg + * @type : target type + * + * Create a relationship between @child and @parent of @type. + * + * Returns: the relID which the caller does not own but will live as long as + * @parent. + **/ +char const * +gsf_outfile_open_pkg_relate (GsfOutfileOpenPkg *child, + GsfOutfileOpenPkg *parent, + char const *type) +{ + GString *path; + int up = -1; + GsfOutfile *child_dir, *parent_dir; + + /* Calculate the path from @child to @parent */ + parent_dir = parent->is_dir ? GSF_OUTFILE (parent) + : gsf_output_container (GSF_OUTPUT (parent)); + do { + up++; + child_dir = GSF_OUTFILE (child); + while (NULL != (child_dir = gsf_output_container (GSF_OUTPUT (child_dir)))) + if (child_dir == parent_dir) + goto found; /* break out of both loops */ + } while (NULL != (parent_dir = gsf_output_container (GSF_OUTPUT (parent_dir)))); + +found: + /* yes prepend is slow, this will never be preformance critical */ + path = g_string_new (gsf_output_name (GSF_OUTPUT (child))); + child_dir = GSF_OUTFILE (child); + while (NULL != (child_dir = gsf_output_container (GSF_OUTPUT (child_dir))) && + NULL != gsf_output_name (GSF_OUTPUT (child_dir)) && + child_dir != parent_dir) { + g_string_prepend_c (path, '/'); + g_string_prepend (path, gsf_output_name (GSF_OUTPUT (child_dir))); + } + while (up--) + g_string_prepend (path, "../"); + + return gsf_outfile_open_pkg_create_rel (parent, + g_string_free (path, FALSE), type, FALSE); +} + +/** + * gsf_outfile_open_pkg_add_rel: + * @dir : #GsfOutfile + * @name : target name + * @content_type : non-%NULL content type + * @parent : #GsfOutfile + * @type : target type + * + * A convenience wrapper to create a child in @dir of @content_type then create + * a @type relation to @parent + * + * Returns: the new part. + **/ +GsfOutput * +gsf_outfile_open_pkg_add_rel (GsfOutfile *dir, + char const *name, + char const *content_type, + GsfOutfile *parent, + char const *type) +{ + GsfOutput *part = gsf_outfile_new_child_full (dir, name, FALSE, + "content-type", content_type, + NULL); + (void) gsf_outfile_open_pkg_relate (GSF_OUTFILE_OPEN_PKG (part), + GSF_OUTFILE_OPEN_PKG (parent), type); + return part; +} + +/** + * gsf_outfile_open_pkg_add_extern_rel : + * @parent : #GsfOutfileOpenPkg + * @target : target type + * @content_type : target content + * + * Add an external relation to @parent. + * + * Returns: The id of the relation. The string is managed by the parent and + * should not be changed or freed by the caller. + **/ +char const * +gsf_outfile_open_pkg_add_extern_rel (GsfOutfileOpenPkg *parent, + char const *target, + char const *content_type) +{ + return gsf_outfile_open_pkg_create_rel (parent, + g_strdup (target), content_type, TRUE); +} + +gint +gsf_open_pkg_error_id (void) +{ + return 42; /* something arbitrary */ +} + diff --git a/gsf/gsf-open-pkg-utils.h b/gsf/gsf-open-pkg-utils.h new file mode 100644 index 0000000..a96658c --- /dev/null +++ b/gsf/gsf-open-pkg-utils.h @@ -0,0 +1,92 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-open-pkg-utils.h: Utilities for handling Open Package zip files + * from MS Office 2007 or XPS. + * + * Copyright (C) 2006-2008 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_OPEN_PKG_UTILS_H +#define GSF_OPEN_PKG_UTILS_H + +#include +#include + +G_BEGIN_DECLS + +typedef struct _GsfOpenPkgRel GsfOpenPkgRel; +typedef struct _GsfOpenPkgRels GsfOpenPkgRels; +typedef void (*GsfOpenPkgIter)(GsfInput *opkg, + GsfOpenPkgRel const *rel, + gpointer user_data); + +gboolean gsf_open_pkg_rel_is_extern (GsfOpenPkgRel const *rel); +char const *gsf_open_pkg_rel_get_target (GsfOpenPkgRel const *rel); +char const *gsf_open_pkg_rel_get_type (GsfOpenPkgRel const *rel); + +GsfOpenPkgRel *gsf_open_pkg_lookup_rel_by_type (GsfInput *opkg, char const *type); +GsfOpenPkgRel *gsf_open_pkg_lookup_rel_by_id (GsfInput *opkg, char const *id); +void gsf_open_pkg_foreach_rel (GsfInput *opkg, + GsfOpenPkgIter func, + gpointer user_data); +GsfInput *gsf_open_pkg_open_rel (GsfInput *opkg, GsfOpenPkgRel const *rel, + GError **err); + +GsfInput *gsf_open_pkg_open_rel_by_type (GsfInput *opkg, char const *type, + GError **err); +GsfInput *gsf_open_pkg_open_rel_by_id (GsfInput *opkg, char const *id, + GError **err); +GError *gsf_open_pkg_parse_rel_by_id (GsfXMLIn *xin, char const *id, + GsfXMLInNode const *dtd, + GsfXMLInNS const *ns); + +/* DEPRECATED in 1.14.6 */ +GsfInput *gsf_open_pkg_get_rel_by_type (GsfInput *opkg, char const *type); +GsfInput *gsf_open_pkg_get_rel_by_id (GsfInput *opkg, char const *id); + +typedef struct _GsfOutfileOpenPkg GsfOutfileOpenPkg; + +#define GSF_OUTFILE_OPEN_PKG_TYPE (gsf_outfile_open_pkg_get_type ()) +#define GSF_OUTFILE_OPEN_PKG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTFILE_OPEN_PKG_TYPE, GsfOutfileOpenPkg)) +#define GSF_IS_OUTFILE_OPEN_PKG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTFILE_OPEN_PKG_TYPE)) + +GType gsf_outfile_open_pkg_get_type (void) G_GNUC_CONST; +/* void gsf_outfile_open_pkg_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfOutfile *gsf_outfile_open_pkg_new (GsfOutfile *sink); +void gsf_outfile_open_pkg_set_sink (GsfOutfileOpenPkg *open_pkg, + GsfOutput *sink); +void gsf_outfile_open_pkg_set_content_type (GsfOutfileOpenPkg *open_pkg, + char const *content_type); + +char const *gsf_outfile_open_pkg_relate (GsfOutfileOpenPkg *child, + GsfOutfileOpenPkg *parent, + char const *type); +GsfOutput *gsf_outfile_open_pkg_add_rel (GsfOutfile *dir, + char const *name, + char const *content_type, + GsfOutfile *parent, + char const *type); +char const *gsf_outfile_open_pkg_add_extern_rel (GsfOutfileOpenPkg *parent, + char const *target, + char const *content_type); + +gint gsf_open_pkg_error_id (void); + +G_END_DECLS + +#endif /* GSF_OPEN_PKG_UTILS_H */ diff --git a/gsf/gsf-opendoc-utils.c b/gsf/gsf-opendoc-utils.c new file mode 100644 index 0000000..39c9e3c --- /dev/null +++ b/gsf/gsf-opendoc-utils.c @@ -0,0 +1,588 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-opendoc-utils.c: Handle the application neutral portions of OpenDocument + * + * Author: Luciano Wolf (luciano.wolf@indt.org.br) + * + * Copyright (C) 2006 Jody Goldberg (jody@gnome.org) + * Copyright (C) 2005-2006 INdT - Instituto Nokia de Tecnologia + * http://www.indt.org.br + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include +#include + + +#define OFFICE "office:" + +typedef struct { + GsfDocMetaData *md; + GsfDocPropVector *keywords; + GError *err; + char *name; + GType typ; +} GsfOOMetaIn; + +G_MODULE_EXPORT char const * +get_gsf_odf_version_string (void) +{ + return "1.2"; +} + +G_MODULE_EXPORT short +get_gsf_odf_version (void) +{ + return 102; +} + + + +/* Generated based on: + * http://www.oasis-open.org/committees/download.php/12572/OpenDocument-v1.0-os.pdf */ +/* and OpenDocument-v1.1.pdf */ +GsfXMLInNS gsf_ooo_ns[] = { + /* OOo 1.0.x & 1.1.x */ + GSF_XML_IN_NS (OO_NS_OFFICE, "http://openoffice.org/2000/office"), + GSF_XML_IN_NS (OO_NS_STYLE, "http://openoffice.org/2000/style"), + GSF_XML_IN_NS (OO_NS_TEXT, "http://openoffice.org/2000/text"), + GSF_XML_IN_NS (OO_NS_TABLE, "http://openoffice.org/2000/table"), + GSF_XML_IN_NS (OO_NS_DRAW, "http://openoffice.org/2000/drawing"), + GSF_XML_IN_NS (OO_NS_NUMBER, "http://openoffice.org/2000/datastyle"), + GSF_XML_IN_NS (OO_NS_CHART, "http://openoffice.org/2000/chart"), + GSF_XML_IN_NS (OO_NS_DR3D, "http://openoffice.org/2000/dr3d"), + GSF_XML_IN_NS (OO_NS_FORM, "http://openoffice.org/2000/form"), + GSF_XML_IN_NS (OO_NS_SCRIPT, "http://openoffice.org/2000/script"), + GSF_XML_IN_NS (OO_NS_CONFIG, "http://openoffice.org/2001/config"), + GSF_XML_IN_NS (OO_NS_MATH, "http://www.w3.org/1998/Math/MathML"), /* also in 2.0 */ + GSF_XML_IN_NS (OO_NS_FO, "http://www.w3.org/1999/XSL/Format"), + GSF_XML_IN_NS (OO_NS_XLINK, "http://www.w3.org/1999/xlink"), /* also in 2.0 */ + GSF_XML_IN_NS (OO_NS_SVG, "http://www.w3.org/2000/svg"), + + /* OOo 1.9.x & 2.0.x */ + GSF_XML_IN_NS (OO_NS_OFFICE, "urn:oasis:names:tc:opendocument:xmlns:office:1.0"), + GSF_XML_IN_NS (OO_NS_STYLE, "urn:oasis:names:tc:opendocument:xmlns:style:1.0"), + GSF_XML_IN_NS (OO_NS_TEXT, "urn:oasis:names:tc:opendocument:xmlns:text:1.0"), + GSF_XML_IN_NS (OO_NS_TABLE, "urn:oasis:names:tc:opendocument:xmlns:table:1.0"), + GSF_XML_IN_NS (OO_NS_DRAW, "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"), + GSF_XML_IN_NS (OO_NS_FO, "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"), + GSF_XML_IN_NS (OO_NS_META, "urn:oasis:names:tc:opendocument:xmlns:meta:1.0"), + GSF_XML_IN_NS (OO_NS_NUMBER, "urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"), + GSF_XML_IN_NS (OO_NS_SVG, "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"), + GSF_XML_IN_NS (OO_NS_CHART, "urn:oasis:names:tc:opendocument:xmlns:chart:1.0"), + GSF_XML_IN_NS (OO_NS_DR3D, "urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"), + GSF_XML_IN_NS (OO_NS_FORM, "urn:oasis:names:tc:opendocument:xmlns:form:1.0"), + GSF_XML_IN_NS (OO_NS_SCRIPT, "urn:oasis:names:tc:opendocument:xmlns:script:1.0"), + GSF_XML_IN_NS (OO_NS_PRESENT, "urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"), + + GSF_XML_IN_NS (OO_NS_DC, "http://purl.org/dc/elements/1.1/"), + GSF_XML_IN_NS (OO_NS_OOO, "http://openoffice.org/2004/office"), + GSF_XML_IN_NS (OO_NS_OOOW, "http://openoffice.org/2004/writer"), + GSF_XML_IN_NS (OO_NS_OOOC, "http://openoffice.org/2004/calc"), + GSF_XML_IN_NS (OO_NS_DOM, "http://www.w3.org/2001/xml-events"), + GSF_XML_IN_NS (OO_NS_XFORMS, "http://www.w3.org/2002/xforms"), + GSF_XML_IN_NS (OO_NS_XSD, "http://www.w3.org/2001/XMLSchema"), + GSF_XML_IN_NS (OO_NS_XSI, "http://www.w3.org/2001/XMLSchema-instance"), + + /* OOo 3.0.x */ + GSF_XML_IN_NS (OO_NS_OF, "urn:oasis:names:tc:opendocument:xmlns:of:1.2"), + GSF_XML_IN_NS (OO_NS_FIELD, "urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0"), + GSF_XML_IN_NS (OO_NS_FIELD, "urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:field:1.0"), + GSF_XML_IN_NS (OO_NS_FORMX, "urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"), + + GSF_XML_IN_NS (OO_NS_RPT, "http://openoffice.org/2005/report"), + GSF_XML_IN_NS (OO_NS_RDFA, "http://docs.oasis-open.org/opendocument/meta/rdfa#"), + + /* OOo 3.2.x */ + GSF_XML_IN_NS (OO_NS_GRDDL, "http://www.w3.org/2003/g/data-view#"), + GSF_XML_IN_NS (OO_NS_XHTML, "http://www.w3.org/1999/xhtml"), + GSF_XML_IN_NS (OO_NS_TABLE_OOO, "http://openoffice.org/2009/table"), + + /* OOo 3.3.x */ + GSF_XML_IN_NS (OO_NS_CHART_OOO, "http://openoffice.org/2010/chart"), + + /* Other OpenDocument v 1.1 */ + GSF_XML_IN_NS (OO_NS_CONFIG, "urn:oasis:names:tc:opendocument:xmlns:config:1.0"), + GSF_XML_IN_NS (OO_NS_ANIM, "urn:oasis:names:tc:opendocument:xmlns:animation:1.0"), + GSF_XML_IN_NS (OO_NS_DATASTYLE, "urn:oasis:names:tc:opendocument:xmlns:data style:1.0"), + GSF_XML_IN_NS (OO_NS_MANIFEST, "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0"), + GSF_XML_IN_NS (OO_NS_SMIL, "urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0"), + + + /* Symphony 1.3 */ + GSF_XML_IN_NS (OO_LOTUS_NS_PRODTOOLS, "http://www.ibm.com/xmlns/prodtools"), + + /* CleverAge ODF Add-in for Microsoft Office 3.0.5224.0 (11.0.8302)*/ + GSF_XML_IN_NS (OO_CLEVERAGE_NS_DC, "http://purl.org/dc/terms/"), + + /* KOffice 1.6.3 */ + GSF_XML_IN_NS (OO_KDE_NS_KOFFICE, "http://www.koffice.org/2005/"), + + /* Microsoft Excel Formulas in ODF */ + GSF_XML_IN_NS (OO_MS_NS_MSOXL, "http://schemas.microsoft.com/office/excel/formula"), + + /* Gnumeric ODF extensions */ + GSF_XML_IN_NS (OO_GNUM_NS_EXT, "http://www.gnumeric.org/odf-extension/1.0"), + { NULL, 0 } +}; + +G_MODULE_EXPORT GsfXMLInNS *get_gsf_ooo_ns (void) +{ + return gsf_ooo_ns; +} + + +static void +od_get_meta_prop (GsfXMLIn *xin, char const *prop_name, GType g_type) +{ + GValue *res = g_new0 (GValue, 1); + if (gsf_xml_gvalue_from_str (res, g_type, xin->content->str)) + gsf_doc_meta_data_insert (((GsfOOMetaIn *)xin->user_state)->md, + g_strdup (prop_name), res); + else + g_free (res); +} + +/* Avoid duplication */ +#define OO_PROP(tag, name, type) \ +static void \ +od_meta_ ## tag (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob) \ +{ \ + od_get_meta_prop (xin, name, type); \ +} +OO_PROP(generator, GSF_META_NAME_GENERATOR, G_TYPE_STRING) +OO_PROP(title, GSF_META_NAME_TITLE, G_TYPE_STRING) +OO_PROP(description, GSF_META_NAME_DESCRIPTION, G_TYPE_STRING) +OO_PROP(subject, GSF_META_NAME_SUBJECT, G_TYPE_STRING) +OO_PROP(initial_creator, GSF_META_NAME_INITIAL_CREATOR, G_TYPE_STRING) +/* OD considers this the last person to modify the doc, rather than + * the DC convention of the person primarilly responsible for its creation */ +OO_PROP(creator, GSF_META_NAME_CREATOR, G_TYPE_STRING) +/* last to print */ +OO_PROP(printed_by, GSF_META_NAME_PRINTED_BY, G_TYPE_STRING) + +OO_PROP(date_created, GSF_META_NAME_DATE_CREATED, GSF_TIMESTAMP_TYPE) +OO_PROP(date_modified, GSF_META_NAME_DATE_MODIFIED, GSF_TIMESTAMP_TYPE) +OO_PROP(print_date, GSF_META_NAME_LAST_PRINTED, GSF_TIMESTAMP_TYPE) + +OO_PROP(language, GSF_META_NAME_LANGUAGE, G_TYPE_STRING) +OO_PROP(editing_cycles, GSF_META_NAME_REVISION_COUNT, G_TYPE_UINT) +/* FIXME FIXME FIXME should be durations using format 'PnYnMnDTnHnMnS' */ +OO_PROP(editing_duration, GSF_META_NAME_EDITING_DURATION, G_TYPE_STRING) + +/* OD allows multiple keywords, accumulate things and make it an array */ +static void +od_meta_keyword (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob) +{ + GsfOOMetaIn *mi = (GsfOOMetaIn *)xin->user_state; + GValue *v = g_new0 (GValue, 1); + + if (NULL == mi->keywords) + mi->keywords = gsf_docprop_vector_new (); + + g_value_init (v, G_TYPE_STRING); + g_value_set_string (v, xin->content->str); + gsf_docprop_vector_append (mi->keywords, v); + g_value_unset (v); + g_free (v); +} + +#define CXML2C(s) ((char const *)(s)) + +static void +od_meta_user_defined (GsfXMLIn *xin, xmlChar const **attrs) +{ + GsfOOMetaIn *mi = (GsfOOMetaIn *)xin->user_state; + mi->typ = G_TYPE_STRING; + mi->name = NULL; + + for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2) { + if (!strcmp (CXML2C (attrs[0]), "meta:name")) + mi->name = g_strdup (CXML2C (attrs[1])); + else if (!strcmp (CXML2C (attrs[0]), "meta:value-type") || + !strcmp (CXML2C (attrs[0]), "meta:type")) { + /* + * "meta:type" is a typo on the write + * side that was + * fixed on 20110509. + */ + if (!strcmp (CXML2C (attrs[1]), "boolean")) { + mi->typ = G_TYPE_BOOLEAN; + } else if (!strcmp (CXML2C (attrs[1]), "float")) { + mi->typ = G_TYPE_DOUBLE; + } else if (!strcmp (CXML2C (attrs[1]), "string")) { + mi->typ = G_TYPE_STRING; + } else if (!strcmp (CXML2C (attrs[1]), "date") || + !strcmp (CXML2C (attrs[1]), "data")) { + /* + * "data" is a typo on the write side that was + * fixed on 20110311. + */ + mi->typ = GSF_TIMESTAMP_TYPE; + } else if (!strcmp (CXML2C (attrs[1]), "time")) { + mi->typ = G_TYPE_STRING; + /* We should be able to do better */ + } else { + /* What? */ + } + } + } + if (mi->name == NULL) /* This should not happen */ + mi->name = g_strdup (""); +} + +static void +od_meta_user_defined_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob) +{ + GsfOOMetaIn *mi = (GsfOOMetaIn *)xin->user_state; + + if (mi->name != NULL) { + GValue *res = g_new0 (GValue, 1); + GType t = mi->typ; + if (t == G_TYPE_NONE) t = G_TYPE_STRING; + if (gsf_xml_gvalue_from_str (res, t, xin->content->str)) { + gsf_doc_meta_data_insert (mi->md, mi->name, res); + mi->name = NULL; + } else { + g_free (res); + g_free (mi->name); + mi->name = NULL; + } + } +} + +#if 0 +/* These need special handling for attributes */ +template +auto_reload +hl_behavior +doc_stats +#endif + +static GsfXMLInNode const gsf_opendoc_meta_st_dtd[] = { + GSF_XML_IN_NODE (META, META, OO_NS_OFFICE, "meta", FALSE, NULL, NULL), + /* OpenDocument TAGS */ + GSF_XML_IN_NODE (META, META_GENERATOR, OO_NS_META, "generator", TRUE, NULL, &od_meta_generator), + GSF_XML_IN_NODE (META, META_TITLE, OO_NS_DC, "title", TRUE, NULL, &od_meta_title), + GSF_XML_IN_NODE (META, META_DESCRIPTION, OO_NS_DC, "description", TRUE, NULL, &od_meta_description), + GSF_XML_IN_NODE (META, META_SUBJECT, OO_NS_DC, "subject", TRUE, NULL, &od_meta_subject), + GSF_XML_IN_NODE (META, META_KEYWORD, OO_NS_META, "keyword", TRUE, NULL, &od_meta_keyword), + GSF_XML_IN_NODE (META, META_INITIAL_CREATOR, OO_NS_META, "initial-creator", TRUE, NULL, &od_meta_initial_creator), + GSF_XML_IN_NODE (META, META_CREATOR, OO_NS_DC, "creator", TRUE, NULL, &od_meta_creator), + GSF_XML_IN_NODE (META, META_PRINTED_BY, OO_NS_META, "printed-by", TRUE, NULL, &od_meta_printed_by), + GSF_XML_IN_NODE (META, META_CREATION_DATE, OO_NS_META, "creation-date", TRUE, NULL, &od_meta_date_created), + GSF_XML_IN_NODE (META, META_DATE_MOD, OO_NS_DC, "date", TRUE, NULL, &od_meta_date_modified), + GSF_XML_IN_NODE (META, META_PRINT_DATE, OO_NS_META, "print-date", TRUE, NULL, &od_meta_print_date), + GSF_XML_IN_NODE (META, META_TEMPLATE, OO_NS_META, "template", FALSE, NULL, NULL), + GSF_XML_IN_NODE (META, META_AUTO_RELOAD, OO_NS_META, "auto-reload", FALSE, NULL, NULL), + GSF_XML_IN_NODE (META, META_HL_BEHAVIOUR, OO_NS_META, "hyperlink-behaviour", FALSE, NULL, NULL), + GSF_XML_IN_NODE (META, META_DOCUMENT_STATS, OO_NS_META, "document-statistic", FALSE, NULL, NULL), + GSF_XML_IN_NODE (META, META_LANGUAGE, OO_NS_DC, "language", TRUE, NULL, &od_meta_language), + GSF_XML_IN_NODE (META, META_EDITING_CYCLES, OO_NS_META, "editing-cycles", TRUE, NULL, &od_meta_editing_cycles), + GSF_XML_IN_NODE (META, META_EDITING_DURATION, OO_NS_META, "editing-duration", TRUE, NULL, &od_meta_editing_duration), + GSF_XML_IN_NODE (META, META_USER_DEFINED, OO_NS_META, "user-defined", GSF_XML_CONTENT, &od_meta_user_defined, &od_meta_user_defined_end), + GSF_XML_IN_NODE_END +}; + + +static void +gsf_opendoc_metadata_subtree_free (G_GNUC_UNUSED GsfXMLIn *xin, gpointer old_state) +{ + GsfOOMetaIn *state = old_state; + + if (state->keywords) { + GValue *val = g_new0 (GValue, 1); + g_value_init (val, GSF_DOCPROP_VECTOR_TYPE); + g_value_set_object (val, state->keywords); + gsf_doc_meta_data_insert (state->md, + g_strdup (GSF_META_NAME_KEYWORDS), val); + g_object_unref (state->keywords); + } + + g_object_unref (G_OBJECT (state->md)); + g_free (state); +} + +static GsfXMLInDoc *doc_subtree = NULL; + +/** + * gsf_opendoc_metadata_subtree : + * @doc : #GsfXMLInDoc + * @md : #GsfDocMetaData + * + * Extend @xin so that it can parse a subtree in OpenDoc metadata format + **/ +void +gsf_opendoc_metadata_subtree (GsfXMLIn *xin, GsfDocMetaData *md) +{ + GsfOOMetaIn *state = NULL; + + g_return_if_fail (md != NULL); + + if (NULL == doc_subtree) + doc_subtree = gsf_xml_in_doc_new (gsf_opendoc_meta_st_dtd, gsf_ooo_ns); + + state = g_new0 (GsfOOMetaIn, 1); + state->md = md; + state->typ = G_TYPE_NONE; + g_object_ref (G_OBJECT (md)); + gsf_xml_in_push_state (xin, doc_subtree, state, gsf_opendoc_metadata_subtree_free, NULL); +} + +/** + * gsf_opendoc_metadata_subtree_internal : + * @doc : #GsfXMLInDoc + * + * Extend @xin so that it can parse a subtree in OpenDoc metadata format + * The current user_state must be a GsfOOMetaIn! + **/ +static void +gsf_opendoc_metadata_subtree_internal (GsfXMLIn *xin, G_GNUC_UNUSED xmlChar const **attrs) +{ + if (NULL == doc_subtree) + doc_subtree = gsf_xml_in_doc_new (gsf_opendoc_meta_st_dtd, gsf_ooo_ns); + + gsf_xml_in_push_state (xin, doc_subtree, NULL, NULL, NULL); +} + +static GsfXMLInNode const gsf_opendoc_meta_dtd[] = { + GSF_XML_IN_NODE_FULL (START, START, -1, NULL, FALSE, FALSE, TRUE, NULL, NULL, 0), + GSF_XML_IN_NODE_FULL (START, META, OO_NS_OFFICE, "meta", FALSE, FALSE, TRUE, &gsf_opendoc_metadata_subtree_internal, NULL, 0), + GSF_XML_IN_NODE_END +}; + +/** + * gsf_opendoc_metadata_read : + * @input : #GsfInput + * @md : #GsfDocMetaData + * + * Read an OpenDocument metadata stream from @input and store the properties + * into @md. Overwrite any existing properties with the same id. + * + * Returns: a GError if there is a problem. + **/ +GError * +gsf_opendoc_metadata_read (GsfInput *input, GsfDocMetaData *md) +{ + GsfXMLInDoc *doc; + GsfOOMetaIn state; + + state.md = md; + state.keywords = NULL; + state.err = NULL; + state.name = NULL; + + doc = gsf_xml_in_doc_new (gsf_opendoc_meta_dtd, gsf_ooo_ns); + gsf_xml_in_doc_parse (doc, input, &state); + gsf_xml_in_doc_free (doc); + + if (state.keywords) { + GValue *val = g_new0 (GValue, 1); + g_value_init (val, GSF_DOCPROP_VECTOR_TYPE); + g_value_set_object (val, state.keywords); + gsf_doc_meta_data_insert (md, + g_strdup (GSF_META_NAME_KEYWORDS), val); + g_object_unref (state.keywords); + } + + return state.err; +} + + +static char const * +od_map_prop_name (char const *name) +{ + /* shared by all instances and never freed */ + static GHashTable *od_prop_name_map = NULL; + + if (NULL == od_prop_name_map) + { + static struct { + char const *gsf_key; + char const *od_key; + } const map [] = { + { GSF_META_NAME_GENERATOR, "meta:generator" }, + { GSF_META_NAME_TITLE, "dc:title" }, + { GSF_META_NAME_DESCRIPTION, "dc:description" }, + { GSF_META_NAME_SUBJECT, "dc:subject" }, + { GSF_META_NAME_INITIAL_CREATOR,"meta:initial-creator" }, + { GSF_META_NAME_CREATOR, "dc:creator" }, + { GSF_META_NAME_PRINTED_BY, "meta:printed-by" }, + { GSF_META_NAME_DATE_CREATED, "meta:creation-date" }, + { GSF_META_NAME_DATE_MODIFIED, "dc:date" }, + { GSF_META_NAME_LAST_PRINTED, "meta:print-date" }, + { GSF_META_NAME_LANGUAGE, "dc:language" }, + { GSF_META_NAME_REVISION_COUNT, "meta:editing-cycles" }, + { GSF_META_NAME_EDITING_DURATION, "meta:editing-duration" } + }; + int i = G_N_ELEMENTS (map); + + od_prop_name_map = g_hash_table_new (g_str_hash, g_str_equal); + while (i-- > 0) + g_hash_table_insert (od_prop_name_map, + (gpointer)map[i].gsf_key, + (gpointer)map[i].od_key); + } + + return g_hash_table_lookup (od_prop_name_map, name); +} + +#if 0 +meta:page-count GSF_META_NAME_PAGE_COUNT +meta:table-count GSF_META_NAME_TABLE_COUNT: +meta:draw-count +meta:image-count GSF_META_NAME_IMAGE_COUNT: +meta:ole-object-count GSF_META_NAME_OBJECT_COUNT: +meta:paragraph-count GSF_META_NAME_PARAGRAPH_COUNT: +meta:word-count +meta:character-count GSF_META_NAME_CHARACTER_COUNT +meta:row-count GSF_META_NAME_LINE_COUNT: +meta:frame-count +meta:sentence-count +meta:syllable-count +meta:non-whitespace-character-count + +meta:page-count + GSF_META_NAME_SPREADSHEET_COUNT +meta:table-count + GSF_META_NAME_TABLE_COUNT: +meta:image-count + * GSF_META_NAME_IMAGE_COUNT: +meta:cell-count + GSF_META_NAME_CELL_COUNT +meta:object-count + GSF_META_NAME_OBJECT_COUNT: + +meta:page-count + GSF_META_NAME_SLIDE_COUNT: +meta:image-count + GSF_META_NAME_IMAGE_COUNT: +meta:object-count + GSF_META_NAME_OBJECT_COUNT: +#endif + +static void +meta_write_props (char const *prop_name, GsfDocProp *prop, GsfXMLOut *output) +{ + char const *mapped_name; + GValue const *val = gsf_doc_prop_get_val (prop); + + /* Handle specially */ + if (0 == strcmp (prop_name, GSF_META_NAME_KEYWORDS)) { + GValueArray *va; + unsigned i; + char *str; + + /* OLE2 stores a single string, with no obvious + * standard for seperator */ + if (G_TYPE_STRING == G_VALUE_TYPE (val)) { + str = g_value_dup_string (val); + if (str && *str) { + gsf_xml_out_start_element (output, "meta:keyword"); + gsf_xml_out_add_cstr (output, NULL, str); + gsf_xml_out_end_element (output); + } + g_free (str); + } else if (NULL != (va = gsf_value_get_docprop_varray (val))) { + for (i = 0 ; i < va->n_values; i++) { + str = g_value_dup_string (g_value_array_get_nth (va, i)); + gsf_xml_out_start_element (output, "meta:keyword"); + gsf_xml_out_add_cstr (output, NULL, str); + gsf_xml_out_end_element (output); + g_free (str); + } + } + return; + } + + if (NULL == (mapped_name = od_map_prop_name (prop_name))) { + GType t; + char const *type_name = NULL; + + gsf_xml_out_start_element (output, "meta:user-defined"); + gsf_xml_out_add_cstr (output, "meta:name", prop_name); + + if (NULL == val) { + gsf_xml_out_end_element (output); + return; + } + + t = G_VALUE_TYPE (val); + switch (t) { + case G_TYPE_CHAR: + case G_TYPE_UCHAR: + case G_TYPE_STRING: + case G_TYPE_ENUM: + case G_TYPE_FLAGS: + type_name = "string"; + break; + case G_TYPE_BOOLEAN: + type_name = "boolean"; + break; + case G_TYPE_INT: + case G_TYPE_UINT: + case G_TYPE_LONG: + case G_TYPE_ULONG: + case G_TYPE_FLOAT: + case G_TYPE_DOUBLE: + type_name = "float"; + break; + + default: + if (GSF_TIMESTAMP_TYPE == t) + type_name = "date"; + } + if (NULL != type_name) + gsf_xml_out_add_cstr (output, "meta:value-type", type_name); + } else + gsf_xml_out_start_element (output, mapped_name); + if (NULL != val) + gsf_xml_out_add_gvalue (output, NULL, val); + gsf_xml_out_end_element (output); +} + +gboolean +gsf_opendoc_metadata_write (GsfXMLOut *output, GsfDocMetaData const *md) +{ + if (output == NULL) + return FALSE; + + gsf_xml_out_start_element (output, OFFICE "document-meta"); + gsf_xml_out_add_cstr_unchecked (output, "xmlns:office", + "urn:oasis:names:tc:opendocument:xmlns:office:1.0"); + gsf_xml_out_add_cstr_unchecked (output, "xmlns:xlink", + "http://www.w3.org/1999/xlink"); + gsf_xml_out_add_cstr_unchecked (output, "xmlns:dc", + "http://purl.org/dc/elements/1.1/"); + gsf_xml_out_add_cstr_unchecked (output, "xmlns:meta", + "urn:oasis:names:tc:opendocument:xmlns:meta:1.0"); + gsf_xml_out_add_cstr_unchecked (output, "xmlns:ooo", + "http://openoffice.org/2004/office"); + gsf_xml_out_add_cstr_unchecked (output, "office:version", + get_gsf_odf_version_string ()); + gsf_xml_out_start_element (output, OFFICE "meta"); + gsf_doc_meta_data_foreach (md, (GHFunc) meta_write_props, output); + gsf_xml_out_end_element (output); /* */ + + gsf_xml_out_end_element (output); /* */ + + return TRUE; +} diff --git a/gsf/gsf-opendoc-utils.h b/gsf/gsf-opendoc-utils.h new file mode 100644 index 0000000..e320f0c --- /dev/null +++ b/gsf/gsf-opendoc-utils.h @@ -0,0 +1,114 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-opendoc-utils.h: Handle the application neutral portions of OpenDocument + * + * Author: Luciano Wolf (luciano.wolf@indt.org.br) + * + * Copyright (C) 2005-2006 INdT - Instituto Nokia de Tecnologia + * http://www.indt.org.br + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_OPENDOC_UTILS_H +#define GSF_OPENDOC_UTILS_H + +#include +#include +#include + +G_BEGIN_DECLS + +enum { + OO_NS_OFFICE, + OO_NS_STYLE, + OO_NS_TEXT, + OO_NS_TABLE, + OO_NS_DRAW, + OO_NS_NUMBER, + OO_NS_CHART, + OO_NS_DR3D, + OO_NS_FORM, + OO_NS_SCRIPT, + OO_NS_CONFIG, + OO_NS_MATH, + OO_NS_FO, + OO_NS_DC, + OO_NS_META, + OO_NS_XLINK, + OO_NS_SVG, + + /* new in 2.0 */ + OO_NS_OOO, + OO_NS_OOOW, + OO_NS_OOOC, + OO_NS_DOM, + OO_NS_XFORMS, + OO_NS_XSD, + OO_NS_XSI, + + OO_NS_PRESENT, /* added in gsf-1.14.8 */ + + /* new in 3.0 */ + OO_NS_RPT, + OO_NS_OF, + OO_NS_RDFA, + OO_NS_FIELD, + OO_NS_FORMX, + + /* Other OpenDocument 1.1 */ + OO_NS_ANIM, + OO_NS_DATASTYLE, + OO_NS_MANIFEST, + OO_NS_SMIL, + + /* Symphony 1.3 */ + OO_LOTUS_NS_PRODTOOLS, + + /* KOffice 1.6.3 */ + OO_KDE_NS_KOFFICE, + + /*CleverAge ODF Add-in for Microsoft Office 3.0.5224.0 (11.0.8302)*/ + OO_CLEVERAGE_NS_DC, + + /* Microsoft Excel Formulas */ + OO_MS_NS_MSOXL, + + /* Gnumeric ODF extensions */ + OO_GNUM_NS_EXT, + + /* New in ODF 3.2 */ + OO_NS_GRDDL, + OO_NS_XHTML, + OO_NS_TABLE_OOO, + + /* New in ODF 3.3 */ + OO_NS_CHART_OOO +}; + +G_MODULE_EXPORT GsfXMLInNS *get_gsf_ooo_ns (void); +G_MODULE_EXPORT char const *get_gsf_odf_version_string (void); +G_MODULE_EXPORT short get_gsf_odf_version (void); + +extern GsfXMLInNS gsf_ooo_ns[]; /* use get_gsf_ooo_ns instead */ + +/* For 1.15.x s/opendoc/odf/ and s/ooo/odf/ */ +GError *gsf_opendoc_metadata_read (GsfInput *input, GsfDocMetaData *md); +void gsf_opendoc_metadata_subtree (GsfXMLIn *doc, GsfDocMetaData *md); +gboolean gsf_opendoc_metadata_write (GsfXMLOut *output, GsfDocMetaData const *md); + +G_END_DECLS + +#endif /* GSF_OPENDOC_UTILS_H */ diff --git a/gsf/gsf-outfile-impl.h b/gsf/gsf-outfile-impl.h new file mode 100644 index 0000000..e563459 --- /dev/null +++ b/gsf/gsf-outfile-impl.h @@ -0,0 +1,48 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-outfile-impl.h: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_OUTFILE_IMPL_H +#define GSF_OUTFILE_IMPL_H + +#include +#include +#include + +G_BEGIN_DECLS + +struct _GsfOutfile { + GsfOutput parent; +}; + +typedef struct { + GsfOutputClass output_class; + GsfOutput *(*new_child) (GsfOutfile *outfile, + char const *name, gboolean is_dir, + char const *first_property_name, + va_list args); +} GsfOutfileClass; + +#define GSF_OUTFILE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSF_OUTFILE_TYPE, GsfOutfileClass)) +#define GSF_IS_OUTFILE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSF_OUTFILE_TYPE)) + +G_END_DECLS + +#endif /* GSF_OUTFILE_IMPL_H */ diff --git a/gsf/gsf-outfile-msole.c b/gsf/gsf-outfile-msole.c new file mode 100644 index 0000000..2a29341 --- /dev/null +++ b/gsf/gsf-outfile-msole.c @@ -0,0 +1,793 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-outfile-msole.c: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Outc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include + +#include +#include + +static GObjectClass *parent_class; +static GsfOutputClass *gsf_output_class; + +#undef G_LOG_DOMAIN +#define G_LOG_DOMAIN "libgsf:msole" + +typedef enum { MSOLE_DIR, MSOLE_SMALL_BLOCK, MSOLE_BIG_BLOCK } MSOleOutfileType; + +/* The most common values */ +#define OLE_DEFAULT_THRESHOLD 0x1000 +#define OLE_DEFAULT_BB_SIZE (1 << OLE_DEFAULT_BB_SHIFT) +#define OLE_DEFAULT_SB_SIZE (1 << OLE_DEFAULT_SB_SHIFT) + +struct _GsfOutfileMSOle { + GsfOutfile parent; + + GsfOutput *sink; + GsfOutfileMSOle *root; + + MSOleOutfileType type; + unsigned first_block; + unsigned blocks; + unsigned child_index; + + struct { + unsigned shift; + unsigned size; + } bb, sb; + + union { + struct { + GSList *children; + GPtrArray *root_order; /* only valid for the root */ + } dir; + struct { + guint8 *buf; + } small_block; + struct { + size_t start_offset; /* in bytes */ + } big_block; + } content; + unsigned char clsid[16]; /* 16 byte GUID used by some apps */ +}; +typedef GsfOutfileClass GsfOutfileMSOleClass; + +static void +gsf_outfile_msole_finalize (GObject *obj) +{ + GsfOutfileMSOle *ole = GSF_OUTFILE_MSOLE (obj); + GsfOutput *output = GSF_OUTPUT (obj); + + if (!gsf_output_is_closed (output)) + gsf_output_close (output); + + if (ole->sink != NULL) { + g_object_unref (G_OBJECT (ole->sink)); + ole->sink = NULL; + } + switch (ole->type) { + case MSOLE_DIR: + g_slist_free (ole->content.dir.children); + ole->content.dir.children = NULL; + if (ole->content.dir.root_order != NULL) + g_warning ("Finalizing a MSOle Outfile without closing it."); + break; + + case MSOLE_SMALL_BLOCK: + g_free (ole->content.small_block.buf); + ole->content.small_block.buf = NULL; + break; + + case MSOLE_BIG_BLOCK: + break; + default : + g_warning ("Unknown file type"); + } + parent_class->finalize (obj); +} + +static gboolean +gsf_outfile_msole_seek (GsfOutput *output, gsf_off_t offset, + GSeekType whence) +{ + GsfOutfileMSOle *ole = (GsfOutfileMSOle *)output; + + switch (whence) { + case G_SEEK_SET : break; + case G_SEEK_CUR : offset += output->cur_offset; break; + case G_SEEK_END : offset += output->cur_size; break; + default : + break; /*checked in GsfOutput wrapper */ + } + + switch (ole->type) { + case MSOLE_DIR: + if (offset != 0) { + g_warning ("Attempt to seek a directory"); + return FALSE; + } + return TRUE; + + case MSOLE_SMALL_BLOCK: + /* it is ok to seek past the big block threshold + * we don't convert until they _write_ something + */ + return TRUE; + + case MSOLE_BIG_BLOCK: + return gsf_output_seek (ole->sink, + (gsf_off_t)(ole->content.big_block.start_offset + offset), + G_SEEK_SET); + + default : + return FALSE; + } + + return FALSE; +} + +/* Globals to support variable OLE sector size. */ +/* 512 and 4096 bytes are the only known values for sector size on */ +/* Win2k/XP platforms. Attempts to create OLE files on Win2k/XP with */ +/* other values using StgCreateStorageEx() fail with invalid parameter. */ +/* This code has been tested with 128,256,512,4096,8192 sizes for */ +/* libgsf read/write. Interoperability with MS OLE32.DLL has been */ +/* tested with 512 and 4096 block size for filesizes up to 2GB. */ + +#define ZERO_PAD_BUF_SIZE 4096 + +/* static objects are zero-initialized as per C/C++ standards */ +static guint8 const zero_buf [ZERO_PAD_BUF_SIZE]; + +/* Calculate the block of the current offset in the file. A useful idiom is to + * pad_zero to move to the start of the next block, then get the block number. + * This avoids fence post type problems with partial blocks. */ +static inline guint32 +ole_cur_block (GsfOutfileMSOle const *ole) +{ + return (gsf_output_tell (ole->sink) - OLE_HEADER_SIZE) >> ole->bb.shift; +} + +static inline unsigned +ole_bytes_left_in_block (GsfOutfileMSOle *ole) +{ + /* blocks are multiples of bb.size (the header is padded out to bb.size) */ + unsigned r = gsf_output_tell (ole->sink) % ole->bb.size; + return (r != 0) ? (ole->bb.size - r) : 0; +} + +static void +ole_pad_zero (GsfOutfileMSOle *ole) +{ + /* no need to bounds check. len will always be less than bb.size, and + * we already check that zero_buf is big enough at creation */ + unsigned len = ole_bytes_left_in_block (ole); + if (len > 0) + gsf_output_write (ole->sink, len, zero_buf); +} + +/* Utility routine to generate a BAT for a file known to be sequential and + * continuous. */ +static void +ole_write_bat (GsfOutput *sink, guint32 block, unsigned blocks) +{ + guint8 buf [BAT_INDEX_SIZE]; + +/* FIXME FIXME FIXME optimize this to dump a buffer in 1 step */ + while (blocks-- > 1) { + block++; + GSF_LE_SET_GUINT32 (buf, block); + gsf_output_write (sink, BAT_INDEX_SIZE, buf); + } + GSF_LE_SET_GUINT32 (buf, BAT_MAGIC_END_OF_CHAIN); + gsf_output_write (sink, BAT_INDEX_SIZE, buf); +} + +static void +ole_write_const (GsfOutput *sink, guint32 value, unsigned n) +{ + guint8 buf [BAT_INDEX_SIZE]; + + GSF_LE_SET_GUINT32 (buf, value); + while (n-- > 0) + gsf_output_write (sink, BAT_INDEX_SIZE, buf); +} + +static void +ole_pad_bat_unused (GsfOutfileMSOle *ole, unsigned residual) +{ + ole_write_const (ole->sink, BAT_MAGIC_UNUSED, + (ole_bytes_left_in_block (ole) / BAT_INDEX_SIZE) - residual); +} + +/* write the metadata (dirents, small block, xbats) and close the sink */ +static gboolean +gsf_outfile_msole_close_root (GsfOutfileMSOle *ole) +{ + GsfOutfile *tmp; + guint8 buf [OLE_HEADER_SIZE]; + guint32 sbat_start, num_sbat, sb_data_start, sb_data_size, sb_data_blocks; + guint32 bat_start, num_bat, dirent_start, num_dirent_blocks, next, child_index; + unsigned i, j, blocks, num_xbat, xbat_pos; + gsf_off_t data_size; + unsigned metabat_size = ole->bb.size / BAT_INDEX_SIZE - 1; + GPtrArray *elem = ole->root->content.dir.root_order; + + /* write small block data */ + blocks = 0; + sb_data_start = ole_cur_block (ole); + data_size = gsf_output_tell (ole->sink); + for (i = 0 ; i < elem->len ; i++) { + GsfOutfileMSOle *child = g_ptr_array_index (elem, i); + if (child->type == MSOLE_SMALL_BLOCK) { + gsf_off_t size = gsf_output_size (GSF_OUTPUT (child)); + if (size > 0) { + child->blocks = ((size - 1) >> ole->sb.shift) + 1; + gsf_output_write (ole->sink, + child->blocks << ole->sb.shift, + child->content.small_block.buf); + child->first_block = blocks; + blocks += child->blocks; + } else { + child->blocks = 0; + child->first_block = BAT_MAGIC_END_OF_CHAIN; + } + } + } + data_size = gsf_output_tell (ole->sink) - data_size; + sb_data_size = data_size; + if ((gsf_off_t) sb_data_size != data_size) { + /* Check for overflow */ + g_warning ("File too big"); + return FALSE; + } + ole_pad_zero (ole); + sb_data_blocks = ole_cur_block (ole) - sb_data_start; + + /* write small block BAT (the meta bat is in a file) */ + sbat_start = ole_cur_block (ole); + for (i = 0 ; i < elem->len ; i++) { + GsfOutfileMSOle *child = g_ptr_array_index (elem, i); + if (child->type == MSOLE_SMALL_BLOCK && child->blocks > 0) + ole_write_bat (ole->sink, child->first_block, child->blocks); + } + ole_pad_bat_unused (ole, 0); + num_sbat = ole_cur_block (ole) - sbat_start; + + /* write dirents */ + dirent_start = ole_cur_block (ole); + for (i = 0 ; i < elem->len ; i++) { + GsfOutfileMSOle *child = g_ptr_array_index (elem, i); + glong j, name_len = 0; + + memset (buf, 0, DIRENT_SIZE); + + /* Hard code 'Root Entry' for the root */ + if (i == 0 || gsf_output_name (GSF_OUTPUT (child)) != NULL) { + char const *name = (i == 0) + ? "Root Entry" : gsf_output_name (GSF_OUTPUT (child)); + gunichar2 *name_utf16 = g_utf8_to_utf16 (name, + -1, NULL, &name_len, NULL); + if (name_len >= DIRENT_MAX_NAME_SIZE) + name_len = DIRENT_MAX_NAME_SIZE-1; + + /* be wary about endianness */ + for (j = 0 ; j < name_len ; j++) + GSF_LE_SET_GUINT16 (buf + j*2, name_utf16 [j]); + g_free (name_utf16); + name_len++; + } + GSF_LE_SET_GUINT16 (buf + DIRENT_NAME_LEN, name_len*2); + + if (child->root == child) { + GSF_LE_SET_GUINT8 (buf + DIRENT_TYPE, DIRENT_TYPE_ROOTDIR); + GSF_LE_SET_GUINT32 (buf + DIRENT_FIRSTBLOCK, + (sb_data_size > 0) ? sb_data_start : BAT_MAGIC_END_OF_CHAIN); + GSF_LE_SET_GUINT32 (buf + DIRENT_FILE_SIZE, sb_data_size); + memcpy (buf + DIRENT_CLSID, child->clsid, sizeof (child->clsid)); + } else if (child->type == MSOLE_DIR) { + GSF_LE_SET_GUINT8 (buf + DIRENT_TYPE, DIRENT_TYPE_DIR); + GSF_LE_SET_GUINT32 (buf + DIRENT_FIRSTBLOCK, BAT_MAGIC_END_OF_CHAIN); + GSF_LE_SET_GUINT32 (buf + DIRENT_FILE_SIZE, 0); + /* write the class id */ + memcpy (buf + DIRENT_CLSID, child->clsid, sizeof (child->clsid)); + } else { + guint32 size = child->parent.parent.cur_size; + + if ((gsf_off_t) size != child->parent.parent.cur_size) + g_warning ("File too big"); + GSF_LE_SET_GUINT8 (buf + DIRENT_TYPE, DIRENT_TYPE_FILE); + GSF_LE_SET_GUINT32 (buf + DIRENT_FIRSTBLOCK, child->first_block); + GSF_LE_SET_GUINT32 (buf + DIRENT_FILE_SIZE, size); + } + /* make everything black (red == 0) */ + GSF_LE_SET_GUINT8 (buf + DIRENT_COLOUR, 1); + + tmp = gsf_output_container (GSF_OUTPUT (child)); + next = DIRENT_MAGIC_END; + if (child->root != child && tmp != NULL) { + GSList *ptr = GSF_OUTFILE_MSOLE (tmp)->content.dir.children; + for (; ptr != NULL ; ptr = ptr->next) + if (ptr->data == child) { + if (ptr->next != NULL) { + GsfOutfileMSOle *sibling = ptr->next->data; + next = sibling->child_index; + } + break; + } + } + /* make linked list rather than tree, only use next */ + GSF_LE_SET_GUINT32 (buf + DIRENT_PREV, DIRENT_MAGIC_END); + GSF_LE_SET_GUINT32 (buf + DIRENT_NEXT, next); + + child_index = DIRENT_MAGIC_END; + if (child->type == MSOLE_DIR && child->content.dir.children != NULL) { + GsfOutfileMSOle *first = child->content.dir.children->data; + child_index = first->child_index; + } + GSF_LE_SET_GUINT32 (buf + DIRENT_CHILD, child_index); + + gsf_output_write (ole->sink, DIRENT_SIZE, buf); + } + ole_pad_zero (ole); + num_dirent_blocks = ole_cur_block (ole) - dirent_start; + + /* write BAT */ + bat_start = ole_cur_block (ole); + for (i = 0 ; i < elem->len ; i++) { + GsfOutfileMSOle *child = g_ptr_array_index (elem, i); + if (child->type == MSOLE_BIG_BLOCK) + ole_write_bat (ole->sink, child->first_block, child->blocks); + } + if (sb_data_blocks > 0) + ole_write_bat (ole->sink, sb_data_start, sb_data_blocks); + if (num_sbat > 0) + ole_write_bat (ole->sink, sbat_start, num_sbat); + ole_write_bat (ole->sink, dirent_start, num_dirent_blocks); + + /* List the BAT and meta-BAT blocks in the BAT. Doing this may + * increase the size of the bat and hence the metabat, so be + * prepared to iterate. + */ + num_bat = 0; + num_xbat = 0; +recalc_bat_bat : + i = ((ole->sink->cur_size + + BAT_INDEX_SIZE * (num_bat + num_xbat) + - OLE_HEADER_SIZE - 1) >> ole->bb.shift) + 1; + i -= bat_start; + if (num_bat != i) { + num_bat = i; + goto recalc_bat_bat; + } + i = 0; + if (num_bat > OLE_HEADER_METABAT_SIZE) + i = 1 + ((num_bat - OLE_HEADER_METABAT_SIZE - 1) + / metabat_size); + if (num_xbat != i) { + num_xbat = i; + goto recalc_bat_bat; + } + + ole_write_const (ole->sink, BAT_MAGIC_BAT, num_bat); + ole_write_const (ole->sink, BAT_MAGIC_METABAT, num_xbat); + ole_pad_bat_unused (ole, 0); + + if (num_xbat > 0) { + xbat_pos = ole_cur_block (ole); + blocks = OLE_HEADER_METABAT_SIZE; + } else { + xbat_pos = BAT_MAGIC_END_OF_CHAIN; + blocks = num_bat; + } + + /* fix up the header */ + if (ole->bb.size == 4096) { + /* set _cSectDir for 4k sector files */ + GSF_LE_SET_GUINT32 (buf, num_dirent_blocks); + gsf_output_seek (ole->sink, + (gsf_off_t) OLE_HEADER_CSECTDIR, G_SEEK_SET); + gsf_output_write (ole->sink, 4, buf); + } + GSF_LE_SET_GUINT32 (buf, num_bat); + GSF_LE_SET_GUINT32 (buf+4, dirent_start); + gsf_output_seek (ole->sink, + (gsf_off_t) OLE_HEADER_NUM_BAT, G_SEEK_SET); + gsf_output_write (ole->sink, 8, buf); + + GSF_LE_SET_GUINT32 (buf+0x0, + (num_sbat > 0) ? sbat_start : BAT_MAGIC_END_OF_CHAIN); + GSF_LE_SET_GUINT32 (buf+0x4, num_sbat); + GSF_LE_SET_GUINT32 (buf+0x8, xbat_pos); + GSF_LE_SET_GUINT32 (buf+0xc, num_xbat); + gsf_output_seek (ole->sink, (gsf_off_t) OLE_HEADER_SBAT_START, + G_SEEK_SET); + gsf_output_write (ole->sink, 0x10, buf); + + /* write initial Meta-BAT */ + for (i = 0 ; i < blocks ; i++) { + GSF_LE_SET_GUINT32 (buf, bat_start + i); + gsf_output_write (ole->sink, BAT_INDEX_SIZE, buf); + } + + /* write extended Meta-BAT */ + if (num_xbat > 0) { + gsf_output_seek (ole->sink, 0, G_SEEK_END); + for (i = 0 ; i++ < num_xbat ; ) { + bat_start += blocks; + num_bat -= blocks; + blocks = (num_bat > metabat_size) ? metabat_size : num_bat; + for (j = 0 ; j < blocks ; j++) { + GSF_LE_SET_GUINT32 (buf, bat_start + j); + gsf_output_write (ole->sink, BAT_INDEX_SIZE, buf); + } + + if (i == num_xbat) { + ole_pad_bat_unused (ole, 1); + xbat_pos = BAT_MAGIC_END_OF_CHAIN; + } else + xbat_pos++; + GSF_LE_SET_GUINT32 (buf, xbat_pos); + gsf_output_write (ole->sink, BAT_INDEX_SIZE, buf); + } + } + + /* free the children */ + for (i = 0 ; i < elem->len ; i++) + g_object_unref (G_OBJECT (g_ptr_array_index (elem, i))); + g_ptr_array_free (elem, TRUE); + ole->content.dir.root_order = NULL; + + return gsf_output_close (ole->sink); +} + +static gboolean +gsf_outfile_msole_close (GsfOutput *output) +{ + GsfOutfileMSOle *ole = (GsfOutfileMSOle *)output; + + if (gsf_output_container (output) == NULL) /* The root dir */ + return gsf_outfile_msole_close_root (ole); + + if (ole->type == MSOLE_BIG_BLOCK) { + gsf_outfile_msole_seek (output, 0, G_SEEK_END); + ole_pad_zero (ole); + ole->blocks = ole_cur_block (ole) - ole->first_block; + return gsf_output_unwrap (G_OBJECT (output), ole->sink); + } + + return TRUE; +} + +static gboolean +gsf_outfile_msole_write (GsfOutput *output, + size_t num_bytes, guint8 const *data) +{ + GsfOutfileMSOle *ole = (GsfOutfileMSOle *)output; + size_t wsize; + + g_return_val_if_fail (ole->type != MSOLE_DIR, FALSE); + if (ole->type == MSOLE_SMALL_BLOCK) { + gboolean ok; + guint8 *buf; + gsf_off_t start_offset; + + if ((output->cur_offset + num_bytes) < OLE_DEFAULT_THRESHOLD) { + memcpy (ole->content.small_block.buf + output->cur_offset, + data, num_bytes); + return TRUE; + } + ok = gsf_output_wrap (G_OBJECT (output), ole->sink); + if (!ok) + return FALSE; + + buf = ole->content.small_block.buf; + ole->content.small_block.buf = NULL; + start_offset = gsf_output_tell (ole->sink); + ole->content.big_block.start_offset = start_offset; + if ((gsf_off_t) ole->content.big_block.start_offset + != start_offset) { + /* Check for overflow */ + g_warning ("File too big"); + return FALSE; + } + + ole->first_block = ole_cur_block (ole); + ole->type = MSOLE_BIG_BLOCK; + wsize = output->cur_size; + if ((gsf_off_t) wsize != output->cur_size) { + /* Check for overflow */ + g_warning ("File too big"); + return FALSE; + } + gsf_output_write (ole->sink, wsize, buf); + g_free (buf); + } + + g_return_val_if_fail (ole->type == MSOLE_BIG_BLOCK, FALSE); + + gsf_output_write (ole->sink, num_bytes, data); + + return TRUE; +} + +static gsf_off_t gsf_outfile_msole_vprintf (GsfOutput *output, + char const *format, va_list args) G_GNUC_PRINTF (2, 0); + +static gsf_off_t +gsf_outfile_msole_vprintf (GsfOutput *output, char const *format, va_list args) +{ + GsfOutfileMSOle *ole = (GsfOutfileMSOle *)output; + + /* An optimization. */ + if (ole->type == MSOLE_BIG_BLOCK) + return gsf_output_vprintf (ole->sink, format, args); + + /* In other cases, use the gsf_output_real_vprintf fallback method. + * (This eventually calls gsf_outfile_msole_write, which will also + * check that ole->type != MSOLE_DIR.) + */ + return gsf_output_class->Vprintf (output, format, args); +} + + +static void +ole_register_child (GsfOutfileMSOle *root, GsfOutfileMSOle *child) +{ + child->root = root; + g_object_ref (G_OBJECT (child)); + child->child_index = root->content.dir.root_order->len; + g_ptr_array_add (root->content.dir.root_order, child); +} + +static gint +ole_name_cmp (GsfOutfileMSOle const *a, GsfOutfileMSOle const *b) +{ + /* According to the docs length is more important than lexical order */ + char const *a_name = gsf_output_name ((GsfOutput const *)a); + char const *b_name = gsf_output_name ((GsfOutput const *)b); + + /* be anal */ + if (a_name == NULL) + return (b_name == NULL) ? 0 : -1; + else if (b_name == NULL) + return 1; + else { + unsigned a_len = g_utf8_strlen (a_name, -1); + unsigned b_len = g_utf8_strlen (b_name, -1); + + if (a_len != b_len) + return a_len - b_len; + return g_utf8_collate (a_name, b_name); + } +} + +static void +gsf_outfile_msole_set_block_shift (GsfOutfileMSOle *ole, + unsigned bb_shift, unsigned sb_shift) +{ + ole->bb.shift = bb_shift; + ole->bb.size = (1 << ole->bb.shift); + ole->sb.shift = sb_shift; + ole->sb.size = (1 << ole->sb.shift); +} + +static GsfOutput * +gsf_outfile_msole_new_child (GsfOutfile *parent, + char const *name, gboolean is_dir, + char const *first_property_name, va_list args) +{ + GsfOutfileMSOle *ole_parent = (GsfOutfileMSOle *)parent; + GsfOutfileMSOle *child; + + g_return_val_if_fail (ole_parent != NULL, NULL); + g_return_val_if_fail (ole_parent->type == MSOLE_DIR, NULL); + + child = (GsfOutfileMSOle *)g_object_new_valist ( + GSF_OUTFILE_MSOLE_TYPE, first_property_name, args); + if (is_dir) { + child->type = MSOLE_DIR; + child->content.dir.children = NULL; + } else { + /* start as small block */ + child->type = MSOLE_SMALL_BLOCK; + child->content.small_block.buf = g_new0 (guint8, OLE_DEFAULT_THRESHOLD); + } + g_object_ref (G_OBJECT (ole_parent->sink)); + child->sink = ole_parent->sink; + child->root = ole_parent->root; + gsf_outfile_msole_set_block_shift (child, + ole_parent->bb.shift, ole_parent->sb.shift); + gsf_output_set_name (GSF_OUTPUT (child), name); + gsf_output_set_container (GSF_OUTPUT (child), parent); + + ole_parent->content.dir.children = g_slist_insert_sorted ( + ole_parent->content.dir.children, child, + (GCompareFunc)ole_name_cmp); + ole_register_child (ole_parent->root, child); + + return GSF_OUTPUT (child); +} + +static void +gsf_outfile_msole_init (GObject *obj) +{ + GsfOutfileMSOle *ole = GSF_OUTFILE_MSOLE (obj); + + ole->sink = NULL; + ole->root = NULL; + ole->type = MSOLE_DIR; + + gsf_outfile_msole_set_block_shift (ole, + OLE_DEFAULT_BB_SHIFT, OLE_DEFAULT_SB_SHIFT); + + ole->content.dir.children = NULL; + ole->content.dir.root_order = NULL; + memset (ole->clsid, 0, sizeof (ole->clsid)); +} + +static void +gsf_outfile_msole_class_init (GObjectClass *gobject_class) +{ + GsfOutputClass *output_class = GSF_OUTPUT_CLASS (gobject_class); + GsfOutfileClass *outfile_class = GSF_OUTFILE_CLASS (gobject_class); + + gobject_class->finalize = gsf_outfile_msole_finalize; + output_class->Close = gsf_outfile_msole_close; + output_class->Seek = gsf_outfile_msole_seek; + output_class->Write = gsf_outfile_msole_write; + output_class->Vprintf = gsf_outfile_msole_vprintf; + outfile_class->new_child = gsf_outfile_msole_new_child; + + parent_class = g_type_class_peek_parent (gobject_class); + gsf_output_class = g_type_class_peek (GSF_OUTPUT_TYPE); +} + +GSF_CLASS (GsfOutfileMSOle, gsf_outfile_msole, + gsf_outfile_msole_class_init, gsf_outfile_msole_init, + GSF_OUTFILE_TYPE) + +/* returns the number of times 1 must be shifted left to reach value */ +static unsigned +compute_shift (unsigned value) +{ + unsigned i = 0; + while ((value >> i) > 1) + i++; + return i; +} + +/** + * gsf_outfile_msole_new_full : + * @sink : a #GsfOutput to hold the OLE2 file. + * @bb_size : size of large blocks. + * @sb_size : size of small blocks. + * + * Creates the root directory of an MS OLE file and manages the addition of + * children. + * + * This adds a reference to @sink. + * + * Returns: the new ole file handler. + **/ +GsfOutfile * +gsf_outfile_msole_new_full (GsfOutput *sink, guint bb_size, guint sb_size) +{ + static guint8 const default_header [] = { +/* 0x00 */ 0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1, +/* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +/* 0x18 */ 0x3e, 0x00, 0x03, 0x00, 0xfe, 0xff, 0x09, 0x00, +/* 0x20 */ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x28 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x30 */ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, +/* 0x38 */ 0x00, 0x10, 0x00, 0x00 /* 0x3c-0x4b: filled on close */ + }; + guint8 *buf; + GsfOutfileMSOle *ole; + + g_return_val_if_fail (GSF_IS_OUTPUT (sink), NULL); + + ole = g_object_new (GSF_OUTFILE_MSOLE_TYPE, NULL); + if (G_UNLIKELY (NULL == ole)) return NULL; + + g_object_ref (G_OBJECT (sink)); + ole->sink = sink; + ole->type = MSOLE_DIR; + ole->content.dir.root_order = g_ptr_array_new (); + ole_register_child (ole, ole); + + gsf_outfile_msole_set_block_shift (ole, + compute_shift (bb_size), compute_shift (sb_size)); + if (ole->bb.size != bb_size || + ole->sb.size != sb_size || + bb_size <= sb_size || + bb_size < DIRENT_SIZE || + sb_size < 8 || + ZERO_PAD_BUF_SIZE < ole->bb.size) { + if (ZERO_PAD_BUF_SIZE < ole->bb.size) + g_warning ("Block size is too big, failing back to defaults."); + else + g_warning ("Incorrect block sizes, failing back to defaults."); + gsf_outfile_msole_set_block_shift (ole, + OLE_DEFAULT_BB_SHIFT, OLE_DEFAULT_SB_SHIFT); + } + + /* The names are the same */ + gsf_output_set_name (GSF_OUTPUT (ole), gsf_output_name (sink)); + gsf_output_set_container (GSF_OUTPUT (ole), NULL); + + /* build the header */ + buf = g_new (guint8, OLE_HEADER_SIZE); + memcpy (buf, default_header, sizeof (default_header)); + memset (buf + sizeof (default_header), 0xff, + OLE_HEADER_SIZE - sizeof (default_header)); + GSF_LE_SET_GUINT16 (buf + OLE_HEADER_BB_SHIFT, ole->bb.shift); + GSF_LE_SET_GUINT16 (buf + OLE_HEADER_SB_SHIFT, ole->sb.shift); + /* 4k sector OLE files seen in the wild have version 4 */ + if (ole->bb.size == 4096) + GSF_LE_SET_GUINT16 (buf + OLE_HEADER_MAJOR_VER, 4); + gsf_output_write (sink, OLE_HEADER_SIZE, buf); + g_free (buf); + + /* header must be padded out to bb.size with zeros */ + ole_pad_zero(ole); + + return GSF_OUTFILE (ole); +} + +/** + * gsf_outfile_msole_new : + * @sink : a #GsfOutput to hold the OLE2 file + * + * Creates the root directory of an MS OLE file and manages the addition of + * children. + * + * This adds a reference to @sink. + * + * Returns: the new ole file handler. + **/ +GsfOutfile * +gsf_outfile_msole_new (GsfOutput *sink) +{ + return gsf_outfile_msole_new_full (sink, + OLE_DEFAULT_BB_SIZE, OLE_DEFAULT_SB_SIZE); +} + +/** + * gsf_outfile_msole_set_class_id : + * @ole: a #GsfOutfileMSOle + * @clsid: 16 byte identifier (often a GUID in MS Windows apps) + * + * Write @clsid to the directory associated with @ole. + * + * Returns: TRUE on success. + **/ +gboolean +gsf_outfile_msole_set_class_id (GsfOutfileMSOle *ole, guint8 const *clsid) +{ + g_return_val_if_fail (ole != NULL && ole->type == MSOLE_DIR, FALSE); + memcpy (ole->clsid, clsid, sizeof (ole->clsid)); + return TRUE; +} diff --git a/gsf/gsf-outfile-msole.h b/gsf/gsf-outfile-msole.h new file mode 100644 index 0000000..18f474d --- /dev/null +++ b/gsf/gsf-outfile-msole.h @@ -0,0 +1,50 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-outfile-msole.h: interface for creating OLE files + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_OUTFILE_MSOLE_H +#define GSF_OUTFILE_MSOLE_H + +#include +#include + +G_BEGIN_DECLS + +typedef struct _GsfOutfileMSOle GsfOutfileMSOle; + +#define GSF_OUTFILE_MSOLE_TYPE (gsf_outfile_msole_get_type ()) +#define GSF_OUTFILE_MSOLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTFILE_MSOLE_TYPE, GsfOutfileMSOle)) +#define GSF_IS_OUTFILE_MSOLE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTFILE_MSOLE_TYPE)) + +#define OLE_DEFAULT_SB_SHIFT 6 +#define OLE_DEFAULT_BB_SHIFT 9 + +GType gsf_outfile_msole_get_type (void) G_GNUC_CONST; +/* void gsf_outfile_msole_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfOutfile *gsf_outfile_msole_new (GsfOutput *sink); +GsfOutfile *gsf_outfile_msole_new_full (GsfOutput *sink, + guint bb_size, guint sb_size); +gboolean gsf_outfile_msole_set_class_id (GsfOutfileMSOle *ole, + guint8 const *clsid); + +G_END_DECLS + +#endif /* GSF_OUTFILE_H */ diff --git a/gsf/gsf-outfile-stdio.c b/gsf/gsf-outfile-stdio.c new file mode 100644 index 0000000..3e6cbbb --- /dev/null +++ b/gsf/gsf-outfile-stdio.c @@ -0,0 +1,179 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-outfile-stdio.c: A directory tree wrapper for Outfile + * + * Copyright (C) 2004-2006 Novell, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#ifdef HAVE_UNISTD_H +#include +#endif + +static GObjectClass *parent_class; + +struct _GsfOutfileStdio { + GsfOutfile parent; + char *root; +}; +typedef GsfOutfileClass GsfOutfileStdioClass; + +static void +gsf_outfile_stdio_finalize (GObject *obj) +{ + GsfOutfileStdio *ofs = GSF_OUTFILE_STDIO (obj); + g_free (ofs->root); + parent_class->finalize (obj); +} + +static GsfOutput * +gsf_outfile_stdio_new_child (GsfOutfile *parent, + char const *name, gboolean is_dir, + char const *first_property_name, + va_list args) +{ + GsfOutfileStdio *ofs = GSF_OUTFILE_STDIO (parent); + GsfOutput *child; + char *path = g_build_filename (ofs->root, name, NULL); + + if (is_dir) + child = (GsfOutput *)gsf_outfile_stdio_new_valist (path, NULL, + first_property_name, args); + else + child = gsf_output_stdio_new_valist (path, NULL, + first_property_name, args); + g_free (path); + + return child; +} + +static gboolean +gsf_outfile_stdio_close (G_GNUC_UNUSED GsfOutput *output) +{ + return TRUE; +} + +static void +gsf_outfile_stdio_init (GsfOutfileStdio *ofs) +{ + ofs->root = NULL; +} + +static void +gsf_outfile_stdio_class_init (GObjectClass *gobject_class) +{ + GsfOutputClass *output_class = GSF_OUTPUT_CLASS (gobject_class); + GsfOutfileClass *outfile_class = GSF_OUTFILE_CLASS (gobject_class); + + parent_class = g_type_class_peek (GSF_OUTFILE_TYPE); + + gobject_class->finalize = gsf_outfile_stdio_finalize; + + output_class->Close = gsf_outfile_stdio_close; + output_class->Seek = NULL; + output_class->Write = NULL; + output_class->Vprintf = NULL; + + outfile_class->new_child = gsf_outfile_stdio_new_child; +} + +GSF_CLASS (GsfOutfileStdio, gsf_outfile_stdio, + gsf_outfile_stdio_class_init, gsf_outfile_stdio_init, + GSF_OUTFILE_TYPE) + +/** + * gsf_outfile_stdio_new_valist : + * @root : root directory in utf8. + * @err : optionally NULL. + * @first_property_name: name of first property to set + * @var_args: a %NULL-terminated #va_list + * + * Returns: a new outfile or NULL. + **/ +GsfOutfile * +gsf_outfile_stdio_new_valist (char const *root, GError **err, + char const *first_property_name, + va_list var_args) +{ + GsfOutfileStdio *ofs; + + if (0 != g_mkdir (root, 0777)) { + if (err != NULL) { + int save_errno = errno; + char *utf8name = g_filename_display_name (root); + *err = g_error_new (gsf_output_error_id (), 0, + "%s: %s", + utf8name, g_strerror (save_errno)); + g_free (utf8name); + } + return NULL; + } + + ofs = (GsfOutfileStdio *) g_object_new_valist (GSF_OUTFILE_STDIO_TYPE, + first_property_name, var_args); + ofs->root = g_strdup (root); + gsf_output_set_name_from_filename (GSF_OUTPUT (ofs), root); + + return GSF_OUTFILE (ofs); +} + +/** + * gsf_outfile_stdio_new_full : + * @root : root directory in utf8. + * @err : optionally NULL. + * @first_property_name: name of first property to set + * @Varargs: value of first property, followed by more properties, + * %NULL-terminated + * + * Returns: a new outfile or NULL. + **/ +GsfOutfile * +gsf_outfile_stdio_new_full (char const *root, GError **err, + gchar const *first_property_name, + ...) +{ + GsfOutfile *res; + va_list var_args; + + va_start (var_args, first_property_name); + res = gsf_outfile_stdio_new_valist (root, err, first_property_name, var_args); + va_end (var_args); + + return res; +} + +/** + * gsf_outfile_stdio_new : + * @root : root directory in utf8. + * @err : optionally NULL. + * + * Returns: a new outfile or NULL. + **/ +GsfOutfile * +gsf_outfile_stdio_new (char const *root, GError **err) +{ + return gsf_outfile_stdio_new_full (root, err, NULL); +} diff --git a/gsf/gsf-outfile-stdio.h b/gsf/gsf-outfile-stdio.h new file mode 100644 index 0000000..bfe4280 --- /dev/null +++ b/gsf/gsf-outfile-stdio.h @@ -0,0 +1,48 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-outfile-stdio.h: write a directory tree + * + * Copyright (C) 2004-2006 Novell, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_OUTFILE_STDIO_H +#define GSF_OUTFILE_STDIO_H + +#include + +G_BEGIN_DECLS + +typedef struct _GsfOutfileStdio GsfOutfileStdio; + +#define GSF_OUTFILE_STDIO_TYPE (gsf_outfile_stdio_get_type ()) +#define GSF_OUTFILE_STDIO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTFILE_STDIO_TYPE, GsfOutfileStdio)) +#define GSF_IS_OUTFILE_STDIO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTFILE_STDIO_TYPE)) + +GType gsf_outfile_stdio_get_type (void) G_GNUC_CONST; +/* void gsf_outfile_stdio_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfOutfile *gsf_outfile_stdio_new (char const *root, GError **err); +GsfOutfile *gsf_outfile_stdio_new_full (char const *root, GError **err, + char const *first_property_name, + ...); /* G_GNUC_NULL_TERMINATED */ +GsfOutfile *gsf_outfile_stdio_new_valist (char const *root, GError **err, + char const *first_property_name, + va_list var_args); + +G_END_DECLS + +#endif /* GSF_OUTFILE_H */ diff --git a/gsf/gsf-outfile-zip.c b/gsf/gsf-outfile-zip.c new file mode 100644 index 0000000..f94e262 --- /dev/null +++ b/gsf/gsf-outfile-zip.c @@ -0,0 +1,767 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-outfile-zip.c: zip archive output. + * + * Copyright (C) 2002-2006 Jon K Hellan (hellan@acm.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Outc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#undef G_LOG_DOMAIN +#define G_LOG_DOMAIN "libgsf:zip" + +enum { + PROP_0, + PROP_SINK, + PROP_ENTRY_NAME, + PROP_COMPRESSION_LEVEL +}; + +static GObjectClass *parent_class; + +struct _GsfOutfileZip { + GsfOutfile parent; + + GsfOutput *sink; + GsfOutfileZip *root; + + char *entry_name; + + GsfZipVDir *vdir; + GPtrArray *root_order; /* only valid for the root */ + + z_stream *stream; + GsfZipCompressionMethod compression_method; + + gboolean writing; + + guint8 *buf; + size_t buf_size; +}; + +typedef struct { + GsfOutfileClass parent_class; +} GsfOutfileZipClass; + +#define GSF_OUTFILE_ZIP_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSF_OUTFILE_ZIP_TYPE, GsfOutfileZipClass)) +#define GSF_IS_OUTFILE_ZIP_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSF_OUTFILE_ZIP_TYPE)) + +static void +disconnect_children (GsfOutfileZip *zip) +{ + unsigned i; + + if (!zip->root_order) + return; + + for (i = 0 ; i < zip->root_order->len ; i++) { + GsfOutfileZip *child = + g_ptr_array_index (zip->root_order, i); + if (child) + g_object_unref (child); + } + g_ptr_array_free (zip->root_order, TRUE); + zip->root_order = NULL; +} + +static void +gsf_outfile_zip_finalize (GObject *obj) +{ + GsfOutfileZip *zip = GSF_OUTFILE_ZIP (obj); + + /* If the closing failed, we might have stuff here. */ + disconnect_children (zip); + + if (zip->sink != NULL) { + g_object_unref (zip->sink); + zip->sink = NULL; + } + + g_free (zip->entry_name); + + if (zip->stream) + (void) deflateEnd (zip->stream); + g_free (zip->stream); + g_free (zip->buf); + + if (zip == zip->root) + gsf_vdir_free (zip->vdir, TRUE); /* Frees vdirs recursively */ + + parent_class->finalize (obj); +} + +static GObject * +gsf_outfile_zip_constructor (GType type, + guint n_construct_properties, + GObjectConstructParam *construct_params) +{ + GsfOutfileZip *zip =(GsfOutfileZip *) + (parent_class->constructor (type, + n_construct_properties, + construct_params)); + + if (!zip->entry_name) { + zip->vdir = gsf_vdir_new ("", TRUE, NULL); + zip->root_order = g_ptr_array_new (); + zip->root = zip; + + /* The names are the same */ + gsf_output_set_name (GSF_OUTPUT (zip), gsf_output_name (zip->sink)); + gsf_output_set_container (GSF_OUTPUT (zip), NULL); + } + + return (GObject *)zip; +} + +static gboolean +gsf_outfile_zip_seek (G_GNUC_UNUSED GsfOutput *output, + G_GNUC_UNUSED gsf_off_t offset, + G_GNUC_UNUSED GSeekType whence) +{ + return FALSE; +} + +static gboolean +zip_dirent_write (GsfOutput *sink, GsfZipDirent *dirent) +{ + static guint8 const dirent_signature[] = + { 'P', 'K', 0x01, 0x02 }; + guint8 buf[ZIP_DIRENT_SIZE]; + int nlen = strlen (dirent->name); + gboolean ret; + + memset (buf, 0, sizeof buf); + memcpy (buf, dirent_signature, sizeof dirent_signature); + GSF_LE_SET_GUINT16 (buf + ZIP_DIRENT_ENCODER, 0x317); /* Unix */ + GSF_LE_SET_GUINT16 (buf + ZIP_DIRENT_EXTRACT, 0x14); + GSF_LE_SET_GUINT16 (buf + ZIP_DIRENT_FLAGS, dirent->flags); + GSF_LE_SET_GUINT16 (buf + ZIP_DIRENT_COMPR_METHOD, + dirent->compr_method); + GSF_LE_SET_GUINT32 (buf + ZIP_DIRENT_DOSTIME, dirent->dostime); + GSF_LE_SET_GUINT32 (buf + ZIP_DIRENT_CRC32, dirent->crc32); + GSF_LE_SET_GUINT32 (buf + ZIP_DIRENT_CSIZE, dirent->csize); + GSF_LE_SET_GUINT32 (buf + ZIP_DIRENT_USIZE, dirent->usize); + GSF_LE_SET_GUINT16 (buf + ZIP_DIRENT_NAME_SIZE, nlen); + GSF_LE_SET_GUINT16 (buf + ZIP_DIRENT_EXTRAS_SIZE, 0); + GSF_LE_SET_GUINT16 (buf + ZIP_DIRENT_COMMENT_SIZE, 0); + GSF_LE_SET_GUINT16 (buf + ZIP_DIRENT_DISKSTART, 0); + GSF_LE_SET_GUINT16 (buf + ZIP_DIRENT_FILE_TYPE, 0); + /* Hardcode file mode 644 */ + GSF_LE_SET_GUINT32 (buf + ZIP_DIRENT_FILE_MODE, 0644 << 16); + GSF_LE_SET_GUINT32 (buf + ZIP_DIRENT_OFFSET, dirent->offset); + + ret = gsf_output_write (sink, sizeof buf, buf); + if (ret) + ret = gsf_output_write (sink, nlen, dirent->name); + + return ret; +} + +static gboolean +zip_trailer_write (GsfOutfileZip *zip, unsigned entries, gsf_off_t dirpos) +{ + static guint8 const trailer_signature[] = + { 'P', 'K', 0x05, 0x06 }; + guint8 buf[ZIP_TRAILER_SIZE]; + gsf_off_t pos = gsf_output_tell (zip->sink); + + memset (buf, 0, sizeof buf); + memcpy (buf, trailer_signature, sizeof trailer_signature); + GSF_LE_SET_GUINT16 (buf + ZIP_TRAILER_ENTRIES, entries); + GSF_LE_SET_GUINT16 (buf + ZIP_TRAILER_TOTAL_ENTRIES, entries); + GSF_LE_SET_GUINT32 (buf + ZIP_TRAILER_DIR_SIZE, pos - dirpos); + GSF_LE_SET_GUINT32 (buf + ZIP_TRAILER_DIR_POS, dirpos); + + return gsf_output_write (zip->sink, sizeof buf, buf); +} + +static gboolean +zip_close_root (GsfOutput *output) +{ + GsfOutfileZip *zip = GSF_OUTFILE_ZIP (output); + GsfOutfileZip *child; + gsf_off_t dirpos = gsf_output_tell (zip->sink); + GPtrArray *elem = zip->root_order; + unsigned entries = elem->len; + unsigned i; + + /* Check that children are closed */ + for (i = 0 ; i < elem->len ; i++) { + child = g_ptr_array_index (elem, i); + if (!gsf_output_is_closed (GSF_OUTPUT (child))) { + g_warning ("Child still open"); + return FALSE; + } + } + + /* Write directory */ + for (i = 0 ; i < entries ; i++) { + child = g_ptr_array_index (elem, i); + if (!zip_dirent_write (zip->sink, child->vdir->dirent)) + return FALSE; + } + + disconnect_children (zip); + + return zip_trailer_write (zip, entries, dirpos); +} + +static void +stream_name_write_to_buf (GsfOutfileZip *zip, GString *res) +{ + GsfOutput *output = GSF_OUTPUT (zip); + GsfOutfile *container; + + if (zip == zip->root) + return; + + container = gsf_output_container (output); + if (container) { + stream_name_write_to_buf (GSF_OUTFILE_ZIP (container), res); + if (res->len) { + /* Forward slash is specified by the format. */ + g_string_append_c (res, '/'); + } + } + + if (zip->entry_name) + g_string_append (res, zip->entry_name); +} + +static char * +stream_name_build (GsfOutfileZip *zip) +{ + GString *str = g_string_sized_new (80); + stream_name_write_to_buf (zip, str); + return g_string_free (str, FALSE); +} + +static guint32 +zip_time_make (time_t t) +{ + struct tm *localnow = localtime (&t); + guint32 ztime; + + ztime = (localnow->tm_year - 80) & 0x7f; + ztime = (ztime << 4) | ((localnow->tm_mon + 1) & 0x0f); + ztime = (ztime << 5) | (localnow->tm_mday & 0x1f); + ztime = (ztime << 5) | (localnow->tm_hour & 0x1f); + ztime = (ztime << 6) | (localnow->tm_min & 0x3f); + ztime = (ztime << 5) | ((localnow->tm_sec / 2) & 0x1f); + + return ztime; +} + +static void +zip_dirent_update_flags (GsfZipDirent *dirent) +{ + if (dirent->compr_method == GSF_ZIP_STORED) + dirent->flags &= ~8; + else + dirent->flags |= 8; +} + +static GsfZipDirent* +zip_dirent_new_out (GsfOutfileZip *zip) +{ + GsfZipDirent *dirent = gsf_zip_dirent_new (); + dirent->name = stream_name_build (zip); + dirent->compr_method = zip->compression_method; + dirent->dostime = zip_time_make (time (NULL)); + zip_dirent_update_flags (dirent); + return dirent; +} + +static gboolean +zip_header_write (GsfOutfileZip *zip) +{ + static guint8 const header_signature[] = + { 'P', 'K', 0x03, 0x04 }; + guint8 hbuf[ZIP_HEADER_SIZE]; + GsfZipDirent *dirent = zip->vdir->dirent; + char *name = dirent->name; + int nlen = strlen (name); + gboolean ret; + + memset (hbuf, 0, sizeof hbuf); + memcpy (hbuf, header_signature, sizeof header_signature); + GSF_LE_SET_GUINT16 (hbuf + ZIP_HEADER_VERSION, 0x14); + GSF_LE_SET_GUINT16 (hbuf + ZIP_HEADER_FLAGS, dirent->flags); + GSF_LE_SET_GUINT16 (hbuf + ZIP_HEADER_COMP_METHOD, + dirent->compr_method); + GSF_LE_SET_GUINT32 (hbuf + ZIP_HEADER_TIME, dirent->dostime); + GSF_LE_SET_GUINT16 (hbuf + ZIP_HEADER_NAME_LEN, nlen); + ret = gsf_output_write (zip->sink, sizeof hbuf, hbuf); + if (ret) + ret = gsf_output_write (zip->sink, nlen, name); + + return ret; +} + +static gboolean +zip_init_write (GsfOutput *output) +{ + GsfOutfileZip *zip = GSF_OUTFILE_ZIP (output); + GsfZipDirent *dirent; + int ret; + + if (zip->root->writing) { + g_warning ("Already writing to another stream in archive"); + return FALSE; + } + + if (!gsf_output_wrap (G_OBJECT (output), zip->sink)) + return FALSE; + + dirent = zip_dirent_new_out (zip); + dirent->offset = gsf_output_tell (zip->sink); + if (zip->vdir->dirent) + g_warning ("Leak."); + + zip->vdir->dirent = dirent; + zip_header_write (zip); + zip->writing = TRUE; + zip->root->writing = TRUE; + dirent->crc32 = crc32 (0L, Z_NULL, 0); + if (zip->compression_method == GSF_ZIP_DEFLATED) { + if (!zip->stream) { + zip->stream = g_new0 (z_stream, 1); + } + ret = deflateInit2 (zip->stream, Z_DEFAULT_COMPRESSION, + Z_DEFLATED, -MAX_WBITS, MAX_MEM_LEVEL, + Z_DEFAULT_STRATEGY); + if (ret != Z_OK) + return FALSE; + if (!zip->buf) { + zip->buf_size = ZIP_BUF_SIZE; + zip->buf = g_new (guint8, zip->buf_size); + } + zip->stream->next_out = zip->buf; + zip->stream->avail_out = zip->buf_size; + } + + return TRUE; +} + +static gboolean +zip_output_block (GsfOutfileZip *zip) +{ + size_t num_bytes = zip->buf_size - zip->stream->avail_out; + GsfZipDirent *dirent = zip->vdir->dirent; + + if (!gsf_output_write (zip->sink, num_bytes, zip->buf)) { + return FALSE; + } + dirent->csize += num_bytes; + zip->stream->next_out = zip->buf; + zip->stream->avail_out = zip->buf_size; + + return TRUE; +} + +static gboolean +zip_flush (GsfOutfileZip *zip) +{ + int zret; + + do { + zret = deflate (zip->stream, Z_FINISH); + if (zret == Z_OK || (zret == Z_BUF_ERROR && zip->stream->avail_out == 0)) { + /* In this case Z_OK or Z_BUF_ERROR means more buffer + space is needed */ + if (!zip_output_block (zip)) + return FALSE; + } + } while (zret == Z_OK || zret == Z_BUF_ERROR); + if (zret != Z_STREAM_END) + return FALSE; + if (!zip_output_block (zip)) + return FALSE; + + return TRUE; +} + +/* Write the per stream data descriptor */ +static gboolean +zip_ddesc_write (GsfOutfileZip *zip) +{ + static guint8 const ddesc_signature[] = + { 'P', 'K', 0x07, 0x08 }; + guint8 buf[16]; + GsfZipDirent *dirent = zip->vdir->dirent; + + memcpy (buf, ddesc_signature, sizeof ddesc_signature); + GSF_LE_SET_GUINT32 (buf + 4, dirent->crc32); + GSF_LE_SET_GUINT32 (buf + 8, dirent->csize); + GSF_LE_SET_GUINT32 (buf + 12, dirent->usize); + if (!gsf_output_write (zip->sink, sizeof buf, buf)) { + return FALSE; + } + + return TRUE; +} + +static gboolean +zip_header_write_sizes (GsfOutfileZip *zip) +{ + guint8 hbuf[ZIP_HEADER_SIZE]; + GsfZipDirent *dirent = zip->vdir->dirent; + gsf_off_t pos = gsf_output_tell (zip->sink); + + if (!gsf_output_seek (zip->sink, dirent->offset + ZIP_HEADER_CRC, + G_SEEK_SET)) + return FALSE; + + GSF_LE_SET_GUINT32 (hbuf + ZIP_HEADER_CRC, dirent->crc32); + GSF_LE_SET_GUINT32 (hbuf + ZIP_HEADER_COMP_SIZE, dirent->csize); + GSF_LE_SET_GUINT32 (hbuf + ZIP_HEADER_UNCOMP_SIZE, dirent->usize); + if (!gsf_output_write (zip->sink, 12, hbuf + ZIP_HEADER_CRC)) + return FALSE; + if (!gsf_output_seek (zip->sink, pos, G_SEEK_SET)) + return FALSE; + + return TRUE; +} + +static gboolean +zip_close_stream (GsfOutput *output) +{ + GsfOutfileZip *zip = GSF_OUTFILE_ZIP (output); + gboolean result; + + if (!zip->writing) + if (!zip_init_write (output)) + return FALSE; + + if (zip->compression_method == GSF_ZIP_DEFLATED) { + if (!zip_flush (zip)) + return FALSE; + + if (!zip_ddesc_write (zip)) /* Write data descriptor */ + return FALSE; + } else { + if (!zip_header_write_sizes (zip)) /* Write crc, sizes */ + return FALSE; + } + zip->root->writing = FALSE; + + result = gsf_output_unwrap (G_OBJECT (output), zip->sink); + + /* Free unneeded memory */ + if (zip->stream) { + (void) deflateEnd (zip->stream); + g_free (zip->stream); + zip->stream = NULL; + g_free (zip->buf); + zip->buf = NULL; + } + + return result; +} + +static gboolean +gsf_outfile_zip_close (GsfOutput *output) +{ + GsfOutfileZip *zip = GSF_OUTFILE_ZIP (output); + gboolean ret; + + /* The root dir */ + if (zip == zip->root) + ret = zip_close_root (output); + else if (zip->vdir->is_directory) + /* Directories: Do nothing. Should change this to actually + * write dirs which don't have children. */ + ret = TRUE; + else + ret = zip_close_stream (output); + + return ret; +} + +static gboolean +gsf_outfile_zip_write (GsfOutput *output, + size_t num_bytes, guint8 const *data) +{ + GsfOutfileZip *zip = GSF_OUTFILE_ZIP (output); + GsfZipDirent *dirent; + int ret; + + g_return_val_if_fail (zip && zip->vdir, FALSE); + g_return_val_if_fail (!zip->vdir->is_directory, FALSE); + g_return_val_if_fail (data, FALSE); + + if (!zip->writing) + if (!zip_init_write (output)) + return FALSE; + + dirent = zip->vdir->dirent; + if (zip->compression_method == GSF_ZIP_DEFLATED) { + zip->stream->next_in = (unsigned char *) data; + zip->stream->avail_in = num_bytes; + + while (zip->stream->avail_in > 0) { + if (zip->stream->avail_out == 0) { + if (!zip_output_block (zip)) + return FALSE; + } + ret = deflate (zip->stream, Z_NO_FLUSH); + if (ret != Z_OK) + return FALSE; + } + } else { + if (!gsf_output_write (zip->sink, num_bytes, data)) + return FALSE; + dirent->csize += num_bytes; + } + dirent->crc32 = crc32 (dirent->crc32, data, num_bytes); + dirent->usize += num_bytes; + + return TRUE; +} + +static void +root_register_child (GsfOutfileZip *root, GsfOutfileZip *child) +{ + child->root = root; + if (!child->vdir->is_directory) { + g_object_ref (child); + g_ptr_array_add (root->root_order, child); + } +} + +static void +gsf_outfile_zip_set_sink (GsfOutfileZip *zip, GsfOutput *sink) +{ + if (sink) + g_object_ref (sink); + if (zip->sink) + g_object_unref (zip->sink); + zip->sink = sink; +} + +static GsfOutput * +gsf_outfile_zip_new_child (GsfOutfile *parent, + char const *name, gboolean is_dir, + char const *first_property_name, va_list args) +{ + GsfOutfileZip *zip_parent = (GsfOutfileZip *)parent; + GsfOutfileZip *child; + size_t n_params = 0; + GParameter *params = NULL; + char *display_name; + + g_return_val_if_fail (zip_parent != NULL, NULL); + g_return_val_if_fail (zip_parent->vdir, NULL); + g_return_val_if_fail (zip_parent->vdir->is_directory, NULL); + g_return_val_if_fail (name && *name, NULL); + + gsf_property_settings_collect (GSF_OUTFILE_ZIP_TYPE, + ¶ms, &n_params, + "sink", zip_parent->sink, + "entry-name", name, + NULL); + gsf_property_settings_collect_valist (GSF_OUTFILE_ZIP_TYPE, + ¶ms, &n_params, + first_property_name, + args); + child = (GsfOutfileZip *)g_object_newv (GSF_OUTFILE_ZIP_TYPE, + n_params, + params); + gsf_property_settings_free (params, n_params); + + child->vdir = gsf_vdir_new (name, is_dir, NULL); + + /* FIXME: It isn't clear what encoding name is in. */ + display_name = g_filename_display_name (name); + gsf_output_set_name (GSF_OUTPUT (child), display_name); + g_free (display_name); + + gsf_output_set_container (GSF_OUTPUT (child), parent); + gsf_vdir_add_child (zip_parent->vdir, child->vdir); + root_register_child (zip_parent->root, child); + + return GSF_OUTPUT (child); +} + +static void +gsf_outfile_zip_init (GObject *obj) +{ + GsfOutfileZip *zip = GSF_OUTFILE_ZIP (obj); + + zip->sink = NULL; + zip->root = NULL; + zip->entry_name = NULL; + zip->vdir = NULL; + zip->root_order = NULL; + zip->stream = NULL; + zip->compression_method = GSF_ZIP_DEFLATED; + zip->writing = FALSE; + zip->buf = NULL; + zip->buf_size = 0; +} + +static void +gsf_outfile_zip_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) +{ + GsfOutfileZip *zip = (GsfOutfileZip *)object; + + switch (property_id) { + case PROP_SINK: + g_value_set_object (value, zip->sink); + break; + case PROP_ENTRY_NAME: + g_value_set_string (value, zip->entry_name); + break; + case PROP_COMPRESSION_LEVEL: + g_value_set_int (value, + zip->vdir->dirent + ? zip->vdir->dirent->compr_method + : 0); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gsf_outfile_zip_set_property (GObject *object, + guint property_id, + GValue const *value, + GParamSpec *pspec) +{ + GsfOutfileZip *zip = (GsfOutfileZip *)object; + + switch (property_id) { + case PROP_SINK: + gsf_outfile_zip_set_sink (zip, g_value_get_object (value)); + break; + case PROP_ENTRY_NAME: + zip->entry_name = g_strdup (g_value_get_string (value)); + break; + case PROP_COMPRESSION_LEVEL: { + int level = g_value_get_int (value); + switch (level) { + case GSF_ZIP_STORED: + case GSF_ZIP_DEFLATED: + zip->compression_method = level; + break; + default: + g_warning ("Unsupported compression level %d", level); + } + break; + } + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gsf_outfile_zip_class_init (GObjectClass *gobject_class) +{ + GsfOutputClass *output_class = GSF_OUTPUT_CLASS (gobject_class); + GsfOutfileClass *outfile_class = GSF_OUTFILE_CLASS (gobject_class); + + gobject_class->constructor = gsf_outfile_zip_constructor; + gobject_class->finalize = gsf_outfile_zip_finalize; + gobject_class->get_property = gsf_outfile_zip_get_property; + gobject_class->set_property = gsf_outfile_zip_set_property; + + output_class->Write = gsf_outfile_zip_write; + output_class->Seek = gsf_outfile_zip_seek; + output_class->Close = gsf_outfile_zip_close; + outfile_class->new_child = gsf_outfile_zip_new_child; + + parent_class = g_type_class_peek_parent (gobject_class); + + g_object_class_install_property + (gobject_class, + PROP_SINK, + g_param_spec_object ("sink", "Sink", + "Where the archive is written.", + GSF_OUTPUT_TYPE, + GSF_PARAM_STATIC | + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY)); + g_object_class_install_property + (gobject_class, + PROP_ENTRY_NAME, + g_param_spec_string ("entry-name", "Entry Name", + "The filename of this member in the archive without path.", + NULL, + GSF_PARAM_STATIC | + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY)); + g_object_class_install_property + (gobject_class, + PROP_COMPRESSION_LEVEL, + g_param_spec_int ("compression-level", + "Compression Level", + "The level of compression used, zero meaning none.", + 0, 10, + GSF_ZIP_DEFLATED, + GSF_PARAM_STATIC | + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY)); +} + +GSF_CLASS (GsfOutfileZip, gsf_outfile_zip, + gsf_outfile_zip_class_init, gsf_outfile_zip_init, + GSF_OUTFILE_TYPE) + +/** + * gsf_outfile_zip_new : + * @sink: a #GsfOutput to hold the ZIP file + * @err: Location to store error, or %NULL; currently unused. + * + * Creates the root directory of a Zip file and manages the addition of + * children. + * + * This adds a reference to @sink. + * + * Returns: the new zip file handler + **/ +GsfOutfile * +gsf_outfile_zip_new (GsfOutput *sink, G_GNUC_UNUSED GError **err) +{ + g_return_val_if_fail (GSF_IS_OUTPUT (sink), NULL); + + return (GsfOutfile *)g_object_new (GSF_OUTFILE_ZIP_TYPE, + "sink", sink, + NULL); +} + +/* deprecated has no effect */ +gboolean +gsf_outfile_zip_set_compression_method (G_GNUC_UNUSED GsfOutfileZip *zip, + G_GNUC_UNUSED GsfZipCompressionMethod method) +{ + return TRUE; +} diff --git a/gsf/gsf-outfile-zip.h b/gsf/gsf-outfile-zip.h new file mode 100644 index 0000000..ae9de3d --- /dev/null +++ b/gsf/gsf-outfile-zip.h @@ -0,0 +1,61 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-outfile-zip.h: interface for zip archive output. + * + * Copyright (C) 2002-2006 Jon K Hellan (hellan@acm.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_OUTFILE_ZIP_H +#define GSF_OUTFILE_ZIP_H + +#include +#include + +G_BEGIN_DECLS + +typedef enum { + GSF_ZIP_STORED = 0, /* supported for export */ + GSF_ZIP_SHRUNK = 1, + GSF_ZIP_REDUCEDx1 = 2, + GSF_ZIP_REDUCEDx2 = 3, + GSF_ZIP_REDUCEDx3 = 4, + GSF_ZIP_REDUCEDx4 = 5, + GSF_ZIP_IMPLODED = 6, + GSF_ZIP_TOKENIZED = 7, + GSF_ZIP_DEFLATED = 8, /* supported for export */ + GSF_ZIP_DEFLATED_BETTER = 9, + GSF_ZIP_IMPLODED_BETTER = 10 +} GsfZipCompressionMethod; + +typedef struct _GsfOutfileZip GsfOutfileZip; + +#define GSF_OUTFILE_ZIP_TYPE (gsf_outfile_zip_get_type ()) +#define GSF_OUTFILE_ZIP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTFILE_ZIP_TYPE, GsfOutfileZip)) +#define GSF_IS_OUTFILE_ZIP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTFILE_ZIP_TYPE)) + +GType gsf_outfile_zip_get_type (void) G_GNUC_CONST; +/* void gsf_outfile_zip_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfOutfile *gsf_outfile_zip_new (GsfOutput *sink, GError **err); + +/* Deprecated. Has no effect. */ +gboolean gsf_outfile_zip_set_compression_method (GsfOutfileZip *zip, + GsfZipCompressionMethod method); + +G_END_DECLS + +#endif /* GSF_OUTFILE_H */ diff --git a/gsf/gsf-outfile.c b/gsf/gsf-outfile.c new file mode 100644 index 0000000..0859679 --- /dev/null +++ b/gsf/gsf-outfile.c @@ -0,0 +1,83 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-outfile.c : + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include + +#define GET_CLASS(instance) G_TYPE_INSTANCE_GET_CLASS (instance, GSF_OUTFILE_TYPE, GsfOutfileClass) + +/** + * gsf_outfile_new_child : + * @outfile : A #GsfOutfile + * @name : The name of the new child to create + * @is_dir : %TRUE to create a directory, %FALSE to create a plain file + * + * Returns: a newly created child + **/ +GsfOutput * +gsf_outfile_new_child (GsfOutfile *outfile, + char const *name, gboolean is_dir) +{ + return gsf_outfile_new_child_full (outfile, name, is_dir, NULL); +} + +/** + * gsf_outfile_new_child_full : + * @outfile : A #GsfOutfile + * @name : The name of the new child to create + * @is_dir : TRUE to create a directory, FALSE to create a plain file + * @first_property_name : + * @Varargs : + * + * Returns: a newly created child + **/ +GsfOutput * +gsf_outfile_new_child_full (GsfOutfile *outfile, + char const *name, gboolean is_dir, + char const *first_property_name, + ...) +{ + GsfOutput *res; + va_list args; + + g_return_val_if_fail (outfile != NULL, NULL); + + va_start (args, first_property_name); + res = gsf_outfile_new_child_varg (outfile, name, is_dir, + first_property_name, args); + va_end (args); + + return res; +} + +GsfOutput * +gsf_outfile_new_child_varg (GsfOutfile *outfile, + char const *name, gboolean is_dir, + char const *first_property_name, + va_list args) +{ + g_return_val_if_fail (outfile != NULL, NULL); + return GET_CLASS (outfile)->new_child (outfile, name, is_dir, + first_property_name, args); +} + +GSF_CLASS_ABSTRACT (GsfOutfile, gsf_outfile, NULL, NULL, GSF_OUTPUT_TYPE) diff --git a/gsf/gsf-outfile.h b/gsf/gsf-outfile.h new file mode 100644 index 0000000..89212ec --- /dev/null +++ b/gsf/gsf-outfile.h @@ -0,0 +1,50 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-outfile.h: interface for creating structured files + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_OUTFILE_H +#define GSF_OUTFILE_H + +#include +#include + +G_BEGIN_DECLS + +#define GSF_OUTFILE_TYPE (gsf_outfile_get_type ()) +#define GSF_OUTFILE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTFILE_TYPE, GsfOutfile)) +#define GSF_IS_OUTFILE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTFILE_TYPE)) + +GType gsf_outfile_get_type (void) G_GNUC_CONST; +/* void gsf_outfile_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfOutput *gsf_outfile_new_child (GsfOutfile *outfile, + char const *name, gboolean is_dir); +GsfOutput *gsf_outfile_new_child_full (GsfOutfile *outfile, + char const *name, gboolean is_dir, + char const *first_property_name, + ...); +GsfOutput *gsf_outfile_new_child_varg (GsfOutfile *outfile, + char const *name, gboolean is_dir, + char const *first_property_name, + va_list args); + +G_END_DECLS + +#endif /* GSF_OUTFILE_H */ diff --git a/gsf/gsf-output-bzip.c b/gsf/gsf-output-bzip.c new file mode 100644 index 0000000..3d2ff62 --- /dev/null +++ b/gsf/gsf-output-bzip.c @@ -0,0 +1,273 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-bzip.c: wrapper to compress to bzipped output + * + * Copyright (C) 2003-2006 Dom Lachowicz (cinamod@hotmail.com) + * 2002-2006 Jon K Hellan (hellan@acm.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include + +#include +#include +#include +#include + +#ifdef HAVE_BZ2 +/* For getting FILE. Don't ask. */ +#include +#include +#define BZ_BUFSIZE 1024 +#endif + +static GObjectClass *parent_class; + +struct _GsfOutputBzip { + GsfOutput output; + +#ifdef HAVE_BZ2 + GsfOutput *sink; /* compressed data */ + bz_stream stream; + guint8 *buf; + size_t buf_size; +#endif +}; + +typedef struct { + GsfOutputClass output_class; +} GsfOutputBzipClass; + +static void +gsf_output_bzip_finalize (GObject *obj) +{ +#ifdef HAVE_BZ2 + GsfOutputBzip *bzip = (GsfOutputBzip *)obj; + + if (bzip->sink != NULL) { + g_object_unref (G_OBJECT (bzip->sink)); + bzip->sink = NULL; + } + g_free (bzip->buf); +#endif + parent_class->finalize (obj); +} + +#ifdef HAVE_BZ2 +static gboolean +init_bzip (GsfOutputBzip *bzip, GError **err) +{ + int ret; + + ret = BZ2_bzCompressInit (&bzip->stream, 6, 0, 0); + + if (ret != BZ_OK) { + if (err != NULL) + *err = g_error_new (gsf_output_error_id (), 0, + "Unable to initialize BZ2 library"); + return FALSE; + } + if (!bzip->buf) { + bzip->buf_size = BZ_BUFSIZE; + bzip->buf = g_new (guint8, bzip->buf_size); + } + bzip->stream.next_out = bzip->buf; + bzip->stream.avail_out = bzip->buf_size; + + return TRUE; +} + +static gboolean +bzip_output_block (GsfOutputBzip *bzip) +{ + size_t num_bytes = bzip->buf_size - bzip->stream.avail_out; + + if (!gsf_output_write (bzip->sink, num_bytes, bzip->buf)) + return FALSE; + + bzip->stream.next_out = bzip->buf; + bzip->stream.avail_out = bzip->buf_size; + + return TRUE; +} + +static gboolean +bzip_flush (GsfOutputBzip *bzip) +{ + int zret; + + do { + zret = BZ2_bzCompress (&bzip->stream, BZ_FINISH); + if (zret == BZ_FINISH_OK) { + /* In this case BZ_FINISH_OK means more buffer space + needed */ + if (!bzip_output_block (bzip)) + return FALSE; + } + } while (zret == BZ_FINISH_OK); + if (zret != BZ_STREAM_END) { + g_warning ("Unexpected error code %d from bzlib during compression.", + zret); + return FALSE; + } + if (!bzip_output_block (bzip)) + return FALSE; + + return TRUE; +} +#endif + +static gboolean +gsf_output_bzip_write (GsfOutput *output, + size_t num_bytes, guint8 const *data) +{ +#ifdef HAVE_BZ2 + GsfOutputBzip *bzip = GSF_OUTPUT_BZIP (output); + + g_return_val_if_fail (data, FALSE); + + bzip->stream.next_in = (unsigned char *) data; + bzip->stream.avail_in = num_bytes; + + while (bzip->stream.avail_in > 0) { + int zret; + + if (bzip->stream.avail_out == 0) { + if (!bzip_output_block (bzip)) + return FALSE; + } + + zret = BZ2_bzCompress (&bzip->stream, BZ_RUN); + if (zret != BZ_RUN_OK) { + g_warning ("Unexpected error code %d from bzlib during compression.", + zret); + return FALSE; + } + } + + if (bzip->stream.avail_out == 0) { + if (!bzip_output_block (bzip)) + return FALSE; + } + + return TRUE; +#else + (void)output; + (void)num_bytes; + (void)data; + return FALSE; +#endif +} + +static gboolean +gsf_output_bzip_seek (G_GNUC_UNUSED GsfOutput *output, + G_GNUC_UNUSED gsf_off_t offset, + G_GNUC_UNUSED GSeekType whence) +{ + return FALSE; +} + +static gboolean +gsf_output_bzip_close (GsfOutput *output) +{ +#ifdef HAVE_BZ2 + GsfOutputBzip *bzip = GSF_OUTPUT_BZIP (output); + gboolean rt; + + rt = bzip_flush (bzip); + BZ2_bzCompressEnd (&bzip->stream); + + return rt; +#else + (void)output; + return FALSE; +#endif +} + +static void +gsf_output_bzip_init (GObject *obj) +{ +#ifdef HAVE_BZ2 + GsfOutputBzip *bzip = GSF_OUTPUT_BZIP (obj); + + bzip->sink = NULL; + bzip->stream.bzalloc = NULL; + bzip->stream.bzfree = NULL; + bzip->stream.opaque = NULL; + bzip->stream.next_in = NULL; + bzip->stream.next_out = NULL; + bzip->stream.avail_in = bzip->stream.avail_out = 0; + bzip->buf = NULL; + bzip->buf_size = 0; +#else + (void)obj; +#endif +} + +static void +gsf_output_bzip_class_init (GObjectClass *gobject_class) +{ + GsfOutputClass *output_class = GSF_OUTPUT_CLASS (gobject_class); + + gobject_class->finalize = gsf_output_bzip_finalize; + output_class->Write = gsf_output_bzip_write; + output_class->Seek = gsf_output_bzip_seek; + output_class->Close = gsf_output_bzip_close; + + parent_class = g_type_class_peek_parent (gobject_class); +} + +GSF_CLASS (GsfOutputBzip, gsf_output_bzip, + gsf_output_bzip_class_init, gsf_output_bzip_init, + GSF_OUTPUT_TYPE) + +/** + * gsf_output_bzip_new : + * @sink : The underlying data source. + * @err : optionally %NULL. + * + * Adds a reference to @sink. + * + * Returns: a new file or %NULL. + **/ +GsfOutput * +gsf_output_bzip_new (GsfOutput *sink, GError **err) +{ +#ifdef HAVE_BZ2 + GsfOutputBzip *bzip; + + g_return_val_if_fail (GSF_IS_OUTPUT (sink), NULL); + + bzip = g_object_new (GSF_OUTPUT_BZIP_TYPE, NULL); + if (G_UNLIKELY (NULL == bzip)) return NULL; + + g_object_ref (G_OBJECT (sink)); + bzip->sink = sink; + + if (!init_bzip (bzip, err)) { + g_object_unref (G_OBJECT (bzip)); + return NULL; + } + + return GSF_OUTPUT (bzip); +#else + (void)sink; + if (err) + *err = g_error_new (gsf_output_error_id (), 0, + "BZ2 support not enabled"); + return NULL; +#endif +} diff --git a/gsf/gsf-output-bzip.h b/gsf/gsf-output-bzip.h new file mode 100644 index 0000000..323e321 --- /dev/null +++ b/gsf/gsf-output-bzip.h @@ -0,0 +1,42 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-bzip.h: wrapper to compress to bzipped output + * + * Copyright (C) 2003-2006 Dom Lachowicz (cinamod@hotmail.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_OUTPUT_BZIP_H +#define GSF_OUTPUT_BZIP_H + +#include + +G_BEGIN_DECLS + +#define GSF_OUTPUT_BZIP_TYPE (gsf_output_bzip_get_type ()) +#define GSF_OUTPUT_BZIP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTPUT_BZIP_TYPE, GsfOutputBzip)) +#define GSF_IS_OUTPUT_BZIP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTPUT_BZIP_TYPE)) + +typedef struct _GsfOutputBzip GsfOutputBzip; + +GType gsf_output_bzip_get_type (void) G_GNUC_CONST; +/* void gsf_output_bzip_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfOutput *gsf_output_bzip_new (GsfOutput *sink, GError **err); + +G_END_DECLS + +#endif /* GSF_OUTPUT_BZIP_H */ diff --git a/gsf/gsf-output-csv.c b/gsf/gsf-output-csv.c new file mode 100644 index 0000000..9b65cf2 --- /dev/null +++ b/gsf/gsf-output-csv.c @@ -0,0 +1,398 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-csv.c: a GsfOutput to write .csv style files. + * + * Copyright (C) 2005-2006 Morten Welinder (terra@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include +#include + +static GObjectClass *parent_class; + +enum { + PROP_0, + PROP_SINK, + PROP_QUOTE, + PROP_QUOTING_MODE, + PROP_QUOTING_TRIGGERS, + PROP_QUOTING_ON_WHITESPACE, + PROP_EOL, + PROP_SEPARATOR +}; + +/* + * We really need to add a data member to the structure, but that would be + * an ABI change. For now, fake it. + */ +#define HACK_QUOTING_ON_WHITESPACE "hack-quoting-on-whitespace" + +static void +gsf_output_csv_finalize (GObject *obj) +{ + GsfOutputCsv *csv = (GsfOutputCsv *)obj; + + if (csv->sink != NULL) + g_object_unref (G_OBJECT (csv->sink)); + g_free (csv->quote); + g_free (csv->quoting_triggers); + g_free (csv->eol); + g_free (csv->separator); + g_string_free (csv->buf, TRUE); + + parent_class->finalize (obj); +} + +static gboolean +gsf_output_csv_write (GsfOutput *output, + size_t num_bytes, guint8 const *data) +{ + GsfOutputCsv *csv = GSF_OUTPUT_CSV (output); + return gsf_output_write (csv->sink, num_bytes, data); +} + +static gboolean +gsf_output_csv_seek (GsfOutput *output, + gsf_off_t offset, + GSeekType whence) +{ + GsfOutputCsv *csv = GSF_OUTPUT_CSV (output); + return gsf_output_seek (csv->sink, offset, whence); +} + +static gboolean +gsf_output_csv_close (G_GNUC_UNUSED GsfOutput *output) +{ + return TRUE; +} + +gboolean +gsf_output_csv_write_field (GsfOutputCsv *csv, char const *field, size_t len) +{ + gboolean quote; + gboolean ok; + char const *end; + + g_return_val_if_fail (GSF_IS_OUTPUT_CSV (csv), FALSE); + g_return_val_if_fail (field != NULL, FALSE); + + if (len == (size_t)-1) + len = strlen (field); + end = field + len; + + if (csv->fields_on_line && csv->separator_len) + g_string_append_len (csv->buf, + csv->separator, + csv->separator_len); + csv->fields_on_line = TRUE; + + switch (csv->quoting_mode) { + default: + case GSF_OUTPUT_CSV_QUOTING_MODE_NEVER: + quote = FALSE; + break; + case GSF_OUTPUT_CSV_QUOTING_MODE_ALWAYS: + quote = TRUE; + break; + case GSF_OUTPUT_CSV_QUOTING_MODE_AUTO: { + char const *p = field; + quote = FALSE; + while (p < end) { + gunichar c = g_utf8_get_char (p); + if (g_utf8_strchr (csv->quoting_triggers, -1, c)) { + quote = TRUE; + break; + } + p = g_utf8_next_char (p); + } + + if (!quote && *field && + (g_unichar_isspace (g_utf8_get_char (field)) || + g_unichar_isspace (g_utf8_get_char (g_utf8_prev_char (p)))) && + g_object_get_data (G_OBJECT (csv), + HACK_QUOTING_ON_WHITESPACE) != NULL) + quote = TRUE; + break; + } + } + + if (quote && csv->quote_len > 0) { + g_string_append_len (csv->buf, + csv->quote, + csv->quote_len); + + while (field < end) { + gunichar c = g_utf8_get_char (field); + if (g_utf8_strchr (csv->quote, -1, c)) + g_string_append_len (csv->buf, + csv->quote, + csv->quote_len); + g_string_append_unichar (csv->buf, c); + field = g_utf8_next_char (field); + } + + g_string_append_len (csv->buf, + csv->quote, + csv->quote_len); + } else + g_string_append_len (csv->buf, field, len); + + ok = gsf_output_write (csv->sink, csv->buf->len, csv->buf->str); + + g_string_truncate (csv->buf, 0); + + return ok; +} + +/* ------------------------------------------------------------------------- */ + +gboolean +gsf_output_csv_write_eol (GsfOutputCsv *csv) +{ + g_return_val_if_fail (GSF_IS_OUTPUT_CSV (csv), FALSE); + + csv->fields_on_line = FALSE; + return gsf_output_write (csv->sink, csv->eol_len, csv->eol); +} + +/* ------------------------------------------------------------------------- */ + +GType +gsf_output_csv_quoting_mode_get_type (void) +{ + static GType gsf_output_csv_quoting_mode_type = 0; + + if (gsf_output_csv_quoting_mode_type == 0) { + static GEnumValue const values[] = { + { GSF_OUTPUT_CSV_QUOTING_MODE_NEVER, (char *)"GSF_OUTPUT_CSV_QUOTING_MODE_NEVER", (char *)"never" }, + { GSF_OUTPUT_CSV_QUOTING_MODE_AUTO, (char *)"GSF_OUTPUT_CSV_QUOTING_MODE_AUTO", (char *)"auto" }, + { GSF_OUTPUT_CSV_QUOTING_MODE_ALWAYS, (char *)"GSF_OUTPUT_CSV_QUOTING_MODE_ALWAYS", (char *)"always" }, + { 0, NULL, NULL } + }; + gsf_output_csv_quoting_mode_type = g_enum_register_static ( + g_intern_static_string ("GsfOutputCsvQuotingMode"), values); + } + + return gsf_output_csv_quoting_mode_type; +} + +/* ------------------------------------------------------------------------- */ + +static void +gsf_output_csv_init (GObject *obj) +{ + GsfOutputCsv *csv = (GsfOutputCsv *)obj; + csv->quoting_triggers = g_strdup (""); + csv->eol = g_strdup ("\n"); + csv->eol_len = strlen (csv->eol); + csv->buf = g_string_new (NULL); + g_object_set_data (obj, + HACK_QUOTING_ON_WHITESPACE, + GINT_TO_POINTER (1)); +} + +static void +gsf_output_csv_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) +{ + GsfOutputCsv *csv = (GsfOutputCsv *)object; + + switch (property_id) { + case PROP_SINK: + g_value_set_object (value, csv->sink); + break; + case PROP_QUOTE: + g_value_set_string (value, csv->quote); + break; + case PROP_QUOTING_MODE: + g_value_set_enum (value, csv->quoting_mode); + break; + case PROP_QUOTING_TRIGGERS: + g_value_set_string (value, csv->quoting_triggers); + break; + case PROP_QUOTING_ON_WHITESPACE: { + gboolean qow = g_object_get_data + (object, HACK_QUOTING_ON_WHITESPACE) != NULL; + g_value_set_boolean (value, qow); + break; + } + case PROP_EOL: + g_value_set_string (value, csv->eol); + break; + case PROP_SEPARATOR: + g_value_set_string (value, csv->separator); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gsf_output_csv_set_sink (GsfOutputCsv *csv, GsfOutput *sink) +{ + if (sink) + g_object_ref (sink); + if (csv->sink) + g_object_unref (csv->sink); + csv->sink = sink; +} + +static void +gsf_output_csv_set_property (GObject *object, + guint property_id, + GValue const *value, + GParamSpec *pspec) +{ + GsfOutputCsv *csv = (GsfOutputCsv *)object; + char *scopy; + + switch (property_id) { + case PROP_SINK: + gsf_output_csv_set_sink (csv, g_value_get_object (value)); + break; + case PROP_QUOTE: + scopy = g_strdup (g_value_get_string (value)); + g_free (csv->quote); + csv->quote = scopy; + csv->quote_len = scopy ? strlen (scopy) : 0; + break; + case PROP_QUOTING_MODE: + csv->quoting_mode = g_value_get_enum (value); + break; + case PROP_QUOTING_TRIGGERS: + scopy = g_strdup (g_value_get_string (value)); + g_free (csv->quoting_triggers); + csv->quoting_triggers = scopy ? scopy : g_strdup (""); + if (*csv->quoting_triggers) + csv->quoting_mode = GSF_OUTPUT_CSV_QUOTING_MODE_AUTO; + break; + case PROP_QUOTING_ON_WHITESPACE: { + gboolean qow = g_value_get_boolean (value); + g_object_set_data (object, + HACK_QUOTING_ON_WHITESPACE, + GINT_TO_POINTER (qow)); + break; + } + case PROP_EOL: + scopy = g_strdup (g_value_get_string (value)); + g_free (csv->eol); + csv->eol = scopy ? scopy : g_strdup (""); + csv->eol_len = strlen (csv->eol); + break; + case PROP_SEPARATOR: + scopy = g_strdup (g_value_get_string (value)); + g_free (csv->separator); + csv->separator = scopy; + csv->separator_len = scopy ? strlen (scopy) : 0; + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gsf_output_csv_class_init (GObjectClass *gobject_class) +{ + GsfOutputClass *output_class = GSF_OUTPUT_CLASS (gobject_class); + + gobject_class->finalize = gsf_output_csv_finalize; + gobject_class->set_property = gsf_output_csv_set_property; + gobject_class->get_property = gsf_output_csv_get_property; + output_class->Write = gsf_output_csv_write; + output_class->Seek = gsf_output_csv_seek; + output_class->Close = gsf_output_csv_close; + + g_object_class_install_property + (gobject_class, + PROP_SINK, + g_param_spec_object ("sink", "Sink", + "Where the compressed data is written.", + GSF_OUTPUT_TYPE, + GSF_PARAM_STATIC | + G_PARAM_READWRITE)); + g_object_class_install_property + (gobject_class, + PROP_QUOTE, + g_param_spec_string ("quote", "Quote", + "The string used for quoting fields.", + "\"", + GSF_PARAM_STATIC | + G_PARAM_CONSTRUCT | + G_PARAM_READWRITE)); + g_object_class_install_property + (gobject_class, + PROP_QUOTING_MODE, + g_param_spec_enum ("quoting-mode", + "Quoting Mode", + "When to quote fields.", + GSF_OUTPUT_CSV_QUOTING_MODE_TYPE, + GSF_OUTPUT_CSV_QUOTING_MODE_NEVER, + GSF_PARAM_STATIC | + G_PARAM_CONSTRUCT | + G_PARAM_READWRITE)); + g_object_class_install_property + (gobject_class, + PROP_QUOTING_TRIGGERS, + g_param_spec_string ("quoting-triggers", "Quoting Triggers", + "Characters that cause field quoting.", + NULL, + GSF_PARAM_STATIC | + G_PARAM_READWRITE)); + g_object_class_install_property + (gobject_class, + PROP_QUOTING_ON_WHITESPACE, + g_param_spec_boolean ("quoting-on-whitespace", + "Quoting On Whitespace", + "Does initial or terminal whitespace force quoting?", + TRUE, + GSF_PARAM_STATIC | + G_PARAM_READWRITE)); + g_object_class_install_property + (gobject_class, + PROP_SEPARATOR, + g_param_spec_string ("separator", "Separator", + "The field separator.", + ",", + GSF_PARAM_STATIC | + G_PARAM_CONSTRUCT | + G_PARAM_READWRITE)); + g_object_class_install_property + (gobject_class, + PROP_EOL, + g_param_spec_string ("eol", "eol", + "The end-of-line marker.", + "\n", + GSF_PARAM_STATIC | + G_PARAM_CONSTRUCT | + G_PARAM_READWRITE)); + + parent_class = g_type_class_peek_parent (gobject_class); +} + +GSF_CLASS (GsfOutputCsv, gsf_output_csv, + gsf_output_csv_class_init, gsf_output_csv_init, + GSF_OUTPUT_TYPE) + diff --git a/gsf/gsf-output-csv.h b/gsf/gsf-output-csv.h new file mode 100644 index 0000000..3456eda --- /dev/null +++ b/gsf/gsf-output-csv.h @@ -0,0 +1,74 @@ +/* + * gsf-output-csv.h: a GsfOutput to write .csv style files. + * + * Copyright (C) 2005-2006 Morten Welinder (terra@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_OUTPUT_CSV_H +#define GSF_OUTPUT_CSV_H + +#include + +G_BEGIN_DECLS + +typedef enum { + GSF_OUTPUT_CSV_QUOTING_MODE_NEVER, + GSF_OUTPUT_CSV_QUOTING_MODE_AUTO, + GSF_OUTPUT_CSV_QUOTING_MODE_ALWAYS +} GsfOutputCsvQuotingMode; +GType gsf_output_csv_quoting_mode_get_type (void) G_GNUC_CONST; +/* void gsf_output_csv_quoting_mode_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +#define GSF_OUTPUT_CSV_QUOTING_MODE_TYPE (gsf_output_csv_quoting_mode_get_type ()) + +typedef struct { + GsfOutput output; + + GsfOutput *sink; + + char *quote; + size_t quote_len; + GsfOutputCsvQuotingMode quoting_mode; + char *quoting_triggers; + + char *eol; + size_t eol_len; + char *separator; + size_t separator_len; + gboolean fields_on_line; + + GString *buf; +} GsfOutputCsv; + +#define GSF_OUTPUT_CSV_TYPE (gsf_output_csv_get_type ()) +#define GSF_OUTPUT_CSV(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTPUT_CSV_TYPE, GsfOutputCsv)) +#define GSF_IS_OUTPUT_CSV(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTPUT_CSV_TYPE)) +GType gsf_output_csv_get_type (void) G_GNUC_CONST; +/* void gsf_output_csv_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +gboolean gsf_output_csv_write_field (GsfOutputCsv *csv, + char const *field, + size_t len); +gboolean gsf_output_csv_write_eol (GsfOutputCsv *csv); + +typedef struct { + GsfOutputClass output_class; +} GsfOutputCsvClass; + +G_END_DECLS + +#endif /* GSF_OUTPUT_CSV_H */ diff --git a/gsf/gsf-output-gio.c b/gsf/gsf-output-gio.c new file mode 100644 index 0000000..6e1f3b7 --- /dev/null +++ b/gsf/gsf-output-gio.c @@ -0,0 +1,244 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-gio.c: + * + * Copyright (C) 2007 Dom Lachowicz + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include + +struct _GsfOutputGio { + GsfOutput output; + GFile *file; + GOutputStream *stream; +}; + +typedef struct { + GsfOutputClass output_class; +} GsfOutputGioClass; + +static gboolean +can_seek (GOutputStream *stream) +{ + if (!G_IS_SEEKABLE (stream)) + return FALSE; + + return g_seekable_can_seek (G_SEEKABLE (stream)); +} + +static GsfOutput * +wrap_if_not_seekable (GsfOutputGio *output) +{ + if (!can_seek (output->stream)) { + /* todo: return a wrapper around the output that's seekable */ + } + + return GSF_OUTPUT (output); +} + +/** + * gsf_input_gio_new: + * @file: an existing GFile + * + * Returns: A new #GsfOutputGio or NULL + */ +GsfOutput * +gsf_output_gio_new (GFile *file) +{ + GsfOutputGio *output; + GOutputStream *stream; + + g_return_val_if_fail (file != NULL, NULL); + + stream = (GOutputStream *)g_file_replace (file, NULL, 0, FALSE, NULL, NULL); + if (stream == NULL) { + return NULL; + } + + output = g_object_new (GSF_OUTPUT_GIO_TYPE, NULL); + if (G_UNLIKELY (NULL == output)) { + g_output_stream_close (stream, NULL, NULL); + g_object_unref (G_OBJECT (stream)); + return NULL; + } + + output->file = file; + output->stream = stream; + g_object_ref (output->file); + + return wrap_if_not_seekable (output); +} + +/** + * gsf_input_gio_new_for_path: + * @path: + * @err: optionally NULL. + * + * Returns: A new #GsfOutputGio or NULL + */ +GsfOutput * +gsf_output_gio_new_for_path (char const *path, GError **err) +{ + GFile *file; + GsfOutput *output; + + if (path == NULL) { + if (err != NULL) + *err = g_error_new (gsf_output_error_id (), 0, + "path is NULL"); + return NULL; + } + + file = g_file_new_for_path (path); + + output = gsf_output_gio_new (file); + g_object_unref (G_OBJECT (file)); + + return output; +} + +/** + * gsf_input_gio_new_for_uri: + * @uri: + * @err: optionally NULL. + * + * Returns: A new #GsfOutputGio or NULL + */ +GsfOutput * +gsf_output_gio_new_for_uri (char const *uri, GError **err) +{ + GFile *file; + GsfOutput *output; + + if (uri == NULL) { + if (err != NULL) + *err = g_error_new (gsf_output_error_id (), 0, + "uri is NULL"); + return NULL; + } + + file = g_file_new_for_uri (uri); + + output = gsf_output_gio_new (file); + g_object_unref (G_OBJECT (file)); + + return output; +} + +static gboolean +gsf_output_gio_close (GsfOutput *output) +{ + GsfOutputGio *gio = GSF_OUTPUT_GIO (output); + + if (gio->stream != NULL) { + g_output_stream_close (gio->stream, NULL, NULL); + g_object_unref (G_OBJECT (gio->stream)); + gio->stream = NULL; + + g_object_unref (G_OBJECT (gio->file)); + gio->file = NULL; + + return TRUE; + } + + return FALSE; +} + +static void +gsf_output_gio_finalize (GObject *obj) +{ + GObjectClass *parent_class; + GsfOutputGio *output = (GsfOutputGio *)obj; + + gsf_output_gio_close (GSF_OUTPUT(output)); + + parent_class = g_type_class_peek (GSF_OUTPUT_TYPE); + if (parent_class && parent_class->finalize) + parent_class->finalize (obj); +} + +static gboolean +gsf_output_gio_write (GsfOutput *output, + size_t num_bytes, + guint8 const *buffer) +{ + GsfOutputGio *gio = GSF_OUTPUT_GIO (output); + size_t total_written = 0; + + g_return_val_if_fail (gio != NULL, FALSE); + g_return_val_if_fail (gio->stream != NULL, FALSE); + + while (1) { + gssize nwritten; + + nwritten = g_output_stream_write (gio->stream, (guint8 *)(buffer + total_written), (num_bytes - total_written), NULL, NULL); + + if (nwritten >= 0) { + total_written += nwritten; + if ((size_t)total_written == num_bytes) + return TRUE; + } else { + return FALSE; + } + } + + return TRUE; +} + +static gboolean +gsf_output_gio_seek (GsfOutput *output, gsf_off_t offset, GSeekType whence) +{ + GsfOutputGio *gio = GSF_OUTPUT_GIO (output); + + g_return_val_if_fail (gio != NULL, FALSE); + g_return_val_if_fail (gio->stream != NULL, FALSE); + + if (!can_seek (gio->stream)) + return FALSE; + + return g_seekable_seek (G_SEEKABLE (gio->stream), offset, whence, NULL, NULL); +} + +static void +gsf_output_gio_init (GObject *obj) +{ + GsfOutputGio *gio = GSF_OUTPUT_GIO (obj); + + gio->file = NULL; + gio->stream = NULL; +} + +static void +gsf_output_gio_class_init (GObjectClass *gobject_class) +{ + GsfOutputClass *output_class = GSF_OUTPUT_CLASS (gobject_class); + + gobject_class->finalize = gsf_output_gio_finalize; + output_class->Close = gsf_output_gio_close; + output_class->Write = gsf_output_gio_write; + output_class->Seek = gsf_output_gio_seek; +} + +GSF_CLASS (GsfOutputGio, gsf_output_gio, + gsf_output_gio_class_init, gsf_output_gio_init, GSF_OUTPUT_TYPE) + +/***************************************************************************/ +/***************************************************************************/ diff --git a/gsf/gsf-output-gio.h b/gsf/gsf-output-gio.h new file mode 100644 index 0000000..f7f44ee --- /dev/null +++ b/gsf/gsf-output-gio.h @@ -0,0 +1,43 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-gio.h: + * + * Copyright (C) 2007 Dom Lachowicz + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_OUTPUT_GIO_H +#define GSF_OUTPUT_GIO_H + +#include +#include + +G_BEGIN_DECLS + +#define GSF_OUTPUT_GIO_TYPE (gsf_output_gio_get_type ()) +#define GSF_OUTPUT_GIO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTPUT_GIO_TYPE, GsfOutputGio)) +#define GSF_IS_OUTPUT_GIO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTPUT_GIO_TYPE)) + +typedef struct _GsfOutputGio GsfOutputGio; + +GType gsf_output_gio_get_type (void); +GsfOutput *gsf_output_gio_new (GFile *file); +GsfOutput *gsf_output_gio_new_for_path (char const *path, GError **err); +GsfOutput *gsf_output_gio_new_for_uri (char const *uri, GError **err); + +G_END_DECLS + +#endif /* GSF_OUTPUT_GIO_H */ diff --git a/gsf/gsf-output-gzip.c b/gsf/gsf-output-gzip.c new file mode 100644 index 0000000..299db31 --- /dev/null +++ b/gsf/gsf-output-gzip.c @@ -0,0 +1,404 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-gzip.c: wrapper to compress to gzipped output. See rfc1952. + * + * Copyright (C) 2002-2006 Jon K Hellan (hellan@acm.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +static GObjectClass *parent_class; + +struct _GsfOutputGZip { + GsfOutput output; + + GsfOutput *sink; /* compressed data */ + gboolean raw; /* No header and no trailer. */ + + z_stream stream; + uLong crc; /* crc32 of uncompressed data */ + size_t isize; + + guint8 *buf; + size_t buf_size; +}; + +typedef struct { + GsfOutputClass output_class; +} GsfOutputGZipClass; + +enum { + PROP_0, + PROP_RAW, + PROP_SINK +}; + + +/* gzip flag byte */ +#define GZIP_ORIGINAL_NAME 0x08 /* the original is stored */ + +static gboolean +init_gzip (GsfOutputGZip *gzip) +{ + int ret; + + ret = deflateInit2 (&gzip->stream, Z_DEFAULT_COMPRESSION, + Z_DEFLATED, -MAX_WBITS, MAX_MEM_LEVEL, + Z_DEFAULT_STRATEGY); + if (ret != Z_OK) + return FALSE; + + if (!gzip->buf) { + gzip->buf_size = 0x100; + gzip->buf = g_new (guint8, gzip->buf_size); + } + gzip->stream.next_out = gzip->buf; + gzip->stream.avail_out = gzip->buf_size; + + return TRUE; +} + +static gboolean +gzip_output_header (GsfOutputGZip *gzip) +{ + guint8 buf[3 + 1 + 4 + 2]; + static guint8 const gzip_signature[] = { 0x1f, 0x8b, 0x08 } ; + time_t mtime = time (NULL); + char const *name = gsf_output_name (gzip->sink); + /* FIXME: What to do about gz extension ... ? */ + int nlen = 0; /* name ? strlen (name) : 0; */ + gboolean ret; + + memset (buf, 0, sizeof buf); + memcpy (buf, gzip_signature, 3); + if (nlen > 0) + buf[3] = GZIP_ORIGINAL_NAME; + GSF_LE_SET_GUINT32 (buf + 4, (guint32) mtime); + buf[9] = 3; /* UNIX */ + ret = gsf_output_write (gzip->sink, sizeof buf, buf); + if (ret && name && nlen > 0) + ret = gsf_output_write (gzip->sink, nlen, name); + + return ret; +} + +/** + * gsf_output_gzip_new : + * @sink : The underlying data source. + * @err : optionally %NULL. + * + * Adds a reference to @sink. + * + * Returns: a new file or %NULL. + **/ +GsfOutput * +gsf_output_gzip_new (GsfOutput *sink, GError **err) +{ + GsfOutput *output; + GError const *con_err; + + g_return_val_if_fail (GSF_IS_OUTPUT (sink), NULL); + + output = g_object_new (GSF_OUTPUT_GZIP_TYPE, "sink", sink, NULL); + if (G_UNLIKELY (NULL == output)) return NULL; + + con_err = gsf_output_error (output); + + if (con_err) { + if (err) + *err = g_error_copy (con_err); + g_object_unref (output); + return NULL; + } + + return output; +} + +static void +gsf_output_gzip_finalize (GObject *obj) +{ + GsfOutputGZip *gzip = (GsfOutputGZip *)obj; + + if (gzip->sink != NULL) { + g_object_unref (G_OBJECT (gzip->sink)); + gzip->sink = NULL; + } + + g_free (gzip->buf); + + /* FIXME: check for error? */ + deflateEnd (&gzip->stream); + + parent_class->finalize (obj); +} + +static gboolean +gzip_output_block (GsfOutputGZip *gzip) +{ + size_t num_bytes = gzip->buf_size - gzip->stream.avail_out; + + if (!gsf_output_write (gzip->sink, num_bytes, gzip->buf)) { + gsf_output_set_error (GSF_OUTPUT (gzip), 0, + "Failed to write"); + return FALSE; + } + gzip->stream.next_out = gzip->buf; + gzip->stream.avail_out = gzip->buf_size; + + return TRUE; +} + +static gboolean +gzip_flush (GsfOutputGZip *gzip) +{ + int zret; + + do { + zret = deflate (&gzip->stream, Z_FINISH); + if (zret == Z_OK) { + /* In this case Z_OK means more buffer space + needed */ + if (!gzip_output_block (gzip)) + return FALSE; + } + } while (zret == Z_OK); + if (zret != Z_STREAM_END) { + gsf_output_set_error (GSF_OUTPUT (gzip), 0, + "Unexpected compression failure"); + g_warning ("Unexpected error code %d from zlib during compression.", + zret); + return FALSE; + } + if (!gzip_output_block (gzip)) + return FALSE; + + return TRUE; +} + +static gboolean +gsf_output_gzip_write (GsfOutput *output, + size_t num_bytes, guint8 const *data) +{ + GsfOutputGZip *gzip = GSF_OUTPUT_GZIP (output); + + g_return_val_if_fail (data, FALSE); + + gzip->stream.next_in = (unsigned char *) data; + gzip->stream.avail_in = num_bytes; + + while (gzip->stream.avail_in > 0) { + int zret; + if (gzip->stream.avail_out == 0) { + if (!gzip_output_block (gzip)) + return FALSE; + } + + zret = deflate (&gzip->stream, Z_NO_FLUSH); + if (zret != Z_OK) { + gsf_output_set_error (output, 0, + "Unexpected compression failure"); + g_warning ("Unexpected error code %d from zlib during compression.", + zret); + return FALSE; + } + } + + gzip->crc = crc32 (gzip->crc, data, num_bytes); + gzip->isize += num_bytes; + + if (gzip->stream.avail_out == 0) { + if (!gzip_output_block (gzip)) + return FALSE; + } + + return TRUE; +} + +static gboolean +gsf_output_gzip_seek (G_GNUC_UNUSED GsfOutput *output, + G_GNUC_UNUSED gsf_off_t offset, + G_GNUC_UNUSED GSeekType whence) +{ + return FALSE; +} + +static gboolean +gsf_output_gzip_close (GsfOutput *output) +{ + if (!gsf_output_error (output)) { + GsfOutputGZip *gzip = GSF_OUTPUT_GZIP (output); + + if (!gzip_flush (gzip)) + return FALSE; + + if (!gzip->raw) { + guint8 buf[8]; + + GSF_LE_SET_GUINT32 (buf, gzip->crc); + GSF_LE_SET_GUINT32 (buf + 4, gzip->isize); + if (!gsf_output_write (gzip->sink, 8, buf)) + return FALSE; + } + } + + return TRUE; +} + +static void +gsf_output_gzip_init (GObject *obj) +{ + GsfOutputGZip *gzip = GSF_OUTPUT_GZIP (obj); + + gzip->sink = NULL; + gzip->stream.zalloc = (alloc_func)0; + gzip->stream.zfree = (free_func)0; + gzip->stream.opaque = (voidpf)0; + gzip->stream.next_in = Z_NULL; + gzip->stream.next_out = Z_NULL; + gzip->stream.avail_in = gzip->stream.avail_out = 0; + gzip->crc = crc32 (0L, Z_NULL, 0); + gzip->isize = 0; + gzip->buf = NULL; + gzip->buf_size = 0; +} + +static void +gsf_output_gzip_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) +{ + GsfOutputGZip *gzip = (GsfOutputGZip *)object; + + switch (property_id) { + case PROP_RAW: + g_value_set_boolean (value, gzip->raw); + break; + case PROP_SINK: + g_value_set_object (value, gzip->sink); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gsf_output_gzip_set_sink (GsfOutputGZip *gzip, GsfOutput *sink) +{ + if (sink) + g_object_ref (GSF_OUTPUT (sink)); + if (gzip->sink) + g_object_unref (gzip->sink); + gzip->sink = sink; +} + +static void +gsf_output_gzip_set_property (GObject *object, + guint property_id, + GValue const *value, + GParamSpec *pspec) +{ + GsfOutputGZip *gzip = (GsfOutputGZip *)object; + + switch (property_id) { + case PROP_RAW: + gzip->raw = g_value_get_boolean (value); + break; + case PROP_SINK: + gsf_output_gzip_set_sink (gzip, g_value_get_object (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static GObject* +gsf_output_gzip_constructor (GType type, + guint n_construct_properties, + GObjectConstructParam *construct_params) +{ + GsfOutputGZip *gzip; + + gzip = (GsfOutputGZip *)(parent_class->constructor (type, + n_construct_properties, + construct_params)); + + if (!gzip->sink) + gsf_output_set_error (GSF_OUTPUT (gzip), + 0, + "NULL sink"); + else if (!init_gzip (gzip)) + gsf_output_set_error (GSF_OUTPUT (gzip), + 0, + "Failed to initialize zlib structure"); + else if (!gzip->raw && !gzip_output_header (gzip)) + gsf_output_set_error (GSF_OUTPUT (gzip), + 0, + "Failed to write gzip header"); + + return (GObject *)gzip; +} + +static void +gsf_output_gzip_class_init (GObjectClass *gobject_class) +{ + GsfOutputClass *output_class = GSF_OUTPUT_CLASS (gobject_class); + + gobject_class->constructor = gsf_output_gzip_constructor; + gobject_class->finalize = gsf_output_gzip_finalize; + gobject_class->set_property = gsf_output_gzip_set_property; + gobject_class->get_property = gsf_output_gzip_get_property; + output_class->Write = gsf_output_gzip_write; + output_class->Seek = gsf_output_gzip_seek; + output_class->Close = gsf_output_gzip_close; + + g_object_class_install_property + (gobject_class, + PROP_RAW, + g_param_spec_boolean ("raw", "Raw", + "Whether to write compressed data with no header/tailer.", + FALSE, + GSF_PARAM_STATIC | + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY)); + g_object_class_install_property + (gobject_class, + PROP_SINK, + g_param_spec_object ("sink", "Sink", + "Where the compressed data is written.", + GSF_OUTPUT_TYPE, + GSF_PARAM_STATIC | + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY)); + + parent_class = g_type_class_peek_parent (gobject_class); +} + +GSF_CLASS (GsfOutputGZip, gsf_output_gzip, + gsf_output_gzip_class_init, gsf_output_gzip_init, + GSF_OUTPUT_TYPE) diff --git a/gsf/gsf-output-gzip.h b/gsf/gsf-output-gzip.h new file mode 100644 index 0000000..ff4e9d5 --- /dev/null +++ b/gsf/gsf-output-gzip.h @@ -0,0 +1,42 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-gzip.h: wrapper to compress to gzipped output + * + * Copyright (C) 2002-2006 Jon K Hellan (hellan@acm.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_OUTPUT_GZIP_H +#define GSF_OUTPUT_GZIP_H + +#include + +G_BEGIN_DECLS + +#define GSF_OUTPUT_GZIP_TYPE (gsf_output_gzip_get_type ()) +#define GSF_OUTPUT_GZIP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTPUT_GZIP_TYPE, GsfOutputGZip)) +#define GSF_IS_OUTPUT_GZIP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTPUT_GZIP_TYPE)) + +typedef struct _GsfOutputGZip GsfOutputGZip; + +GType gsf_output_gzip_get_type (void) G_GNUC_CONST; +/* void gsf_output_gzip_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfOutput *gsf_output_gzip_new (GsfOutput *sink, GError **err); + +G_END_DECLS + +#endif /* GSF_OUTPUT_GZIP_H */ diff --git a/gsf/gsf-output-iconv.c b/gsf/gsf-output-iconv.c new file mode 100644 index 0000000..9b75085 --- /dev/null +++ b/gsf/gsf-output-iconv.c @@ -0,0 +1,321 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-iconv.c: wrapper to convert character sets. + * + * Copyright (C) 2005-2006 Morten Welinder (terra@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include +#include + +#define BUF_SIZE 0x400 + +static GObjectClass *parent_class; + +struct _GsfOutputIconv { + GsfOutput output; + + GsfOutput *sink; + char *input_charset; + char *output_charset; + char *fallback; + + guint8 *buf; + size_t buf_len; +}; + +enum { + PROP_0, + PROP_SINK, + PROP_INPUT_CHARSET, + PROP_OUTPUT_CHARSET, + PROP_FALLBACK +}; + +/** + * gsf_output_iconv_new : + * @sink : The underlying data source. + * @dst : The target character set. + * @src : The source character set. + * + * Adds a reference to @sink. + * + * Returns: a new GsfOutput object or %NULL. + **/ +GsfOutput * +gsf_output_iconv_new (GsfOutput *sink, char const *dst, char const *src) +{ + GError *error = NULL; + g_return_val_if_fail (GSF_IS_OUTPUT (sink), NULL); + + if (!dst) dst = "UTF-8"; + if (!src) src = "UTF-8"; + g_free (g_convert ("", 0, dst, src, NULL, NULL, &error)); + + if (error) { + g_error_free (error); + return NULL; + } + + return g_object_new (GSF_OUTPUT_ICONV_TYPE, + "sink", sink, + "input-charset", src, + "output-charset", dst, + NULL); +} + +static void +gsf_output_iconv_finalize (GObject *obj) +{ + GsfOutputIconv *ic = (GsfOutputIconv *)obj; + + if (ic->sink != NULL) + g_object_unref (G_OBJECT (ic->sink)); + g_free (ic->input_charset); + g_free (ic->output_charset); + g_free (ic->buf); + + parent_class->finalize (obj); +} + +static gboolean +iconv_flush (GsfOutputIconv *ic, gboolean must_empty) +{ + if (gsf_output_error (GSF_OUTPUT (ic))) + return FALSE; + + if (ic->buf_len > 0) { + gsize bytes_read, bytes_written; + gboolean ok; + char *data = g_convert_with_fallback (ic->buf, ic->buf_len, + ic->output_charset, + ic->input_charset, + ic->fallback, + &bytes_read, + &bytes_written, + NULL); + if (data == NULL || bytes_read <= 0) { + gsf_output_set_error (GSF_OUTPUT (ic), + 0, + "Failed to convert string"); + ok = FALSE; + } else { + ic->buf_len -= bytes_read; + g_memmove (ic->buf, ic->buf + bytes_read, ic->buf_len); + + ok = gsf_output_write (ic->sink, bytes_written, data); + if (!ok) { + gsf_output_set_error (GSF_OUTPUT (ic), + 0, + "Failed to write"); + } + } + + g_free (data); + return ok && (!must_empty || ic->buf_len == 0); + } else + return TRUE; +} + +static gboolean +gsf_output_iconv_write (GsfOutput *output, + size_t num_bytes, guint8 const *data) +{ + GsfOutputIconv *ic = GSF_OUTPUT_ICONV (output); + + g_return_val_if_fail (data, FALSE); + + while (num_bytes > 0) { + if (gsf_output_error (output)) + return FALSE; + if (ic->buf_len == BUF_SIZE) + iconv_flush (ic, FALSE); + else { + size_t count = MIN (BUF_SIZE - ic->buf_len, num_bytes); + memcpy (ic->buf + ic->buf_len, data, count); + ic->buf_len += count; + num_bytes -= count; + data += count; + } + } + + return TRUE; +} + +static gboolean +gsf_output_iconv_seek (G_GNUC_UNUSED GsfOutput *output, + G_GNUC_UNUSED gsf_off_t offset, + G_GNUC_UNUSED GSeekType whence) +{ + return FALSE; +} + +static gboolean +gsf_output_iconv_close (GsfOutput *output) +{ + if (!gsf_output_error (output)) { + GsfOutputIconv *ic = GSF_OUTPUT_ICONV (output); + + if (!iconv_flush (ic, TRUE)) + return FALSE; + } + + return TRUE; +} + +static void +gsf_output_iconv_init (GObject *obj) +{ + GsfOutputIconv *ic = GSF_OUTPUT_ICONV (obj); + + ic->buf = g_malloc (BUF_SIZE); + ic->buf_len = 0; +} + +static void +gsf_output_iconv_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) +{ + GsfOutputIconv *ic = (GsfOutputIconv *)object; + + switch (property_id) { + case PROP_SINK: + g_value_set_object (value, ic->sink); + break; + case PROP_INPUT_CHARSET: + g_value_set_string (value, ic->input_charset); + break; + case PROP_OUTPUT_CHARSET: + g_value_set_string (value, ic->output_charset); + break; + case PROP_FALLBACK: + g_value_set_string (value, ic->fallback); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gsf_output_iconv_set_sink (GsfOutputIconv *ic, GsfOutput *sink) +{ + g_return_if_fail (GSF_IS_OUTPUT (sink)); + g_object_ref (sink); + if (ic->sink) + g_object_unref (ic->sink); + ic->sink = sink; +} + +static void +gsf_output_iconv_set_property (GObject *object, + guint property_id, + GValue const *value, + GParamSpec *pspec) +{ + GsfOutputIconv *ic = (GsfOutputIconv *)object; + char *scopy; + + switch (property_id) { + case PROP_SINK: + gsf_output_iconv_set_sink (ic, g_value_get_object (value)); + break; + case PROP_INPUT_CHARSET: + ic->input_charset = g_strdup (g_value_get_string (value)); + break; + case PROP_OUTPUT_CHARSET: + ic->output_charset = g_strdup (g_value_get_string (value)); + break; + case PROP_FALLBACK: + scopy = g_strdup (g_value_get_string (value)); + g_free (ic->fallback); + ic->fallback = scopy; + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gsf_output_iconv_class_init (GObjectClass *gobject_class) +{ + GsfOutputClass *output_class = GSF_OUTPUT_CLASS (gobject_class); + + gobject_class->finalize = gsf_output_iconv_finalize; + gobject_class->set_property = gsf_output_iconv_set_property; + gobject_class->get_property = gsf_output_iconv_get_property; + output_class->Write = gsf_output_iconv_write; + output_class->Seek = gsf_output_iconv_seek; + output_class->Close = gsf_output_iconv_close; + + g_object_class_install_property + (gobject_class, + PROP_SINK, + g_param_spec_object ("sink", "Sink", + "Where the converted data is written.", + GSF_OUTPUT_TYPE, + GSF_PARAM_STATIC | + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY)); + g_object_class_install_property + (gobject_class, + PROP_INPUT_CHARSET, + g_param_spec_string ("input-charset", "Input Charset", + "The character set to convert from.", + "UTF-8", + GSF_PARAM_STATIC | + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY)); + g_object_class_install_property + (gobject_class, + PROP_OUTPUT_CHARSET, + g_param_spec_string ("output-charset", "Output Charset", + "The character set to convert to.", + "UTF-8", + GSF_PARAM_STATIC | + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY)); + /** + * GsfOutputIconv:fallback: + * + * Either NULL or a UTF-8 string (representable in the target encoding) + * to convert and output in place of characters that cannot be represented + * in the target encoding. NULL means use \u1234 or \U12345678 format. + */ + g_object_class_install_property + (gobject_class, + PROP_FALLBACK, + g_param_spec_string ("fallback", "Fallback", + "The string to use for invalid characters.", + NULL, + GSF_PARAM_STATIC | + G_PARAM_READWRITE)); + + parent_class = g_type_class_peek_parent (gobject_class); +} + +GSF_CLASS (GsfOutputIconv, gsf_output_iconv, + gsf_output_iconv_class_init, gsf_output_iconv_init, + GSF_OUTPUT_TYPE) diff --git a/gsf/gsf-output-iconv.h b/gsf/gsf-output-iconv.h new file mode 100644 index 0000000..a52e22b --- /dev/null +++ b/gsf/gsf-output-iconv.h @@ -0,0 +1,46 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-iconv.h: wrapper to convert character sets. + * + * Copyright (C) 2005-2006 Morten Welinder (terra@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_OUTPUT_ICONV_H +#define GSF_OUTPUT_ICONV_H + +#include + +G_BEGIN_DECLS + +typedef struct { + GsfOutputClass output_class; +} GsfOutputIconvClass; + +#define GSF_OUTPUT_ICONV_TYPE (gsf_output_iconv_get_type ()) +#define GSF_OUTPUT_ICONV(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTPUT_ICONV_TYPE, GsfOutputIconv)) +#define GSF_IS_OUTPUT_ICONV(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTPUT_ICONV_TYPE)) + +typedef struct _GsfOutputIconv GsfOutputIconv; + +GType gsf_output_iconv_get_type (void) G_GNUC_CONST; +/* void gsf_output_iconv_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfOutput *gsf_output_iconv_new (GsfOutput *sink, char const *dst, char const *src); + +G_END_DECLS + +#endif /* GSF_OUTPUT_ICONV_H */ diff --git a/gsf/gsf-output-impl.h b/gsf/gsf-output-impl.h new file mode 100644 index 0000000..b849626 --- /dev/null +++ b/gsf/gsf-output-impl.h @@ -0,0 +1,38 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-impl.h: interface for storing data + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_OUTPUT_IMPL_H +#define GSF_OUTPUT_IMPL_H + +#include +#include +#include + +G_BEGIN_DECLS + +/* protected */ +gboolean gsf_output_set_name (GsfOutput *output, char const *name); +gboolean gsf_output_set_name_from_filename (GsfOutput *output, char const *filename); +gboolean gsf_output_set_container (GsfOutput *output, GsfOutfile *container); + +G_END_DECLS + +#endif /* GSF_OUTPUT_IMPL_H */ diff --git a/gsf/gsf-output-iochannel.c b/gsf/gsf-output-iochannel.c new file mode 100644 index 0000000..09eae07 --- /dev/null +++ b/gsf/gsf-output-iochannel.c @@ -0,0 +1,133 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-iochannel.c + * + * Copyright (C) 2002-2006 Dom Lachowicz (cinamod@hotmail.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ +#include +#include +#include +#include + +static GsfOutputClass *parent_class; + +struct _GsfOutputIOChannel { + GsfOutput output; + GIOChannel * channel; +}; + +typedef struct { + GsfOutputClass output_class; +} GsfOutputIOChannelClass; + +/** + * gsf_output_iochannel_new : + * @channel: A #GIOChannel + * + * Returns: a new file or NULL. + **/ +GsfOutput * +gsf_output_iochannel_new (GIOChannel *channel) +{ + GsfOutputIOChannel *output = NULL; + + g_return_val_if_fail (channel != NULL, NULL); + + output = g_object_new (GSF_OUTPUT_IOCHANNEL_TYPE, NULL); + if (G_UNLIKELY (NULL == output)) return NULL; + + output->channel = channel; + return GSF_OUTPUT (output); +} + +static gboolean +gsf_output_iochannel_close (GsfOutput *output) +{ + g_io_channel_shutdown (GSF_OUTPUT_IOCHANNEL (output)->channel, TRUE, NULL); + + if (parent_class->Close) + parent_class->Close (output); + + return TRUE; +} + +static void +gsf_output_iochannel_finalize (GObject *obj) +{ + g_io_channel_unref (GSF_OUTPUT_IOCHANNEL (obj)->channel); + G_OBJECT_CLASS (parent_class)->finalize (obj); +} + +static gboolean +gsf_output_iochannel_seek (GsfOutput *output, gsf_off_t offset, + GSeekType whence) +{ + GsfOutputIOChannel *io = GSF_OUTPUT_IOCHANNEL (output); + GIOStatus status = G_IO_STATUS_NORMAL; + + status = g_io_channel_seek_position (io->channel, offset, whence, NULL); + if (status == G_IO_STATUS_NORMAL) + return TRUE; + + gsf_output_set_error (output, status, " "); + return FALSE; +} + +static gboolean +gsf_output_iochannel_write (GsfOutput *output, + size_t num_bytes, + guint8 const *buffer) +{ + GsfOutputIOChannel *io = GSF_OUTPUT_IOCHANNEL (output); + GIOStatus status = G_IO_STATUS_NORMAL; + size_t bytes_written = 0, total_written = 0; + + g_return_val_if_fail (io != NULL, FALSE); + + while ((status == G_IO_STATUS_NORMAL) && (total_written < num_bytes)) { + status = g_io_channel_write_chars (io->channel, (const gchar *)(buffer + total_written), + num_bytes - total_written, &bytes_written, NULL); + total_written += bytes_written; + } + + return (status == G_IO_STATUS_NORMAL && total_written == num_bytes); +} + +static void +gsf_output_iochannel_init (GObject *obj) +{ + GsfOutputIOChannel *io = GSF_OUTPUT_IOCHANNEL (obj); + + io->channel = NULL; +} + +static void +gsf_output_iochannel_class_init (GObjectClass *gobject_class) +{ + GsfOutputClass *output_class = GSF_OUTPUT_CLASS (gobject_class); + + gobject_class->finalize = gsf_output_iochannel_finalize; + output_class->Close = gsf_output_iochannel_close; + output_class->Seek = gsf_output_iochannel_seek; + output_class->Write = gsf_output_iochannel_write; + + parent_class = GSF_OUTPUT_CLASS (g_type_class_peek_parent (gobject_class)); +} + +GSF_CLASS (GsfOutputIOChannel, gsf_output_iochannel, + gsf_output_iochannel_class_init, gsf_output_iochannel_init, + GSF_OUTPUT_TYPE) diff --git a/gsf/gsf-output-iochannel.h b/gsf/gsf-output-iochannel.h new file mode 100644 index 0000000..5e92b4d --- /dev/null +++ b/gsf/gsf-output-iochannel.h @@ -0,0 +1,42 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-iochannel.h + * + * Copyright (C) 2002-2006 Dom Lachowicz (cinamod@hotmail.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_OUTPUT_IOCHANNEL_H +#define GSF_OUTPUT_IOCHANNEL_H + +#include + +G_BEGIN_DECLS + +#define GSF_OUTPUT_IOCHANNEL_TYPE (gsf_output_iochannel_get_type ()) +#define GSF_OUTPUT_IOCHANNEL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTPUT_IOCHANNEL_TYPE, GsfOutputIOChannel)) +#define GSF_IS_OUTPUT_IOCHANNEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTPUT_IOCHANNEL_TYPE)) + +typedef struct _GsfOutputIOChannel GsfOutputIOChannel; + +GType gsf_output_iochannel_get_type (void) G_GNUC_CONST; +/* void gsf_output_iochannel_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfOutput *gsf_output_iochannel_new (GIOChannel * channel); + +G_END_DECLS + +#endif /* GSF_OUTPUT_IOCHANNEL_H */ diff --git a/gsf/gsf-output-memory.c b/gsf/gsf-output-memory.c new file mode 100644 index 0000000..1338954 --- /dev/null +++ b/gsf/gsf-output-memory.c @@ -0,0 +1,203 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-memory.c: + * + * Copyright (C) 2002-2006 Dom Lachowicz (cinamod@hotmail.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ +#include +#include +#include +#include +#include + +#define MIN_BLOCK 512 +#define MAX_STEP (MIN_BLOCK * 128) + +static GsfOutputClass *parent_class; + +struct _GsfOutputMemory { + GsfOutput output; + guint8 *buffer; + size_t capacity; +}; + +typedef struct { + GsfOutputClass output_class; +} GsfOutputMemoryClass; + +/** + * gsf_output_memory_new : + * + * Returns: a new file or %NULL. + **/ +GsfOutput * +gsf_output_memory_new (void) +{ + return g_object_new (GSF_OUTPUT_MEMORY_TYPE, NULL); +} + +static gboolean +gsf_output_memory_close (GsfOutput *output) +{ + return (parent_class->Close == NULL) || + parent_class->Close (output); +} + +static void +gsf_output_memory_finalize (GObject *obj) +{ + GsfOutputMemory *mem = GSF_OUTPUT_MEMORY (obj); + + g_free (mem->buffer); + mem->buffer = NULL; + + G_OBJECT_CLASS (parent_class)->finalize (obj); +} + +static gboolean +gsf_output_memory_seek (G_GNUC_UNUSED GsfOutput *output, + G_GNUC_UNUSED gsf_off_t offset, + G_GNUC_UNUSED GSeekType whence) +{ + /* let parent implementation handle maneuvering cur_offset */ + return TRUE; +} + +static gboolean +gsf_output_memory_expand (GsfOutputMemory *mem, gsf_off_t needed) +{ + gsf_off_t capacity = MAX (mem->capacity, MIN_BLOCK); + gsize lcapacity; + + /* If we need >= MAX_STEP, align to a next multiple of MAX_STEP. + * Since MAX_STEP is probably a power of two, this computation + * should reduce to "dec, shr, inc, shl", which is probably + * quicker then branching. + */ + if (needed < MAX_STEP) + while (capacity < needed) + capacity *= 2; + else + capacity = ((needed - 1) / MAX_STEP + 1) * MAX_STEP; + + /* Check for overflow: g_renew() casts its parameters to gsize. */ + lcapacity = capacity; + if ((gsf_off_t) lcapacity != capacity || capacity < 0) { + g_warning ("overflow in gsf_output_memory_expand"); + return FALSE; + } + mem->buffer = g_renew (guint8, mem->buffer, lcapacity); + mem->capacity = capacity; + + return TRUE; +} + +static gboolean +gsf_output_memory_write (GsfOutput *output, + size_t num_bytes, + guint8 const *buffer) +{ + GsfOutputMemory *mem = GSF_OUTPUT_MEMORY (output); + + g_return_val_if_fail (mem != NULL, FALSE); + + if (!mem->buffer) { + mem->buffer = g_new (guint8, MIN_BLOCK); + mem->capacity = MIN_BLOCK; + } + if (num_bytes + output->cur_offset > mem->capacity) { + if (!gsf_output_memory_expand (mem, output->cur_offset + num_bytes)) + return FALSE; + } + + memcpy (mem->buffer + output->cur_offset, buffer, num_bytes); + return TRUE; +} + +static gsf_off_t gsf_output_memory_vprintf (GsfOutput *output, + char const *format, va_list args) G_GNUC_PRINTF (2, 0); + +static gsf_off_t +gsf_output_memory_vprintf (GsfOutput *output, char const *format, va_list args) +{ + GsfOutputMemory *mem = (GsfOutputMemory *)output; + + if (mem->buffer) { + va_list args2; + gsf_off_t len; + + /* + * We need to make a copy as args will become unusable after + * the g_vsnprintf call. + */ + G_VA_COPY (args2, args); + + len = g_vsnprintf (mem->buffer + output->cur_offset, + mem->capacity - output->cur_offset, + format, args); + + /* There was insufficient space */ + if (len >= (gsf_off_t)(mem->capacity - output->cur_offset)) + len = parent_class->Vprintf (output, format, args2); + + va_end (args2); + + return len; + } + return parent_class->Vprintf (output, format, args); +} + +static void +gsf_output_memory_init (GObject *obj) +{ + GsfOutputMemory *mem = GSF_OUTPUT_MEMORY (obj); + + mem->buffer = NULL; + mem->capacity = 0; +} + +static void +gsf_output_memory_class_init (GObjectClass *gobject_class) +{ + GsfOutputClass *output_class = GSF_OUTPUT_CLASS (gobject_class); + + gobject_class->finalize = gsf_output_memory_finalize; + output_class->Close = gsf_output_memory_close; + output_class->Seek = gsf_output_memory_seek; + output_class->Write = gsf_output_memory_write; + output_class->Vprintf = gsf_output_memory_vprintf; + + parent_class = GSF_OUTPUT_CLASS (g_type_class_peek_parent (gobject_class)); +} + +/** + * gsf_output_memory_get_bytes : + * @mem : the output device. + * + * Returns: The data that has been written to @mem, or %null + **/ +const guint8 * +gsf_output_memory_get_bytes (GsfOutputMemory * mem) +{ + g_return_val_if_fail (mem != NULL, NULL); + return mem->buffer; +} + +GSF_CLASS (GsfOutputMemory, gsf_output_memory, + gsf_output_memory_class_init, gsf_output_memory_init, + GSF_OUTPUT_TYPE) + diff --git a/gsf/gsf-output-memory.h b/gsf/gsf-output-memory.h new file mode 100644 index 0000000..7b5641f --- /dev/null +++ b/gsf/gsf-output-memory.h @@ -0,0 +1,43 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-memory.h + * + * Copyright (C) 2002-2006 Dom Lachowicz (cinamod@hotmail.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_OUTPUT_MEMORY_H +#define GSF_OUTPUT_MEMORY_H + +#include + +G_BEGIN_DECLS + +#define GSF_OUTPUT_MEMORY_TYPE (gsf_output_memory_get_type ()) +#define GSF_OUTPUT_MEMORY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTPUT_MEMORY_TYPE, GsfOutputMemory)) +#define GSF_IS_OUTPUT_MEMORY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTPUT_MEMORY_TYPE)) + +typedef struct _GsfOutputMemory GsfOutputMemory; + +GType gsf_output_memory_get_type (void) G_GNUC_CONST; +/* void gsf_output_memory_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfOutput *gsf_output_memory_new (void); +const guint8* gsf_output_memory_get_bytes (GsfOutputMemory * mem); + +G_END_DECLS + +#endif /* GSF_OUTPUT_MEMORY_H */ diff --git a/gsf/gsf-output-stdio.c b/gsf/gsf-output-stdio.c new file mode 100644 index 0000000..d40ba02 --- /dev/null +++ b/gsf/gsf-output-stdio.c @@ -0,0 +1,597 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-stdio.c: stdio based output + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#include +#ifdef HAVE_SYS_STATFS_H +#include +#endif + +#ifdef G_OS_WIN32 +#include +#include +#include +#ifdef HAVE_IO_H +#include +#endif +#endif /* G_OS_WIN32 */ + +#ifndef W_OK +#define W_OK 2 +#endif + +static GObjectClass *parent_class; + +struct _GsfOutputStdio { + GsfOutput output; + + FILE *file; + char *real_filename, *temp_filename; + gboolean create_backup_copy, keep_open; + struct stat st; +}; + +typedef struct { + GsfOutputClass output_class; +} GsfOutputStdioClass; + +static int +rename_wrapper (char const *oldfilename, char const *newfilename) +{ + int result = g_rename (oldfilename, newfilename); + if (!result) + goto done; + +#ifdef HAVE_SYS_STATFS_H +#ifdef HAVE_2ARG_STATFS + /* The FUSE file system does not unlink the target. */ + if (errno == EPERM) { + int save_errno = errno; + struct statfs buf; + if (statfs (newfilename, &buf) == 0 && + memcmp (&buf.f_type, "FUse", 4) == 0) + goto unlink_and_retry; + errno = save_errno; + } +#endif +#endif + +#ifdef G_OS_WIN32 + /* Win32's rename does not unlink the target. */ + goto unlink_and_retry; +#endif + +done: + return result; + +unlink_and_retry: + (void)g_unlink (newfilename); + result = g_rename (oldfilename, newfilename); + goto done; +} + +static int +chmod_wrapper (const char *filename, mode_t mode) +{ +#ifdef HAVE_G_CHMOD + return g_chmod (filename, mode); +#else + return chmod (filename, mode); +#endif +} + +static int +access_wrapper (char const *filename, int what) +{ +#ifdef HAVE_G_ACCESS + return g_access (filename, what); +#else + return access (filename, what); +#endif +} + +#define GSF_MAX_LINK_LEVEL 256 + +/* Calls g_file_read_link() until we find a real filename. */ +static char * +follow_symlinks (char const *filename, GError **error) +{ + gchar *followed_filename, *link; + gint link_count = 0; + + g_return_val_if_fail (filename != NULL, NULL); + + followed_filename = g_strdup (filename); + + while ((link = g_file_read_link (followed_filename, NULL)) != NULL && + ++link_count <= GSF_MAX_LINK_LEVEL) { + if (g_path_is_absolute (link)) { + g_free (followed_filename); + followed_filename = link; + } else { + /* If the linkname is not an absolute path name, append + * it to the directory name of the followed filename. E.g. + * we may have /foo/bar/baz.lnk -> eek.txt, which really + * is /foo/bar/eek.txt. */ + gchar *dir = g_path_get_dirname (followed_filename); + g_free (followed_filename); + followed_filename = g_build_filename (dir, link, NULL); + g_free (dir); + g_free (link); + } + } + + if (link == NULL) + return followed_filename; + + /* Too many symlinks */ + if (error != NULL) { +#ifdef ELOOP + int err = ELOOP; +#else + /* We have links, but not ELOOP. Very strange. */ + int err = EINVAL; +#endif + *error = g_error_new_literal (gsf_output_error_id (), err, + g_strerror (err)); + } + g_free (followed_filename); + return NULL; +} + +static gboolean +close_file_helper (GsfOutputStdio *stdio, gboolean seterr) +{ + gboolean res = (0 == fclose (stdio->file)); + stdio->file = NULL; + if (!res && seterr) + gsf_output_set_error (GSF_OUTPUT (stdio), errno, + "Failed to close file: %s", + g_strerror (errno)); + return res; +} + +static gboolean +unlink_file_helper (GsfOutputStdio *stdio) +{ + if (!stdio->temp_filename) + return TRUE; + + if (g_unlink (stdio->temp_filename) == 0) { + g_free (stdio->temp_filename); + stdio->temp_filename = NULL; + return TRUE; + } + + return FALSE; +} + +static gboolean +gsf_output_stdio_close (GsfOutput *output) +{ + GsfOutputStdio *stdio = GSF_OUTPUT_STDIO (output); + gboolean res; + char *backup_filename = NULL; + + if (stdio->file == NULL) + return FALSE; + + if (gsf_output_error (output)) { + res = TRUE; + if (!stdio->keep_open && !close_file_helper (stdio, FALSE)) + res = FALSE; + + if (!unlink_file_helper (stdio)) + res = FALSE; + + return res; + } + + if (stdio->keep_open) { + gboolean res = (0 == fflush (stdio->file)); + if (!res) + gsf_output_set_error (output, errno, + "Failed to flush."); + stdio->file = NULL; + return res; + } + + res = close_file_helper (stdio, TRUE); + + /* short circuit our when dealing with raw FILE */ + if (!stdio->real_filename) + return res; + if (!res) { + unlink_file_helper (stdio); + return FALSE; + } + + /* Move the original file to a backup */ + if (stdio->create_backup_copy) { + gint result; + backup_filename = g_strconcat (stdio->real_filename, ".bak", NULL); + result = rename_wrapper (stdio->real_filename, backup_filename); + if (result != 0) { + char *utf8name = g_filename_display_name (backup_filename); + gsf_output_set_error (output, errno, + "Could not backup the original as %s.", + utf8name); + g_free (utf8name); + g_free (backup_filename); + g_unlink (stdio->temp_filename); + return FALSE; + } + } + + /* Move the temp file to the original file */ + if (rename_wrapper (stdio->temp_filename, stdio->real_filename) != 0) { + gint saved_errno = errno; + if (backup_filename != NULL && + rename_wrapper (backup_filename, stdio->real_filename) != 0) + saved_errno = errno; + res = gsf_output_set_error (output, + saved_errno, + "%s", g_strerror (saved_errno)); + } else { + /* Restore permissions. There is not much error checking we + * can do here, I'm afraid. The final data is saved anyways. + * Note the order: mode, uid+gid, gid, uid, mode. + */ + chmod_wrapper (stdio->real_filename, stdio->st.st_mode); +#ifdef HAVE_CHOWN + if (chown (stdio->real_filename, + stdio->st.st_uid, + stdio->st.st_gid)) { + /* We cannot set both. Maybe we can set one. */ + chown (stdio->real_filename, -1, stdio->st.st_gid); + chown (stdio->real_filename, stdio->st.st_uid, -1); + } + chmod_wrapper (stdio->real_filename, stdio->st.st_mode); +#endif + } + + g_free (backup_filename); + + return res; +} + +static void +gsf_output_stdio_finalize (GObject *obj) +{ + GsfOutput *output = (GsfOutput *)obj; + GsfOutputStdio *stdio = GSF_OUTPUT_STDIO (output); + + if (!gsf_output_is_closed (output)) + gsf_output_close (output); + + g_free (stdio->real_filename); + stdio->real_filename = NULL; + g_free (stdio->temp_filename); + stdio->temp_filename = NULL; + + parent_class->finalize (obj); +} + +static gboolean +gsf_output_stdio_seek (GsfOutput *output, gsf_off_t offset, GSeekType whence) +{ + GsfOutputStdio const *stdio = GSF_OUTPUT_STDIO (output); + int stdio_whence = 0; /* make compiler shut up */ + +#ifndef HAVE_FSEEKO + long loffset; +#else + off_t loffset; +#endif + + g_return_val_if_fail (stdio->file != NULL, + gsf_output_set_error (output, 0, "missing file")); + + loffset = offset; + if ((gsf_off_t) loffset != offset) { /* Check for overflow */ +#ifdef HAVE_FSEEKO + g_warning ("offset too large for fseeko"); + return gsf_output_set_error (output, 0, "offset too large for fseeko"); +#else + g_warning ("offset too large for fseek"); + return gsf_output_set_error (output, 0, "offset too large for fseek"); +#endif + } + switch (whence) { + default : ; /*checked in GsfOutput wrapper */ + case G_SEEK_SET : stdio_whence = SEEK_SET; break; + case G_SEEK_CUR : stdio_whence = SEEK_CUR; break; + case G_SEEK_END : stdio_whence = SEEK_END; break; + } + + errno = 0; +#ifdef HAVE_FSEEKO + if (0 == fseeko (stdio->file, loffset, stdio_whence)) + return TRUE; +#else + if (0 == fseek (stdio->file, loffset, stdio_whence)) + return TRUE; +#endif + return gsf_output_set_error (output, errno, "%s", g_strerror (errno)); +} + +static gboolean +gsf_output_stdio_write (GsfOutput *output, + size_t num_bytes, + guint8 const *buffer) +{ + GsfOutputStdio *stdio = GSF_OUTPUT_STDIO (output); + size_t written, remaining; + + g_return_val_if_fail (stdio != NULL, FALSE); + g_return_val_if_fail (stdio->file != NULL, FALSE); + + remaining = num_bytes; + + while (remaining > 0) { + written = fwrite (buffer + (num_bytes - remaining), 1, + remaining, stdio->file); + if ((written < remaining) && ferror (stdio->file) != 0) + return gsf_output_set_error (output, errno, "%s", g_strerror (errno)); + + remaining -= written; + } + return TRUE; +} + +static gsf_off_t gsf_output_stdio_vprintf (GsfOutput *output, + char const *fmt, va_list args) G_GNUC_PRINTF (2, 0); + +static gsf_off_t +gsf_output_stdio_vprintf (GsfOutput *output, char const *fmt, va_list args) +{ + return vfprintf (((GsfOutputStdio *)output)->file, fmt, args); +} + +static void +gsf_output_stdio_init (GObject *obj) +{ + GsfOutputStdio *stdio = GSF_OUTPUT_STDIO (obj); + + stdio->file = NULL; + stdio->create_backup_copy = FALSE; + stdio->keep_open = FALSE; +} + +static void +gsf_output_stdio_class_init (GObjectClass *gobject_class) +{ + GsfOutputClass *output_class = GSF_OUTPUT_CLASS (gobject_class); + + gobject_class->finalize = gsf_output_stdio_finalize; + output_class->Close = gsf_output_stdio_close; + output_class->Seek = gsf_output_stdio_seek; + output_class->Write = gsf_output_stdio_write; + output_class->Vprintf = gsf_output_stdio_vprintf; + + parent_class = g_type_class_peek_parent (gobject_class); +} + +GSF_CLASS (GsfOutputStdio, gsf_output_stdio, + gsf_output_stdio_class_init, gsf_output_stdio_init, + GSF_OUTPUT_TYPE) + +GsfOutput * +gsf_output_stdio_new_valist (char const *filename, GError **err, + char const *first_property_name, + va_list var_args) +{ + GsfOutputStdio *stdio; + FILE *file = NULL; + char *dirname = NULL; + char *temp_filename = NULL; + char *real_filename = follow_symlinks (filename, err); + int fd; + mode_t saved_umask; + struct stat st; + gboolean fixup_mode = FALSE; + + if (real_filename == NULL) + goto failure; + + /* Get the directory in which the real filename lives */ + dirname = g_path_get_dirname (real_filename); + + if (g_stat (real_filename, &st) == 0) { + if (!S_ISREG (st.st_mode)) { + if (err != NULL) { + char *dname = g_filename_display_name + (real_filename); + *err = g_error_new (gsf_output_error_id (), 0, + "%s: Is not a regular file", + dname); + g_free (dname); + } + goto failure; + } + + /* FIXME? Race conditions en masse. */ + if (access_wrapper (real_filename, W_OK) == -1) { + if (err != NULL) { + int save_errno = errno; + char *dname = g_filename_display_name + (real_filename); + *err = g_error_new + (gsf_output_error_id (), errno, + "%s: %s", + dname, g_strerror (save_errno)); + g_free (dname); + } + goto failure; + } + } else { + /* + * File does not exist. Compute the permissions and uid/gid + * that we will use for the newly-created file. + */ + + memset (&st, 0, sizeof (st)); + + /* Use default permissions */ + st.st_mode = 0666; fixup_mode = TRUE; +#ifdef HAVE_CHOWN + { + struct stat dir_st; + + st.st_uid = getuid (); + + if (g_stat (dirname, &dir_st) == 0 && + S_ISDIR (dir_st.st_mode) && + (dir_st.st_mode & S_ISGID)) + st.st_gid = dir_st.st_gid; + else + st.st_gid = getgid (); + } +#endif + } + + /* Save to a temporary file. We set the umask because some (buggy) + * implementations of mkstemp() use permissions 0666 and we want 0600. + */ + temp_filename = g_build_filename (dirname, ".gsf-save-XXXXXX", NULL); + /* Oh, joy. What about threads? --MW */ + saved_umask = umask (0077); + fd = g_mkstemp (temp_filename); /* this modifies temp_filename to the used name */ + umask (saved_umask); + + if (fixup_mode) + st.st_mode &= ~saved_umask; + + if (fd < 0 || NULL == (file = fdopen (fd, "wb"))) { + if (err != NULL) { + int save_errno = errno; + char *dname = g_filename_display_name + (temp_filename); + *err = g_error_new + (gsf_output_error_id (), errno, + "%s: %s", + dname, g_strerror (save_errno)); + g_free (dname); + } + goto failure; + } + + stdio = (GsfOutputStdio *)g_object_new_valist (GSF_OUTPUT_STDIO_TYPE, + first_property_name, var_args); + stdio->file = file; + stdio->st = st; + stdio->create_backup_copy = FALSE; + stdio->real_filename = real_filename; + stdio->temp_filename = temp_filename; + + gsf_output_set_name_from_filename (GSF_OUTPUT (stdio), filename); + + g_free (dirname); + + return GSF_OUTPUT (stdio); + + failure: + g_free (temp_filename); + g_free (real_filename); + g_free (dirname); + return NULL; +} + +/** + * gsf_output_stdio_new_full : + * @filename : name of file to create or replace. + * @err : optionally %NULL. + * @first_property_name : %NULL terminated list of properties + * @Varargs : + * + * Returns: a new file or %NULL. + **/ +GsfOutput * +gsf_output_stdio_new_full (char const *filename, GError **err, + char const *first_property_name, ...) +{ + GsfOutput *res; + va_list var_args; + + va_start (var_args, first_property_name); + res = gsf_output_stdio_new_valist (filename, err, first_property_name, var_args); + va_end (var_args); + + return res; +} + +/** + * gsf_output_stdio_new : + * @filename : name of file to create or replace. + * @err : optionally %NULL. + * + * Returns: a new file or %NULL. + **/ +GsfOutput * +gsf_output_stdio_new (char const *filename, GError **err) +{ + return gsf_output_stdio_new_full (filename, err, NULL); +} + +/** + * gsf_output_stdio_new_FILE : + * @filename : The filename corresponding to @file. + * @file : an existing stdio FILE * + * @keep_open : Should @file be closed when the wrapper is closed + * + * Assumes ownership of @file. If @keep_open is true, ownership reverts + * to caller when the GsfObject is closed. + * + * Returns: a new GsfOutput wrapper for @file. Warning: the result will be + * seekable only if @file is seekable. If it is seekable, the resulting + * GsfOutput object will seek relative to @file's beginning, not its + * current location at the time the GsfOutput object is created. + **/ +GsfOutput * +gsf_output_stdio_new_FILE (char const *filename, FILE *file, gboolean keep_open) +{ + GsfOutputStdio *stdio; + + g_return_val_if_fail (filename != NULL, NULL); + g_return_val_if_fail (file != NULL, NULL); + + stdio = g_object_new (GSF_OUTPUT_STDIO_TYPE, NULL); + if (G_UNLIKELY (NULL == stdio)) return NULL; + + stdio->file = file; + stdio->keep_open = keep_open; + stdio->real_filename = stdio->temp_filename = NULL; + gsf_output_set_name_from_filename (GSF_OUTPUT (stdio), filename); + return GSF_OUTPUT (stdio); +} diff --git a/gsf/gsf-output-stdio.h b/gsf/gsf-output-stdio.h new file mode 100644 index 0000000..9e188b7 --- /dev/null +++ b/gsf/gsf-output-stdio.h @@ -0,0 +1,51 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output-stdio.h: stdio based output + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_OUTPUT_STDIO_H +#define GSF_OUTPUT_STDIO_H + +#include +#include + +G_BEGIN_DECLS + +#define GSF_OUTPUT_STDIO_TYPE (gsf_output_stdio_get_type ()) +#define GSF_OUTPUT_STDIO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTPUT_STDIO_TYPE, GsfOutputStdio)) +#define GSF_IS_OUTPUT_STDIO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTPUT_STDIO_TYPE)) + +typedef struct _GsfOutputStdio GsfOutputStdio; + +GType gsf_output_stdio_get_type (void) G_GNUC_CONST; +/* void gsf_output_stdio_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfOutput *gsf_output_stdio_new (char const *filename, GError **err); +GsfOutput *gsf_output_stdio_new_full (char const *filename, GError **err, + char const *first_property_name, + ...); /* G_GNUC_NULL_TERMINATED */ +GsfOutput *gsf_output_stdio_new_valist (char const *filename, GError **err, + char const *first_property_name, + va_list var_args); +GsfOutput *gsf_output_stdio_new_FILE (char const *filename, FILE *file, + gboolean keep_open); + +G_END_DECLS + +#endif /* GSF_OUTPUT_STDIO_H */ diff --git a/gsf/gsf-output.c b/gsf/gsf-output.c new file mode 100644 index 0000000..1550d1a --- /dev/null +++ b/gsf/gsf-output.c @@ -0,0 +1,643 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output.c: interface for storing data + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include + +static gsf_off_t gsf_output_real_vprintf (GsfOutput *output, + char const* format, va_list args) G_GNUC_PRINTF (2, 0); + +#define GET_CLASS(instance) G_TYPE_INSTANCE_GET_CLASS (instance, GSF_OUTPUT_TYPE, GsfOutputClass) + +static GObjectClass *parent_class; + +enum { + PROP_0, + PROP_NAME, + PROP_SIZE, + PROP_CLOSED, + PROP_POS +}; + +static void +gsf_output_set_property (GObject *object, + guint property_id, + G_GNUC_UNUSED GValue const *value, + GParamSpec *pspec) +{ + switch (property_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gsf_output_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) +{ + /* gsf_off_t is typedef'd to gint64 */ + switch (property_id) { + case PROP_NAME: + g_value_set_string (value, gsf_output_name (GSF_OUTPUT (object))); + break; + case PROP_SIZE: + g_value_set_int64 (value, gsf_output_size (GSF_OUTPUT (object))); + break; + case PROP_POS: + g_value_set_int64 (value, gsf_output_tell (GSF_OUTPUT (object))); + break; + case PROP_CLOSED: + g_value_set_boolean (value, gsf_output_is_closed (GSF_OUTPUT (object))); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gsf_output_dispose (GObject *obj) +{ + GsfOutput *output = GSF_OUTPUT (obj); + + if (!output->is_closed) { + /* g_warning ("Disposing of an unclosed stream"); */ + gsf_output_close (output); + } + + g_free (output->name); + output->name = NULL; + g_free (output->printf_buf); + output->printf_buf = NULL; + + g_clear_error (&output->err); + + if (output->container != NULL) { + g_object_unref (G_OBJECT (output->container)); + output->container = NULL; + } + + G_OBJECT_CLASS (parent_class)->dispose (obj); +} + +static void +gsf_output_init (GObject *obj) +{ + GsfOutput *output = GSF_OUTPUT (obj); + + output->cur_offset = 0; + output->cur_size = 0; + output->name = NULL; + output->wrapped_by = NULL; + output->container = NULL; + output->err = NULL; + output->is_closed = FALSE; + output->printf_buf = NULL; + output->printf_buf_size = 0; +} + +static void +gsf_output_class_init (GObjectClass *gobject_class) +{ + GsfOutputClass *output_class = GSF_OUTPUT_CLASS (gobject_class); + + gobject_class->dispose = gsf_output_dispose; + gobject_class->set_property = gsf_output_set_property; + gobject_class->get_property = gsf_output_get_property; + output_class->Vprintf = gsf_output_real_vprintf; + + parent_class = g_type_class_peek_parent (gobject_class); + + g_object_class_install_property (gobject_class, + PROP_NAME, + g_param_spec_string ("name", "Name", + "The Output's Name", + NULL, + GSF_PARAM_STATIC | + G_PARAM_READABLE)); + g_object_class_install_property (gobject_class, + PROP_SIZE, + g_param_spec_int64 ("size", "Size", + "The Output's Size", + 0, G_MAXINT64, 0, + GSF_PARAM_STATIC | + G_PARAM_READABLE)); + g_object_class_install_property (gobject_class, + PROP_POS, + g_param_spec_int64 ("position", "Position", + "The Output's Current Position", + 0, G_MAXINT64, 0, + GSF_PARAM_STATIC | + G_PARAM_READABLE)); + g_object_class_install_property (gobject_class, + PROP_CLOSED, + g_param_spec_boolean ("is-closed", "Is Closed", + "Whether the Output is Closed", + FALSE, + GSF_PARAM_STATIC | + G_PARAM_READABLE)); +} + +GSF_CLASS_ABSTRACT (GsfOutput, gsf_output, + gsf_output_class_init, gsf_output_init, + G_TYPE_OBJECT) + +/** + * gsf_output_name : + * @output: #GsfOutput + * + * Give the name of @output. + * + * Returns: @output's name in utf8 form, DO NOT FREE THIS STRING + **/ +char const * +gsf_output_name (GsfOutput const *output) +{ + g_return_val_if_fail (GSF_IS_OUTPUT (output), NULL); + return output->name; +} + +/** + * gsf_output_container : + * @output : + * + * Returns: but does not add a reference to @output's container. + * Potentially %NULL + **/ +GsfOutfile * +gsf_output_container (GsfOutput const *output) +{ + g_return_val_if_fail (GSF_IS_OUTPUT (output), NULL); + return output->container; +} + +/** + * gsf_output_size : + * @output: #GsfOutput + * + * Determine the size of the output stream @output. + * + * Returns: the size of the output, or -1 if it does not have a size. + **/ +gsf_off_t +gsf_output_size (GsfOutput *output) +{ + g_return_val_if_fail (GSF_IS_OUTPUT (output), -1); + return output->cur_size; +} + +/** + * gsf_output_close : + * @output: #GsfOutput + * + * Close a stream. + * + * Returns: %FALSE on error + **/ +gboolean +gsf_output_close (GsfOutput *output) +{ + gboolean res; + + g_return_val_if_fail (GSF_IS_OUTPUT (output), + gsf_output_set_error (output, 0, "")); + g_return_val_if_fail (!output->is_closed, + gsf_output_set_error (output, 0, "")); + + /* The implementation will log any errors, but we can never try to + * close multiple times even on failure. + */ + res = GET_CLASS (output)->Close (output); + output->is_closed = TRUE; + return res; +} + +/** + * gsf_output_is_closed : + * @output: #GsfOutput + * + * Returns: %TRUE if @output has already been closed. + **/ +gboolean +gsf_output_is_closed (GsfOutput const *output) +{ + g_return_val_if_fail (GSF_IS_OUTPUT (output), TRUE); + return output->is_closed; +} + +/** + * gsf_output_tell : + * @output : #GsfOutput + * + * Tell the current position in @output, similar to + * ftell + * 3. + * + * Returns: the current position in the file + **/ +gsf_off_t +gsf_output_tell (GsfOutput *output) +{ + g_return_val_if_fail (output != NULL, 0); + + return output->cur_offset; +} + +/** + * gsf_output_seek : + * @output : #GsfOutput + * @offset : Relative amount to reposition + * @whence : What the offset is relative to. + * + * Reposition in output stream @output. @whence specifies what the offset is + * relative to: the beginning of the stream (%G_SEEK_SET), current position in + * the stream (%G_SEEK_CUR) or the end of the stream (%G_SEEK_END). + * This function is similar to + * fseek + * 3. + * + * Returns: %FALSE on error. + **/ +gboolean +gsf_output_seek (GsfOutput *output, gsf_off_t offset, GSeekType whence) +{ + gsf_off_t pos = offset; + + g_return_val_if_fail (output != NULL, FALSE); + + switch (whence) { + case G_SEEK_SET: break; + case G_SEEK_CUR: pos += output->cur_offset; break; + case G_SEEK_END: pos += output->cur_size; break; + default : + g_warning ("Invalid seek type %d", (int)whence); + return FALSE; + } + + if (pos < 0) { + g_warning ("Invalid seek position %" GSF_OFF_T_FORMAT + ", which is before the start of the file", pos); + return FALSE; + } + + /* If we go nowhere, just return. This in particular handles null + * seeks for streams with no seek method. + */ + if (pos == output->cur_offset) + return TRUE; + + if (GET_CLASS (output)->Seek (output, offset, whence)) { + /* NOTE : it is possible for the current pos to be beyond the + * end of the file. The intervening space is not filled with 0 + * until something is written. + */ + output->cur_offset = pos; + return TRUE; + } + + /* the implementation should have assigned whatever errors are necessary */ + return FALSE; +} + +static inline gboolean +gsf_output_inc_cur_offset (GsfOutput *output, gsf_off_t num_bytes) +{ + output->cur_offset += num_bytes; + if (output->cur_offset < num_bytes) + return gsf_output_set_error (output, 0, "Output size overflow."); + if (output->cur_size < output->cur_offset) + output->cur_size = output->cur_offset; + return TRUE; +} + +/** + * gsf_output_write : + * @output : Output stream + * @num_bytes : Number of bytes to write + * @data : Data to write. + * + * Write @num_bytes of @data to @output. + * + * Returns: %FALSE on error. + **/ +gboolean +gsf_output_write (GsfOutput *output, + size_t num_bytes, guint8 const *data) +{ + g_return_val_if_fail (output != NULL, FALSE); + + if (num_bytes == 0) + return TRUE; + if (GET_CLASS (output)->Write (output, num_bytes, data)) + return gsf_output_inc_cur_offset (output, num_bytes); + + /* the implementation should have assigned whatever errors are necessary */ + return FALSE; +} + +/** + * gsf_output_error : + * @output: + * + * Returns: the last error logged on the output, or %NULL. + **/ +GError const * +gsf_output_error (GsfOutput const *output) +{ + g_return_val_if_fail (GSF_IS_OUTPUT (output), NULL); + return output->err; +} + +/** + * gsf_output_set_name : + * @output: #GsfOutput + * @name: the new name + * + * This is a utility routine that should only be used by derived + * outputs. + * + * Returns: %TRUE if the assignment was ok. + **/ +gboolean +gsf_output_set_name (GsfOutput *output, char const *name) +{ + char *buf; + + g_return_val_if_fail (GSF_IS_OUTPUT (output), FALSE); + + buf = g_strdup (name); + g_free (output->name); + output->name = buf; + return TRUE; +} + +/** + * gsf_output_set_name_from_filename : + * @output : the output stream + * @filename : the (fs-sys encoded) filename + * + * This is a utility routine that should only be used by derived + * outputs. + * + * Returns: %TRUE if the assignment was ok. + **/ +gboolean +gsf_output_set_name_from_filename (GsfOutput *output, char const *filename) +{ + g_return_val_if_fail (GSF_IS_OUTPUT (output), FALSE); + + g_free (output->name); + output->name = filename + ? g_filename_to_utf8 (filename, -1, NULL, NULL, NULL) + : NULL; + return TRUE; +} + +/** + * gsf_output_set_container : + * @output: #GsfOutput + * @container: #GsfOutfile + * + * This is a utility routine that should only be used by derived + * outputs. + * + * Returns: %TRUE if the assignment was ok. + **/ +gboolean +gsf_output_set_container (GsfOutput *output, GsfOutfile *container) +{ + g_return_val_if_fail (GSF_IS_OUTPUT (output), FALSE); + + if (container != NULL) + g_object_ref (G_OBJECT (container)); + if (output->container != NULL) + g_object_unref (G_OBJECT (output->container)); + output->container = container; + return TRUE; +} + +/** + * gsf_output_set_error : + * @output: #GsfOutput + * @code: The error id + * @format: printf style format string + * @Varargs: arguments for @format + * + * This is a utility routine that should only be used by derived + * outputs. + * + * Returns: Always returns %FALSE to facilitate its use. + **/ +gboolean +gsf_output_set_error (GsfOutput *output, + gint code, + char const *format, + ...) +{ + g_return_val_if_fail (GSF_IS_OUTPUT (output), FALSE); + + g_clear_error (&output->err); + + if (format != NULL) { + char *message; + va_list args; + + va_start (args, format); + message = g_strdup_vprintf (format, args); + va_end (args); + + output->err = g_error_new_literal (gsf_output_error_id (), + code, + message); + g_free (message); + } + + return FALSE; +} + +static void +cb_output_unwrap (GsfOutput *wrapee, G_GNUC_UNUSED GObject *wrapper) +{ + wrapee->wrapped_by = NULL; +} + +/** + * gsf_output_wrap : + * @wrapper: + * @wrapee: + * + * Returns: %TRUE if the wrapping succeeded. + **/ +gboolean +gsf_output_wrap (GObject *wrapper, GsfOutput *wrapee) +{ + g_return_val_if_fail (wrapper != NULL, FALSE); + g_return_val_if_fail (wrapee != NULL, FALSE); + + if (wrapee->wrapped_by != NULL) { + g_warning ("Attempt to wrap an output that is already wrapped."); + return FALSE; + } + + g_object_weak_ref (G_OBJECT (wrapper), + (GWeakNotify) cb_output_unwrap, wrapee); + wrapee->wrapped_by = wrapper; + return TRUE; +} + +/** + * gsf_output_unwrap : + * @wrapper: + * @wrapee: + * + * Returns: %TRUE if the unwrapping succeeded. + **/ +gboolean +gsf_output_unwrap (GObject *wrapper, GsfOutput *wrapee) +{ + g_return_val_if_fail (wrapee != NULL, FALSE); + g_return_val_if_fail (wrapee->wrapped_by == wrapper, FALSE); + + wrapee->wrapped_by = NULL; + g_object_weak_unref (G_OBJECT (wrapper), + (GWeakNotify) cb_output_unwrap, wrapee); + return TRUE; +} + +GQuark +gsf_output_error_id (void) +{ + static GQuark quark; + if (!quark) + quark = g_quark_from_static_string ("gsf_output_error"); + return quark; +} + +/** + * gsf_output_printf : + * @output : A #GsfOutput + * @format : The printf-style format string + * @Varargs : the arguments for @format + * + * Output @Varargs to @output using the format string @format, similar to + * printf + * 3. + * + * Returns: %TRUE if successful, %FALSE if not + **/ +gboolean +gsf_output_printf (GsfOutput *output, char const *format, ...) +{ + va_list args; + gboolean res; + + va_start (args, format); + res = (gsf_output_vprintf (output, format, args) >= 0); + va_end (args); + return res; +} + +/** + * gsf_output_vprintf : + * @output : A #GsfOutput + * @format : The printf-style format string + * @args : the arguments for @format + * + * Output @args to @output using the format string @format, similar to + * vprintf + * 3. + * + * Returns: number of bytes printed, a negative value if not successful + **/ +gsf_off_t +gsf_output_vprintf (GsfOutput *output, char const *format, va_list args) +{ + gsf_off_t num_bytes; + + g_return_val_if_fail (output != NULL, -1); + g_return_val_if_fail (format != NULL, -1); + /* g_return_val_if_fail (strlen (format) > 0, -1); -- Why? */ + + num_bytes = GET_CLASS (output)->Vprintf (output, format, args); + + if (num_bytes >= 0) + if (!gsf_output_inc_cur_offset (output, num_bytes)) + return -1; + return num_bytes; +} + +static gsf_off_t +gsf_output_real_vprintf (GsfOutput *output, char const *fmt, va_list args) +{ + gsf_off_t reslen; + va_list args2; + + /* + * We need to make a copy as args will become unusable after + * the g_vsnprintf call. + */ + G_VA_COPY (args2, args); + + if (NULL == output->printf_buf) { + output->printf_buf_size = 128; + output->printf_buf = g_new (char, output->printf_buf_size); + } + reslen = g_vsnprintf (output->printf_buf, output->printf_buf_size, fmt, args); + + /* handle C99 or older -1 case of vsnprintf */ + if (reslen < 0 || reslen >= output->printf_buf_size) { + g_free (output->printf_buf); + output->printf_buf = g_strdup_vprintf (fmt, args2); + reslen = output->printf_buf_size = strlen (output->printf_buf); + } + va_end (args2); + + if (reslen == 0 || + GET_CLASS (output)->Write (output, reslen, output->printf_buf)) + return reslen; + + return -1; +} + +/** + * gsf_output_puts: + * @output: A #GsfOutput + * @line: %null terminated string to write + * + * Like fputs, this assumes that the line already ends with a newline + * + * Returns: %TRUE if successful, %FALSE if not + **/ +gboolean +gsf_output_puts (GsfOutput *output, char const *line) +{ + size_t nbytes = 0; + + g_return_val_if_fail (line != NULL, FALSE); + + nbytes = strlen (line); + return gsf_output_write (output, nbytes, line); +} diff --git a/gsf/gsf-output.h b/gsf/gsf-output.h new file mode 100644 index 0000000..2b7f829 --- /dev/null +++ b/gsf/gsf-output.h @@ -0,0 +1,98 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-output.h: interface for storing data + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_OUTPUT_H +#define GSF_OUTPUT_H + +#include +#include +#include + +G_BEGIN_DECLS + +typedef struct { + GObjectClass g_object_class; + + gboolean (*Close) (GsfOutput *output); + gboolean (*Seek) (GsfOutput *output, + gsf_off_t offset, GSeekType whence); + gboolean (*Write) (GsfOutput *output, + size_t num_bytes, guint8 const *data); + gsf_off_t (*Vprintf) (GsfOutput *output, + char const *format, va_list args) + G_GNUC_PRINTF (2, 0); +} GsfOutputClass; +#define GSF_OUTPUT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSF_OUTPUT_TYPE, GsfOutputClass)) +#define GSF_IS_OUTPUT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSF_OUTPUT_TYPE)) + +struct _GsfOutput { + GObject g_object; + + /*< protected >*/ + gsf_off_t cur_size, cur_offset; + char *name; + GObject *wrapped_by; + GsfOutfile *container; + GError *err; + gboolean is_closed; + + char *printf_buf; + int printf_buf_size; +}; +#define GSF_OUTPUT_TYPE (gsf_output_get_type ()) +#define GSF_OUTPUT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTPUT_TYPE, GsfOutput)) +#define GSF_IS_OUTPUT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTPUT_TYPE)) + +GType gsf_output_get_type (void) G_GNUC_CONST; +/* void gsf_output_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +char const *gsf_output_name (GsfOutput const *output); +GsfOutfile *gsf_output_container (GsfOutput const *output); + +GError const *gsf_output_error (GsfOutput const *output); +gboolean gsf_output_set_error (GsfOutput *output, + gint code, + char const *format, + ...) G_GNUC_PRINTF (3, 4); + +gsf_off_t gsf_output_size (GsfOutput *output); +gboolean gsf_output_close (GsfOutput *output); +gboolean gsf_output_is_closed (GsfOutput const *output); +gsf_off_t gsf_output_tell (GsfOutput *output); +gboolean gsf_output_seek (GsfOutput *output, + gsf_off_t offset, GSeekType whence); +gboolean gsf_output_write (GsfOutput *output, + size_t num_bytes, guint8 const *data); + +gboolean gsf_output_wrap (GObject *wrapper, GsfOutput *wrapee); +gboolean gsf_output_unwrap (GObject *wrapper, GsfOutput *wrapee); + +GQuark gsf_output_error_id (void); + +gboolean gsf_output_printf (GsfOutput *output, char const *format, + ...) G_GNUC_PRINTF (2, 3); +gsf_off_t gsf_output_vprintf (GsfOutput *output, char const *format, + va_list args) G_GNUC_PRINTF (2, 0); +gboolean gsf_output_puts (GsfOutput *output, char const *line); + +G_END_DECLS + +#endif /* GSF_OUTPUT_H */ diff --git a/gsf/gsf-shared-memory.c b/gsf/gsf-shared-memory.c new file mode 100644 index 0000000..4057ab5 --- /dev/null +++ b/gsf/gsf-shared-memory.c @@ -0,0 +1,109 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-shared-memory.c: + * + * Copyright (C) 2002-2006 Morten Welinder (terra@diku.dk) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include + +#ifdef HAVE_MMAP +#include +#include +#elif defined(G_OS_WIN32) +#include +#endif + +typedef struct { + GObjectClass g_object_class; +} GsfSharedMemoryClass; + +static GObjectClass *parent_class; + +GsfSharedMemory * +gsf_shared_memory_new (void *buf, gsf_off_t size, gboolean needs_free) +{ + GsfSharedMemory *mem = g_object_new (GSF_SHARED_MEMORY_TYPE, NULL); + if (G_UNLIKELY (NULL == mem)) return NULL; + + mem->buf = buf; + mem->size = size; + mem->needs_free = needs_free; + mem->needs_unmap = FALSE; + return mem; +} + +GsfSharedMemory * +gsf_shared_memory_mmapped_new (void *buf, gsf_off_t size) +{ +#if defined(HAVE_MMAP) || defined(G_OS_WIN32) + size_t msize = size; + if ((gsf_off_t)msize != size) { + g_warning ("memory buffer size too large"); + return NULL; + } else { + GsfSharedMemory *mem = gsf_shared_memory_new (buf, size, FALSE); + mem->needs_unmap = TRUE; + return mem; + } +#else + return NULL; +#endif +} + +static void +gsf_shared_memory_finalize (GObject *obj) +{ + GsfSharedMemory *mem = (GsfSharedMemory *) (obj); + + if (mem->buf != NULL) { + if (mem->needs_free) + g_free (mem->buf); + else if (mem->needs_unmap) { +#ifdef HAVE_MMAP + munmap (mem->buf, mem->size); +#elif defined(G_OS_WIN32) + UnmapViewOfFile (mem->buf); +#else + g_assert_not_reached (); +#endif + } + } + + G_OBJECT_CLASS (parent_class)->finalize (obj); +} + +static void +gsf_shared_memory_init (GObject *obj) +{ + GsfSharedMemory *mem = (GsfSharedMemory *) (obj); + mem->buf = NULL; +} + +static void +gsf_shared_memory_class_init (GObjectClass *gobject_class) +{ + parent_class = g_type_class_peek_parent (gobject_class); + + gobject_class->finalize = gsf_shared_memory_finalize; +} + +GSF_CLASS (GsfSharedMemory, gsf_shared_memory, + gsf_shared_memory_class_init, gsf_shared_memory_init, + G_TYPE_OBJECT) diff --git a/gsf/gsf-shared-memory.h b/gsf/gsf-shared-memory.h new file mode 100644 index 0000000..d2c446a --- /dev/null +++ b/gsf/gsf-shared-memory.h @@ -0,0 +1,52 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-shared-memory.h + * + * Copyright (C) 2002-2006 Morten Welinder (terra@diku.dk) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_SHARED_MEMORY_H +#define GSF_SHARED_MEMORY_H + +#include +#include + +G_BEGIN_DECLS + +#define GSF_SHARED_MEMORY_TYPE (gsf_shared_memory_get_type ()) +#define GSF_SHARED_MEMORY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_SHARED_MEMORY_TYPE, GsfSharedMemory)) +#define GSF_IS_SHARED_MEMORY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_SHARED_MEMORY_TYPE)) + +typedef struct _GsfSharedMemory GsfSharedMemory; +struct _GsfSharedMemory { + GObject g_object; + void *buf; + gsf_off_t size; + + gboolean needs_free; + gboolean needs_unmap; +}; + +GType gsf_shared_memory_get_type (void) G_GNUC_CONST; +/* void gsf_shared_memory_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfSharedMemory *gsf_shared_memory_new (void *buf, gsf_off_t size, gboolean needs_free); +GsfSharedMemory *gsf_shared_memory_mmapped_new (void *buf, gsf_off_t size); + +G_END_DECLS + +#endif /* GSF_SHARED_MEMORY_H */ diff --git a/gsf/gsf-structured-blob.c b/gsf/gsf-structured-blob.c new file mode 100644 index 0000000..4277e7b --- /dev/null +++ b/gsf/gsf-structured-blob.c @@ -0,0 +1,303 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-structured_blob.c : Utility storage to blob in/out a tree of data + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static GObjectClass *parent_class; + +struct _GsfStructuredBlob { + GsfInfile base; + + GsfSharedMemory *data; + GPtrArray *children; +}; +typedef struct { + GsfInfileClass base; +} GsfStructuredBlobClass; + +static void +blob_finalize (GObject *obj) +{ + unsigned i; + GsfStructuredBlob *blob = GSF_STRUCTURED_BLOB (obj); + + if (blob->data != NULL) { + g_object_unref (G_OBJECT (blob->data)); + blob->data = NULL; + } + + if (blob->children != NULL) { + for (i = 0; i < blob->children->len ; i++) + g_object_unref (g_ptr_array_index (blob->children, i)); + g_ptr_array_free (blob->children, TRUE); + blob->children = NULL; + } + + parent_class->finalize (obj); +} + +static GsfInput * +blob_dup (GsfInput *input, G_GNUC_UNUSED GError **err) +{ + GsfStructuredBlob const *src = (GsfStructuredBlob *) input; + GsfStructuredBlob *dst = g_object_new (GSF_STRUCTURED_BLOB_TYPE, NULL); + if (G_UNLIKELY (NULL == dst)) return NULL; + + if (src->data != NULL) { + dst->data = src->data; + g_object_ref (G_OBJECT (dst->data)); + } + if (src->children != NULL) { + unsigned i; + gpointer child; + + dst->children = g_ptr_array_sized_new (src->children->len); + g_ptr_array_set_size (dst->children, src->children->len); + for (i = 0; i < src->children->len ; i++) { + child = g_ptr_array_index (src->children, i); + g_ptr_array_index (dst->children, i) = child; + g_object_ref (child); + } + } + + return GSF_INPUT (dst); +} + +static guint8 const * +blob_read (GsfInput *input, size_t num_bytes, guint8 *optional_buffer) +{ + GsfStructuredBlob *blob = (GsfStructuredBlob *) input; + guchar const *src = blob->data->buf; + + if (src == NULL) + return NULL; + if (optional_buffer) { + memcpy (optional_buffer, src + input->cur_offset, num_bytes); + return optional_buffer; + } else + return src + input->cur_offset; +} + +static gboolean +blob_seek (G_GNUC_UNUSED GsfInput *input, + G_GNUC_UNUSED gsf_off_t offset, + G_GNUC_UNUSED GSeekType whence) +{ + return FALSE; +} + +static int +blob_num_children (GsfInfile *infile) +{ + GsfStructuredBlob const *blob = (GsfStructuredBlob *) infile; + + if (blob->children != NULL) + return blob->children->len; + return -1; +} + +static char const * +blob_name_by_index (GsfInfile *infile, int i) +{ + GsfStructuredBlob const *blob = (GsfStructuredBlob *) infile; + if (blob->children != NULL) { + g_return_val_if_fail (i < 0 || (unsigned)i >= blob->children->len, NULL); + return gsf_input_name (g_ptr_array_index (blob->children, i)); + } + return NULL; +} + +static GsfInput * +blob_child_by_index (GsfInfile *infile, int i, GError **err) +{ + GsfStructuredBlob const *blob = (GsfStructuredBlob *) infile; + if (blob->children != NULL) { + g_return_val_if_fail (i < 0 || (unsigned)i >= blob->children->len, NULL); + return gsf_input_dup (g_ptr_array_index (blob->children, i), err); + } + return NULL; +} + +static GsfInput * +blob_child_by_name (GsfInfile *infile, char const *name, GError **err) +{ + GsfStructuredBlob const *blob = (GsfStructuredBlob *) infile; + if (blob->children != NULL) { + unsigned i; + GsfInput *child; + + for (i = 0 ; i < blob->children->len ;) { + child = g_ptr_array_index (blob->children, i); + if (!strcmp (gsf_input_name (child), name)) + return gsf_input_dup (child, err); + } + } + return NULL; +} + +static void +gsf_structured_blob_init (GObject *obj) +{ + GsfStructuredBlob *blob = GSF_STRUCTURED_BLOB (obj); + + blob->data = NULL; + blob->children = NULL; +} + +static void +gsf_structured_blob_class_init (GObjectClass *gobject_class) +{ + GsfInputClass *input_class = GSF_INPUT_CLASS (gobject_class); + GsfInfileClass *infile_class = GSF_INFILE_CLASS (gobject_class); + + gobject_class->finalize = blob_finalize; + input_class->Dup = blob_dup; + input_class->Read = blob_read; + input_class->Seek = blob_seek; + infile_class->num_children = blob_num_children; + infile_class->name_by_index = blob_name_by_index; + infile_class->child_by_index = blob_child_by_index; + infile_class->child_by_name = blob_child_by_name; + + parent_class = g_type_class_peek_parent (gobject_class); +} + +GSF_CLASS (GsfStructuredBlob, gsf_structured_blob, + gsf_structured_blob_class_init, gsf_structured_blob_init, + GSF_INFILE_TYPE) + +/** + * gsf_structured_blob_read : + * @input: An input (potentially a GsfInfile) holding the blob + * + * Create a tree of binary blobs with unknown content from a #GsfInput or + * #GsfInfile and store it in a newly created #GsfStructuredBlob. + * + * Returns: a new #GsfStructuredBlob object which the caller is responsible for. + **/ +GsfStructuredBlob * +gsf_structured_blob_read (GsfInput *input) +{ + GsfStructuredBlob *blob; + gsf_off_t content_size; + int i = 0; + + g_return_val_if_fail (GSF_IS_INPUT (input), NULL); + + blob = g_object_new (GSF_STRUCTURED_BLOB_TYPE, NULL); + if (G_UNLIKELY (NULL == blob)) return NULL; + + content_size = gsf_input_remaining (input); + if (content_size > 0) { + guint8 *buf = (guint8*)g_try_malloc (content_size); + + if (buf == NULL) { + g_warning ("Failed attempting to allocate %" GSF_OFF_T_FORMAT " bytes", + content_size); + + g_object_unref (G_OBJECT (blob)); + return NULL; + } + + gsf_input_read (input, content_size, buf); + blob->data = gsf_shared_memory_new (buf, content_size, TRUE); + } + + gsf_input_set_name (GSF_INPUT (blob), gsf_input_name (input)); + + if (GSF_IS_INFILE (input)) + i = gsf_infile_num_children (GSF_INFILE (input)); + if (i > 0) { + GsfInput *child; + GsfStructuredBlob *child_blob; + + blob->children = g_ptr_array_sized_new (i); + g_ptr_array_set_size (blob->children, i); + while (i-- > 0) { + child = gsf_infile_child_by_index (GSF_INFILE (input), i); + child_blob = gsf_structured_blob_read (child); + g_object_unref (G_OBJECT (child)); + + g_ptr_array_index (blob->children, i) = child_blob; +#if 0 + /* + * We don't need this, and setting it causes circular + * links. + */ + gsf_input_set_container (GSF_INPUT (child_blob), + GSF_INFILE (blob)); +#endif + } + } + + return blob; +} + +/** + * gsf_structured_blob_write : + * @blob: #GsfStructuredBlob + * @container: #GsfOutfile + * + * Dumps structured blob @blob onto the @container. Will fail if the output is + * not an Outfile and blob has multiple streams. + * + * Returns: %TRUE on success. + **/ +gboolean +gsf_structured_blob_write (GsfStructuredBlob *blob, GsfOutfile *container) +{ + GsfOutput *output; + gboolean has_kids; + + g_return_val_if_fail (GSF_IS_STRUCTURED_BLOB (blob), FALSE); + g_return_val_if_fail (GSF_IS_OUTFILE (container), FALSE); + + has_kids = (blob->children != NULL && blob->children->len > 0); + + output = gsf_outfile_new_child (GSF_OUTFILE (container), + gsf_input_name (GSF_INPUT (blob)), + has_kids); + if (has_kids) { + GsfStructuredBlob *child_blob; + unsigned i; + + for (i = 0 ; i < blob->children->len ; i++) { + child_blob = g_ptr_array_index (blob->children, i); + if (!gsf_structured_blob_write (child_blob, GSF_OUTFILE (output))) + return FALSE; + } + } + + if (blob->data != NULL) + gsf_output_write (output, blob->data->size, blob->data->buf); + gsf_output_close (output); + g_object_unref (G_OBJECT (output)); + + return TRUE; +} diff --git a/gsf/gsf-structured-blob.h b/gsf/gsf-structured-blob.h new file mode 100644 index 0000000..8aed27e --- /dev/null +++ b/gsf/gsf-structured-blob.h @@ -0,0 +1,46 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-structured-blob.h: Utility storage to blob in/out a tree of data + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_STRUCTURED_BLOB_H +#define GSF_STRUCTURED_BLOB_H + +#include +#include + +G_BEGIN_DECLS + +#define GSF_STRUCTURED_BLOB_TYPE (gsf_structured_blob_get_type ()) +#define GSF_STRUCTURED_BLOB(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_STRUCTURED_BLOB_TYPE, GsfStructuredBlob)) +#define GSF_IS_STRUCTURED_BLOB(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_STRUCTURED_BLOB_TYPE)) + +typedef struct _GsfStructuredBlob GsfStructuredBlob; + +/* inherits from GsfInfile */ +GType gsf_structured_blob_get_type (void) G_GNUC_CONST; +/* void gsf_structured_blob_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfStructuredBlob *gsf_structured_blob_read (GsfInput *input); +gboolean gsf_structured_blob_write (GsfStructuredBlob *blob, + GsfOutfile *container); + +G_END_DECLS + +#endif /* GSF_STRUCTURED_BLOB_H */ diff --git a/gsf/gsf-timestamp.c b/gsf/gsf-timestamp.c new file mode 100644 index 0000000..f9dc081 --- /dev/null +++ b/gsf/gsf-timestamp.c @@ -0,0 +1,246 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-timestamp.c: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#ifdef G_OS_WIN32 +#include +#endif + +static void +timestamp_to_string (GValue const *src_value, GValue *dest_value) +{ + char *str = gsf_timestamp_as_string (g_value_get_boxed (src_value)); + g_value_set_string (dest_value, str); + g_free (str); +} + +GType +gsf_timestamp_get_type (void) +{ + static GType our_type = 0; + + if (our_type == 0) { + our_type = g_boxed_type_register_static ("GsfTimestamp", + (GBoxedCopyFunc)gsf_timestamp_copy, + (GBoxedFreeFunc)gsf_timestamp_free); + g_value_register_transform_func (our_type, G_TYPE_STRING, + ×tamp_to_string); + } + return our_type; +} + +GsfTimestamp * +gsf_timestamp_new (void) +{ + GsfTimestamp *res = g_new0 (GsfTimestamp, 1); + res->timet = -1; + return res; +} + +/** + * gsf_timestamp_copy: + * @stamp: timestamp to be copied + * + * Copies a timestamp. + * + * Returns: a separate copy of @stamp. + */ +GsfTimestamp * +gsf_timestamp_copy (GsfTimestamp const *stamp) +{ + GsfTimestamp *res = gsf_timestamp_new (); + res->timet = stamp->timet; + return res; +} + +/** + * gsf_timestamp_free : + * @stamp : timestamp to be freed + * + * Releases the memory in use for @stamp (if any). + **/ +void +gsf_timestamp_free (GsfTimestamp *stamp) +{ + g_free (stamp); +} + +#if defined(HAVE_STRUCT_TM_TM_GMTOFF) +#define GMTOFF(t) ((t).tm_gmtoff) +#elif defined(HAVE_STRUCT_TM___TM_GMTOFF) +#define GMTOFF(t) ((t).__tm_gmtoff) +#elif defined(G_OS_WIN32) +#define GMTOFF(t) (gmt_to_local_win32()) +#else +/* FIXME: work out the offset anyway. */ +#define GMTOFF(t) (0) +#endif + +#ifdef G_OS_WIN32 +static time_t gmt_to_local_win32(void) +{ + TIME_ZONE_INFORMATION tzinfo; + DWORD dwStandardDaylight; + long bias; + + dwStandardDaylight = GetTimeZoneInformation(&tzinfo); + bias = tzinfo.Bias; + + if (dwStandardDaylight == TIME_ZONE_ID_STANDARD) + bias += tzinfo.StandardBias; + + if (dwStandardDaylight == TIME_ZONE_ID_DAYLIGHT) + bias += tzinfo.DaylightBias; + + return (- bias * 60); +} +#endif + +/** + * gsf_timestamp_from_string : + * @spec : The string to parse + * @stamp : #GsfTimestamp + * + * Very simple parser for time stamps. Currently requires a format of + * 'YYYY-MM-DDThh:mm:ss' + * and does no bounds checking. + * + * Since: 1.14.12 + * + * Returns: %TRUE on success + **/ +int +gsf_timestamp_from_string (char const *spec, GsfTimestamp *stamp) +{ + struct tm tm; + + memset (&tm, 0, sizeof (struct tm)); + + /* 'YYYY-MM-DDThh:mm:ss' */ + if (6 == sscanf (spec, "%d-%d-%dT%d:%d:%d", + &tm.tm_year, &tm.tm_mon, &tm.tm_mday, + &tm.tm_hour, &tm.tm_min, &tm.tm_sec)) { + time_t t; + + tm.tm_mon--; /* 0..11 */ + + /* err on the side of avoiding negatives */ + if (tm.tm_year >= 1900) + tm.tm_year -= 1900; + + t = mktime (&tm); + if (t == -1) + return FALSE; + + stamp->timet = t + GMTOFF(tm); + return TRUE; + } + return FALSE; +} + +/** + * gsf_timestamp_parse : + * @spec : The string to parse + * @stamp : #GsfTimestamp + * + * Very simple parser for time stamps. Currently requires a format of + * 'YYYY-MM-DDThh:mm:ss' + * and does no bounds checking. + * + * Deprecated : Use gsf_timestamp_from_string + * + * Returns: %TRUE on success + **/ +int +gsf_timestamp_parse (char const *spec, GsfTimestamp *stamp) +{ + return gsf_timestamp_from_string (spec, stamp); +} + +/** + * gsf_timestamp_as_string : + * @stamp: timestamp to be converted. + * + * Produce a string representation (ISO 8601 format) of @stamp. + * + * Returns: a string representation of @stamp. When @stamp is %NULL, the + * representation is "<invalid>". + */ +char * +gsf_timestamp_as_string (GsfTimestamp const *stamp) +{ + time_t t; + struct tm tm; + + g_return_val_if_fail (stamp != NULL, g_strdup ("")); + + t = stamp->timet; /* Use an honest time_t for gmtime_r. */ +#ifdef HAVE_GMTIME_R + gmtime_r (&t, &tm); +#else + /* -NOT- thread-safe */ + tm = *gmtime (&t); +#endif + + + /* using 'YYYY-MM-DDThh:mm:ss' */ + return g_strdup_printf ("%4d-%02d-%02dT%02d:%02d:%02dZ", + tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday, + tm.tm_hour, tm.tm_min, tm.tm_sec); +} + +guint +gsf_timestamp_hash (GsfTimestamp const *stamp) +{ + return stamp->timet; +} + +/** + * gsf_timestamp_equal : + * @a: a timestamp + * @b: another timestamp + * + * Compare timestamps @a and @b. + * + * Returns: true if @a and @b represent the same point in time; false otherwise. + * + **/ +gboolean +gsf_timestamp_equal (GsfTimestamp const *a, GsfTimestamp const *b) +{ + return a->timet == b->timet; +} + +void +gsf_value_set_timestamp (GValue *value, GsfTimestamp const *stamp) +{ + g_value_set_boxed (value, stamp); +} + +void +gsf_timestamp_set_time (GsfTimestamp *stamp, guint64 t) +{ + stamp->timet = t; +} diff --git a/gsf/gsf-timestamp.h b/gsf/gsf-timestamp.h new file mode 100644 index 0000000..060e0e6 --- /dev/null +++ b/gsf/gsf-timestamp.h @@ -0,0 +1,64 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-timestamp.h: A useful little type for metadata, contains a superset of + * all the features it would be nice to have. + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_TIMESTAMP_H +#define GSF_TIMESTAMP_H + +#include +#include + +G_BEGIN_DECLS + +#define GSF_TIMESTAMP_TYPE (gsf_timestamp_get_type ()) +#define VAL_IS_GSF_TIMESTAMP(v) (G_TYPE_CHECK_VALUE_TYPE((v), GSF_TIMESTAMP_TYPE)) + +struct _GsfTimestamp { + GDate date; /* In local timezone */ + glong seconds; /* time of day */ + GString time_zone; /* possibly blank */ + + guint32 timet; +}; + +GType gsf_timestamp_get_type (void) G_GNUC_CONST; +/* void gsf_timestamp_register_type (GTypeModule *module); glib dynamic types are not thread safe */ + +GsfTimestamp *gsf_timestamp_new (void); + +GsfTimestamp *gsf_timestamp_copy (GsfTimestamp const *stamp); +void gsf_timestamp_free (GsfTimestamp *stamp); +int gsf_timestamp_from_string (char const *spec, GsfTimestamp *stamp); +char *gsf_timestamp_as_string (GsfTimestamp const *stamp); +guint gsf_timestamp_hash (GsfTimestamp const *stamp); +gboolean gsf_timestamp_equal (GsfTimestamp const *a, + GsfTimestamp const *b); + +void gsf_timestamp_set_time (GsfTimestamp *stamp, guint64 t); + +void gsf_value_set_timestamp (GValue *value, GsfTimestamp const *stamp); + +/* Deprecated */ +int gsf_timestamp_parse (char const *spec, GsfTimestamp *stamp); + +G_END_DECLS + +#endif /* GSF_TIMESTAMP_H */ diff --git a/gsf/gsf-utils.c b/gsf/gsf-utils.c new file mode 100644 index 0000000..d7a7247 --- /dev/null +++ b/gsf/gsf-utils.c @@ -0,0 +1,1071 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-utils.c: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +/* + * Glib gets this wrong, really. ARM's floating point format is a weird + * mixture. + */ +#define G_ARMFLOAT_ENDIAN 56781234 +#if defined(__arm__) && !defined(__ARM_EABI__) && (G_BYTE_ORDER == G_LITTLE_ENDIAN) +#define G_FLOAT_BYTE_ORDER G_ARMFLOAT_ENDIAN +#else +#define G_FLOAT_BYTE_ORDER G_BYTE_ORDER +#endif + +gboolean +gsf_debug_flag (const char *flag) +{ + GDebugKey key; + key.key = (char *)flag; + key.value = 1; + + return g_parse_debug_string (g_getenv ("GSF_DEBUG"), &key, 1) != 0; +} + + +#ifndef HAVE_G_BASE64_ENCODE +static void base64_init (void); +#endif + +#ifdef _GSF_GTYPE_THREADING_FIXED +typedef GTypeModule GsfDummyTypeModule; +typedef GTypeModuleClass GsfDummyTypeModuleClass; +static gboolean +gsf_dummy_type_module_load (GTypeModule *module) +{ + gsf_init_dynamic (module); + return TRUE; +} +static void +gsf_dummy_type_module_class_init (GTypeModuleClass *gtm_class) +{ + gtm_class->load = gsf_dummy_type_module_load; +} +static GSF_CLASS (GsfDummyTypeModule, gsf_dummy_type_module, + gsf_dummy_type_module_class_init, NULL, + G_TYPE_TYPE_MODULE) + +static GTypeModule *static_type_module = NULL; +#endif + +#ifdef G_OS_WIN32 +#include +static HMODULE gsf_dll_hmodule; +BOOL WINAPI +DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved); +BOOL WINAPI +DllMain (HINSTANCE hinstDLL, DWORD fdwReason, G_GNUC_UNUSED LPVOID lpvReserved) +{ + if (fdwReason == DLL_PROCESS_ATTACH) gsf_dll_hmodule = hinstDLL; + return TRUE; +} +#endif + +/** + * gsf_init : + * + * Initializes the GSF library + **/ +void +gsf_init (void) +{ + static gboolean libgsf_initialized = FALSE; + if (libgsf_initialized) + return; + +#ifdef ENABLE_NLS +#ifdef G_OS_WIN32 + { + char *pkg_dir = g_win32_get_package_installation_directory_of_module (gsf_dll_hmodule); + gchar *locale_dir = g_build_filename (pkg_dir, "lib/locale", NULL); + bindtextdomain (GETTEXT_PACKAGE, locale_dir); + g_free (locale_dir); + g_free (pkg_dir); + } +#else + bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); +#endif + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); +#endif + + g_type_init (); +#ifndef HAVE_G_BASE64_ENCODE + base64_init (); +#endif + +#ifdef _GSF_GTYPE_THREADING_FIXED + if (NULL == static_type_module) { + static_type_module = g_object_new (gsf_dummy_type_module_get_type(), NULL); + g_assert (static_type_module != NULL); + g_type_module_use (static_type_module); + g_type_module_set_name (static_type_module, "libgsf-builtin"); + } +#else + gsf_init_dynamic (NULL); +#endif + + { + /* Little-endian representation of M_PI. */ + static guint8 pibytes[8] = { + 0x18, 0x2d, 0x44, 0x54, 0xfb, 0x21, 0x09, 0x40 + }; + + /* + * If this fails, see + * http://bugzilla.gnome.org/show_bug.cgi?id=350973 + */ + double pi = gsf_le_get_double (pibytes); + if (!(pi > 3.14 && pi < 3.15)) + g_error ("Compilation trouble with endianess."); + } +} + +/** + * gsf_shutdown: + * + * De-intializes the GSF library + * Currently does nothing. + **/ +void +gsf_shutdown (void) +{ +} + +#ifdef _GSF_GTYPE_THREADING_FIXED +#define REGISTER(prefix) \ + do { \ + prefix ## _register_type (module); \ + types = g_slist_prepend (types, \ + g_type_class_ref (prefix ## _get_type())); \ + } while (0) +#else +/* Assign the value to avoid compiler warnings */ +#define REGISTER(prefix) t = prefix ## _get_type() +#endif + +/** + * gsf_init_dynamic : + * @module : #GTypeModule. + * + * Initializes the GSF library and associates it with a type module @mod. + **/ +void +gsf_init_dynamic (GTypeModule *module) +{ +#ifndef _GSF_GTYPE_THREADING_FIXED + GType t; + if (NULL != module) { + g_warning ("glib's support of dynamic types is not thread safe.\n" + "Support for gsf_init_dynamic has been disabled until that is fixed"); + } +#endif + REGISTER (gsf_input); + REGISTER (gsf_input_gzip); + REGISTER (gsf_input_http); + REGISTER (gsf_input_memory); + REGISTER (gsf_input_proxy); + REGISTER (gsf_input_stdio); + REGISTER (gsf_input_textline); + + REGISTER (gsf_infile); + REGISTER (gsf_infile_msole); + REGISTER (gsf_infile_msvba); + REGISTER (gsf_infile_stdio); + REGISTER (gsf_infile_zip); + + REGISTER (gsf_output); + REGISTER (gsf_output_bzip); + REGISTER (gsf_output_csv_quoting_mode); + REGISTER (gsf_output_csv); + REGISTER (gsf_output_gzip); + REGISTER (gsf_output_iconv); + REGISTER (gsf_output_iochannel); + REGISTER (gsf_output_memory); + REGISTER (gsf_output_stdio); + + REGISTER (gsf_outfile); + REGISTER (gsf_outfile_msole); + REGISTER (gsf_outfile_stdio); + REGISTER (gsf_outfile_zip); + REGISTER (gsf_outfile_open_pkg); + + REGISTER (gsf_shared_memory); + REGISTER (gsf_structured_blob); + REGISTER (gsf_xml_out); + REGISTER (gsf_blob); + REGISTER (gsf_clip_data); + REGISTER (gsf_doc_meta_data); + REGISTER (gsf_docprop_vector); +} + +/** + * gsf_shutdown: + * + * De-intializes the GSF library from a type module. + * Currently does nothing. + **/ +void +gsf_shutdown_dynamic (G_GNUC_UNUSED GTypeModule *module) +{ +} + +static void +gsf_mem_dump_full (guint8 const *ptr, size_t len, gsf_off_t offset) +{ + static const char hexdigit[16] = "0123456789abcdef"; + + while (len > 0) { + char hexpart[3 * 16 + 1], *phex = hexpart; + char pic[17]; + size_t j; + for (j = 0; j < 16; j++) { + if (len > 0) { + *phex++ = hexdigit[*ptr >> 4]; + *phex++ = hexdigit[*ptr & 0xf]; + pic[j] = (*ptr >= '!' && *ptr < 127 ? *ptr : '.'); + len--; + ptr++; + } else { + *phex++ = 'X'; + *phex++ = 'X'; + pic[j] = '*'; + } + *phex++ = ' '; + } + hexpart[3 * 16] = 0; + pic[16] = 0 ; + + g_print ("%8lx | %s| %s\n", (long)offset, hexpart, pic); + offset += 16; + } +} + +/** + * gsf_mem_dump : + * @ptr: memory area to be dumped. + * @len: how many bytes will be dumped. + * + * Dump @len bytes from the memory location given by @ptr. + **/ +void +gsf_mem_dump (guint8 const *ptr, size_t len) +{ + gsf_mem_dump_full (ptr, len, 0); +} + +/** + * gsf_input_dump : + * @input: a #GsfInput + * @dump_as_hex: If %TRUE, dump in hexidecmal format + * + * Dumps @input's contents to STDOUT, optionally in hex format. + */ +void +gsf_input_dump (GsfInput *input, gboolean dump_as_hex) +{ + gsf_off_t offset = 0; + size_t size, count; + guint8 const *data; + + /* read in small blocks to excercise things */ + size = gsf_input_size (GSF_INPUT (input)); + while (size > 0) { + count = size; + if (count > 0x100) + count = 0x100; + data = gsf_input_read (GSF_INPUT (input), count, NULL); + g_return_if_fail (data != NULL); + if (dump_as_hex) + gsf_mem_dump_full (data, count, offset); + else + fwrite (data, 1, count, stdout); + size -= count; + offset += count; + } + if (!dump_as_hex) + fflush (stdout); +} + +/** + * gsf_le_get_guint64 + * @p: pointer to storage + * + * Interpret binary data as a guint64 (8 byte unsigned integer type) in little + * endian order. + * + * Returns: interpreted data + */ +guint64 +gsf_le_get_guint64 (void const *p) +{ +#if G_BYTE_ORDER == G_BIG_ENDIAN + if (sizeof (guint64) == 8) { + guint64 li; + int i; + guint8 *t = (guint8 *)&li; + guint8 *p2 = (guint8 *)p; + int sd = sizeof (li); + + for (i = 0; i < sd; i++) + t[i] = p2[sd - 1 - i]; + + return li; + } else { + g_error ("Big endian machine, but weird size of guint64"); + } +#elif G_BYTE_ORDER == G_LITTLE_ENDIAN + if (sizeof (guint64) == 8) { + /* + * On i86, we could access directly, but Alphas require + * aligned access. + */ + guint64 data; + memcpy (&data, p, sizeof (data)); + return data; + } else { + g_error ("Little endian machine, but weird size of guint64"); + } +#else +#error "Byte order not recognised -- out of luck" +#endif +} + +/** + * gsf_le_get_float : + * @p: pointer to storage + * + * Interpret binary data as a float in little endian order. + * + * + * Returns: interpreted data + */ +float +gsf_le_get_float (void const *p) +{ +#if G_FLOAT_BYTE_ORDER == G_BIG_ENDIAN + if (sizeof (float) == 4) { + float f; + int i; + guint8 *t = (guint8 *)&f; + guint8 *p2 = (guint8 *)p; + int sd = sizeof (f); + + for (i = 0; i < sd; i++) + t[i] = p2[sd - 1 - i]; + + return f; + } else { + g_error ("Big endian machine, but weird size of floats"); + } +#elif (G_FLOAT_BYTE_ORDER == G_LITTLE_ENDIAN) || (G_FLOAT_BYTE_ORDER == G_ARMFLOAT_ENDIAN) + if (sizeof (float) == 4) { + /* + * On i86, we could access directly, but Alphas require + * aligned access. + */ + float data; + memcpy (&data, p, sizeof (data)); + return data; + } else { + g_error ("Little endian machine, but weird size of floats"); + } +#else +#error "Floating-point byte order not recognised -- out of luck" +#endif +} + +/** + * gsf_le_set_float : + * @p: pointer to storage + * @f: float to be stored + * + * Store a value of type float in memory in little endian order. + */ +void +gsf_le_set_float (void *p, float f) +{ +#if G_FLOAT_BYTE_ORDER == G_BIG_ENDIAN + if (sizeof (float) == 4) { + int i; + guint8 *t = (guint8 *)&f; + guint8 *p2 = (guint8 *)p; + int sd = sizeof (f); + + for (i = 0; i < sd; i++) + p2[sd - 1 - i] = t[i]; + } else { + g_error ("Big endian machine, but weird size of floats"); + } +#elif (G_FLOAT_BYTE_ORDER == G_LITTLE_ENDIAN) || (G_FLOAT_BYTE_ORDER == G_ARMFLOAT_ENDIAN) + if (sizeof (float) == 4) { + /* + * On i86, we could access directly, but Alphas require + * aligned access. + */ + memcpy (p, &f, sizeof (f)); + } else { + g_error ("Little endian machine, but weird size of floats"); + } +#else +#error "Floating-point byte order not recognised -- out of luck" +#endif +} + +/** + * gsf_le_get_double : + * @p: pointer to storage + * + * Interpret binary data as a double in little endian order. + * + * Returns: interpreted data + */ +double +gsf_le_get_double (void const *p) +{ +#if G_FLOAT_BYTE_ORDER == G_ARMFLOAT_ENDIAN + double data; + memcpy ((char *)&data + 4, p, 4); + memcpy ((char *)&data, (char const *)p + 4, 4); + return data; +#elif G_FLOAT_BYTE_ORDER == G_BIG_ENDIAN + if (sizeof (double) == 8) { + double d; + int i; + guint8 *t = (guint8 *)&d; + guint8 *p2 = (guint8 *)p; + int sd = sizeof (d); + + for (i = 0; i < sd; i++) + t[i] = p2[sd - 1 - i]; + + return d; + } else { + g_error ("Big endian machine, but weird size of doubles"); + } +#elif G_FLOAT_BYTE_ORDER == G_LITTLE_ENDIAN + if (sizeof (double) == 8) { + /* + * On i86, we could access directly, but Alphas require + * aligned access. + */ + double data; + memcpy (&data, p, sizeof (data)); + return data; + } else { + g_error ("Little endian machine, but weird size of doubles"); + } +#else +#error "Floating-point byte order not recognised -- out of luck" +#endif +} + +/** + * gsf_le_set_double : + * @p: pointer to storage + * @d: double to be stored + * + * Store a value of type double in memory in little endian order + */ +void +gsf_le_set_double (void *p, double d) +{ +#if G_FLOAT_BYTE_ORDER == G_ARMFLOAT_ENDIAN + memcpy (p, (char const *)&d + 4, 4); + memcpy ((char *)p + 4, &d, 4); +#elif G_FLOAT_BYTE_ORDER == G_BIG_ENDIAN + if (sizeof (double) == 8) { + int i; + guint8 *t = (guint8 *)&d; + guint8 *p2 = (guint8 *)p; + int sd = sizeof (d); + + for (i = 0; i < sd; i++) + p2[sd - 1 - i] = t[i]; + } else { + g_error ("Big endian machine, but weird size of doubles"); + } +#elif G_FLOAT_BYTE_ORDER == G_LITTLE_ENDIAN + if (sizeof (double) == 8) { + /* + * On i86, we could access directly, but Alphas require + * aligned access. + */ + memcpy (p, &d, sizeof (d)); + } else { + g_error ("Little endian machine, but weird size of doubles"); + } +#else +#error "Floating-point byte order not recognised -- out of luck" +#endif +} + +/** + * gsf_extension_pointer: + * @path: A filename or file path. + * + * Extracts the extension from the end of a filename (the part after the final + * '.' in the filename). + * + * Returns: A pointer to the extension part of the filename, or a + * pointer to the end of the string if the filename does not + * have an extension. + */ +char const * +gsf_extension_pointer (char const *path) +{ + char const *s, *end; + + g_return_val_if_fail (path != NULL, NULL); + + end = path + strlen (path); + for (s = end; s > path; ) { + s--; + if (G_IS_DIR_SEPARATOR (*s)) + break; + if (*s == '.') + return s + 1; + } + + return end; +} + +/** + * gsf_iconv_close : + * @handle : handle to be closed. + * + * A utility wrapper to safely close an iconv handle. + **/ +void +gsf_iconv_close (GIConv handle) +{ + if (handle != NULL && handle != ((GIConv)-1)) + g_iconv_close (handle); +} + +/** + * gsf_filename_to_utf8: + * @filename: file name suitable for open(2). + * @quoted: if %TRUE, the resulting utf8 file name will be quoted + * (unless it is invalid). + * + * A utility wrapper to make sure filenames are valid utf8. + * Caller must g_free the result. + * + * Returns: @filename using utf-8 encoding for display + **/ +char * +gsf_filename_to_utf8 (char const *filename, gboolean quoted) +{ + char *dname = g_filename_display_name (filename); + char *result; + + if (quoted) { + result = g_strconcat ("\"", dname, "\"", NULL); + g_free (dname); + } else + result = dname; + + return result; +} + +#ifndef HAVE_G_BASE64_ENCODE +/***************************************************************************/ +/* some code taken from evolution/camel/camel-mime-utils.c */ + +/* + * Copyright (C) 2000 Ximian Inc. + * + * Authors: Michael Zucchi + * Jeffrey Stedfast + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301 USA + */ + +/* dont touch this file without my permission - Michael */ +static guint8 camel_mime_base64_rank[256]; +static char const *base64_alphabet = +"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + +#define d(x) + +/* Line length for base64 encoding. Must be a multiple of 4. */ +enum { BASE64_LINE_LEN = 76 }; + +static void +base64_init(void) +{ + int i; + + memset(camel_mime_base64_rank, 0xff, sizeof(camel_mime_base64_rank)); + for (i=0;i<64;i++) { + camel_mime_base64_rank[(unsigned int)base64_alphabet[i]] = i; + } + camel_mime_base64_rank['='] = 0; +} +#endif + +/** + * gsf_base64_encode_close : + * @in : Data to be encoded + * @inlen : Length of data to be encoded + * @break_lines : Whether to use line breaks + * @out : Encoded data. + * @state: holds the number of bits that are stored in @save + * @save: leftover bits that have not yet been decoded + * + * This funcion should be called to when finished encoding everything, to + * flush off the last little bit. + * + * Returns: a count of the number of bytes in the final block. + **/ +size_t +gsf_base64_encode_close (guint8 const *in, size_t inlen, + gboolean break_lines, guint8 *out, int *state, unsigned int *save) +{ + guint8 *outptr = out; +#ifdef HAVE_G_BASE64_ENCODE + if (inlen > 0) + outptr += gsf_base64_encode_step (in, inlen, break_lines, + outptr, state, save); + outptr += g_base64_encode_close (break_lines, outptr, state, save); +#else + int c1, c2; + + if (inlen>0) + outptr += gsf_base64_encode_step(in, inlen, break_lines, outptr, state, save); + + c1 = ((guint8 *)save)[1]; + c2 = ((guint8 *)save)[2]; + + d(printf("mode = %d\nc1 = %c\nc2 = %c\n", + (int)((char *)save)[0], + (int)((char *)save)[1], + (int)((char *)save)[2])); + + switch (((char *)save)[0]) { + case 2: + outptr[2] = base64_alphabet[ ( (c2 &0x0f) << 2 ) ]; + g_assert(outptr[2] != 0); + goto skip; + case 1: + outptr[2] = '='; + skip: + outptr[0] = base64_alphabet[ c1 >> 2 ]; + outptr[1] = base64_alphabet[ c2 >> 4 | ( (c1&0x3) << 4 )]; + outptr[3] = '='; + outptr += 4; + ++*state; + break; + } + if (break_lines && *state > 0) + *outptr++ = '\n'; + + *save = 0; + *state = 0; + +#endif + return outptr-out; +} + +/** + * gsf_base64_encode_step : + * @in : input stream + * @len : max length of data to decode + * @break_lines : Whether to use line breaks + * @out : output stream + * @state : holds the number of bits that are stored in @save + * @save : leftover bits that have not yet been decoded + * + * Performs an 'encode step', only encodes blocks of 3 characters from @in into + * the output @out at a time, saves left-over state in @state and @save + * (initialise to 0 on first invocation). + * + * Returns: the number of bytes encoded + */ +size_t +gsf_base64_encode_step (guint8 const *in, size_t len, + gboolean break_lines, guint8 *out, int *state, unsigned int *save) +{ +#ifdef HAVE_G_BASE64_ENCODE + return g_base64_encode_step (in, len, break_lines, out, state, save); +#else + register guint8 const *inptr; + register guint8 *outptr; + + if (len<=0) + return 0; + + inptr = in; + outptr = out; + + d(printf("we have %d chars, and %d saved chars\n", len, ((char *)save)[0])); + + if (len + ((char *)save)[0] > 2) { + guint8 const *inend = in+len-2; + register int c1, c2, c3; + register int already; + + already = *state; + + switch (((char *)save)[0]) { + case 1: c1 = ((guint8 *)save)[1]; goto skip1; + case 2: c1 = ((guint8 *)save)[1]; + c2 = ((guint8 *)save)[2]; goto skip2; + } + + /* yes, we jump into the loop, no i'm not going to change it, it's beautiful! */ + while (inptr < inend) { + c1 = *inptr++; + skip1: + c2 = *inptr++; + skip2: + c3 = *inptr++; + *outptr++ = base64_alphabet[ c1 >> 2 ]; + *outptr++ = base64_alphabet[ c2 >> 4 | ( (c1&0x3) << 4 ) ]; + *outptr++ = base64_alphabet[ ( (c2 &0x0f) << 2 ) | (c3 >> 6) ]; + *outptr++ = base64_alphabet[ c3 & 0x3f ]; + /* this is a bit ugly ... */ + if (break_lines && (++already) * 4 >= BASE64_LINE_LEN) { + *outptr++='\n'; + already = 0; + } + } + + ((char *)save)[0] = 0; + len = 2-(inptr-inend); + *state = already; + } + + d(printf("state = %d, len = %d\n", + (int)((char *)save)[0], + len)); + + if (len>0) { + register char *saveout; + + /* points to the slot for the next char to save */ + saveout = & (((char *)save)[1]) + ((char *)save)[0]; + + /* len can only be 0 1 or 2 */ + switch(len) { + case 2: *saveout++ = *inptr++; + case 1: *saveout++ = *inptr++; + } + ((char *)save)[0]+=len; + } + + d(printf("mode = %d\nc1 = %c\nc2 = %c\n", + (int)((char *)save)[0], + (int)((char *)save)[1], + (int)((char *)save)[2])); + + return outptr-out; +#endif +} + + +/** + * gsf_base64_decode_step: + * @in: input stream + * @len: max length of data to decode + * @out: output stream + * @state: holds the number of bits that are stored in @save + * @save: leftover bits that have not yet been decoded + * + * Decodes a chunk of base64 encoded data + * + * Returns: the number of bytes converted + **/ +size_t +gsf_base64_decode_step (guint8 const *in, size_t len, guint8 *out, + int *state, guint *save) +{ +#ifdef HAVE_G_BASE64_ENCODE + return g_base64_decode_step (in, len, out, state, save); +#else + register guint8 const *inptr; + register guint8 *outptr, c; + register unsigned int v; + guint8 const *inend; + int i; + + inend = in+len; + outptr = out; + + /* convert 4 base64 bytes to 3 normal bytes */ + v=*save; + i=*state; + inptr = in; + while (inptr>16; + *outptr++ = v>>8; + *outptr++ = v; + i=0; + } + } + } + + *save = v; + *state = i; + + /* quick scan back for '=' on the end somewhere */ + /* fortunately we can drop 1 output char for each trailing = (upto 2) */ + i=2; + while (inptr>in && i) { + inptr--; + if (camel_mime_base64_rank[*inptr] != 0xff) { + if (*inptr == '=' && outptr>out) + outptr--; + i--; + } + } + + /* if i!= 0 then there is a truncation error! */ + return outptr-out; +#endif +} + +/** + * gsf_base64_encode_simple : + * @data : data stream + * @len : max length of data to encode + * + * Encodes data from @data back into @data using base64 encoding. + * + * Returns: the number of bytes encoded + */ +guint8 * +gsf_base64_encode_simple (guint8 const *data, size_t len) +{ + guint8 *out; + int state = 0; + guint save = 0; + gboolean break_lines = TRUE; /* This differs from g_base64_encode */ + size_t outlen = len * 4 / 3 + 5; + + if (break_lines) + outlen += outlen / 72 + 1; + out = g_new (guint8, outlen); + outlen = gsf_base64_encode_close (data, len, break_lines, + out, &state, &save); + out[outlen] = '\0'; + return out; +} + +/** + * gsf_base64_decode_simple : + * @data : data stream + * @len : max length of data to decode + * + * Decodes a chunk of base64 encoded data from @data back into @data. + * + * Returns: the number of bytes converted + */ +size_t +gsf_base64_decode_simple (guint8 *data, size_t len) +{ + int state = 0; + guint save = 0; + return gsf_base64_decode_step (data, len, data, &state, &save); +} + + +/* Largely a copy of g_object_new_valist. */ +/** + * gsf_property_settings_collect_valist: + * @object_type: the GType for which the properties are being set. + * @p_n_params: a pointer to the number of properties collected. (Used for + * both input and output.) + * @p_params: a pointer to the GParameter array that holds the properties. + * (Used for both input and output. This may point to a %NULL pointer if + * there are no properties collected yet.) + * @first_property_name: the name of the first property being set, or NULL. + * @var_args: a va_list holding the remainder of the property names and + * values, terminated by a %NULL. + * + * This function builds a GParameter array suitable for g_object_newv. + **/ +void +gsf_property_settings_collect_valist (GType object_type, + GParameter **p_params, + size_t *p_n_params, + const gchar *first_property_name, + va_list var_args) +{ + GObjectClass *class; + GParameter *params = *p_params; + const gchar *name; + size_t n_params = *p_n_params; + size_t n_alloced_params = n_params; /* We might have more. */ + + g_return_if_fail (G_TYPE_IS_OBJECT (object_type)); + + class = g_type_class_ref (object_type); + + name = first_property_name; + while (name) + { + gchar *error = NULL; + GParamSpec *pspec = g_object_class_find_property (class, name); + if (!pspec) + { + g_warning ("%s: object class `%s' has no property named `%s'", + G_STRFUNC, + g_type_name (object_type), + name); + break; + } + + if (n_params >= n_alloced_params) + { + n_alloced_params += 16; + params = g_renew (GParameter, params, n_alloced_params); + } + params[n_params].name = name; + params[n_params].value.g_type = 0; + g_value_init (¶ms[n_params].value, G_PARAM_SPEC_VALUE_TYPE (pspec)); + G_VALUE_COLLECT (¶ms[n_params].value, var_args, 0, &error); + if (error) + { + g_warning ("%s: %s", G_STRFUNC, error); + g_free (error); + g_value_unset (¶ms[n_params].value); + break; + } + n_params++; + name = va_arg (var_args, gchar*); + } + + g_type_class_unref (class); + + *p_params = params; + *p_n_params = n_params; +} + +/* This is a vararg version of gsf_property_settings_collect_valist. */ +void +gsf_property_settings_collect (GType object_type, + GParameter **p_params, + size_t *p_n_params, + const gchar *first_property_name, + ...) +{ + va_list var_args; + va_start (var_args, first_property_name); + gsf_property_settings_collect_valist (object_type, p_params, p_n_params, first_property_name, var_args); + va_end (var_args); +} + +void +gsf_property_settings_free (GParameter *params, + size_t n_params) +{ + while (n_params--) + g_value_unset (¶ms[n_params].value); + g_free (params); +} + + + +/* Errors */ + +/** + * gsf_error_quark: + * + * Returns: the #GQuark used to identify libgsf errors in #GError structures. + * Specific error codes come from the #GsfError enumeration. + **/ +GQuark +gsf_error_quark (void) +{ + static GQuark quark; + + if (quark == 0) + quark = g_quark_from_static_string ("gsf-error-quark"); + + return quark; +} diff --git a/gsf/gsf-utils.h b/gsf/gsf-utils.h new file mode 100644 index 0000000..0d18bfd --- /dev/null +++ b/gsf/gsf-utils.h @@ -0,0 +1,338 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-utils.h: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_UTILS_H +#define GSF_UTILS_H + +#include +#include + +G_BEGIN_DECLS + +/* Do this the ugly way so that we don't have to worry about alignment */ + +/** + * GSF_LE_GET_GUINT8 + * @p: pointer to storage + * + * Interpret binary data as an unsigned 8-bit integer in little endian order. + * + * Returns: interpreted data + */ +#define GSF_LE_GET_GUINT8(p) (*(guint8 const *)(p)) + +/** + * GSF_LE_GET_GUINT16 + * @p: pointer to storage + * + * Interpret binary data as an unsigned 16-bit integer in little endian order. + * + * Returns: interpreted data + */ +#define GSF_LE_GET_GUINT16(p) \ + (guint16)((((guint8 const *)(p))[0] << 0) | \ + (((guint8 const *)(p))[1] << 8)) + +/** + * GSF_LE_GET_GUINT32 + * @p: pointer to storage + * + * Interpret binary data as an unsigned 32-bit integer in little endian order. + * + * Returns: interpreted data + */ +#define GSF_LE_GET_GUINT32(p) \ + (guint32)((((guint8 const *)(p))[0] << 0) | \ + (((guint8 const *)(p))[1] << 8) | \ + (((guint8 const *)(p))[2] << 16) | \ + (((guint8 const *)(p))[3] << 24)) + +/** + * GSF_LE_GET_GUINT64 + * @p: pointer to storage + * + * Interpret binary data as an unsigned 64-bit integer in little endian order. + * + * Returns: interpreted data + */ +#define GSF_LE_GET_GUINT64(p) (gsf_le_get_guint64 (p)) + +/** + * GSF_LE_GET_GINT8 + * @p: pointer to storage + * + * Interpret binary data as a signed 8-bit integer in little endian order. + * + * Returns: interpreted data + */ +#define GSF_LE_GET_GINT8(p) ((gint8)GSF_LE_GET_GUINT8(p)) + +/** + * GSF_LE_GET_GINT16 + * @p: pointer to storage + * + * Interpret binary data as a signed 16-bit integer in little endian order. + * + * Returns: interpreted data + */ +#define GSF_LE_GET_GINT16(p) ((gint16)GSF_LE_GET_GUINT16(p)) + +/** + * GSF_LE_GET_GINT32 + * @p: pointer to storage + * + * Interpret binary data as a signed 32-bit integer in little endian order. + * + * Returns: interpreted data + */ +#define GSF_LE_GET_GINT32(p) ((gint32)GSF_LE_GET_GUINT32(p)) + +/** + * GSF_LE_GET_GINT64 + * @p: pointer to storage + * + * Interpret binary data as a signed 64-bit integer in little endian order. + * + * Returns: interpreted data + */ +#define GSF_LE_GET_GINT64(p) ((gint64)GSF_LE_GET_GUINT64(p)) + +/** + * GSF_LE_GET_FLOAT + * @p: pointer to storage + * + * Interpret binary data as a float in little endian order. + * + * Returns: interpreted data + */ +#define GSF_LE_GET_FLOAT(p) (gsf_le_get_float (p)) + +/** + * GSF_LE_GET_DOUBLE + * @p: pointer to storage + * + * Interpret binary data as a double in little endian order. + * + * Returns: interpreted data + */ +#define GSF_LE_GET_DOUBLE(p) (gsf_le_get_double (p)) + +guint64 gsf_le_get_guint64 (void const *p); +float gsf_le_get_float (void const *p); +double gsf_le_get_double (void const *p); + +/** + * GSF_LE_SET_GUINT8 + * @p: pointer to storage + * @dat: 8-bit unsigned integer + * + * Store @dat in little endian order in memory pointed to by @p. + */ +#define GSF_LE_SET_GUINT8(p, dat) \ + (*((guint8 *)(p)) = ((dat) & 0xff)) + +/** + * GSF_LE_SET_GUINT16 + * @p: pointer to storage + * @dat: 16-bit unsigned integer + * + * Store @dat in little endian order in memory pointed to by @p. + */ +#define GSF_LE_SET_GUINT16(p, dat) \ + ((*((guint8 *)(p) + 0) = ((dat) & 0xff)),\ + (*((guint8 *)(p) + 1) = ((dat) >> 8) & 0xff)) + +/** + * GSF_LE_SET_GUINT32 + * @p: pointer to storage + * @dat: 32-bit unsigned integer + * + * Store @dat in little endian order in memory pointed to by @p. + */ +#define GSF_LE_SET_GUINT32(p, dat) \ + ((*((guint8 *)(p) + 0) = (guchar) ((dat)) & 0xff), \ + (*((guint8 *)(p) + 1) = (guchar) ((dat) >> 8) & 0xff), \ + (*((guint8 *)(p) + 2) = (guchar) ((dat) >> 16) & 0xff), \ + (*((guint8 *)(p) + 3) = (guchar) ((dat) >> 24) & 0xff)) + +/** + * GSF_LE_SET_GUINT64 + * @p: pointer to storage + * @dat: 64-bit unsigned integer + * + * Store @dat in little endian order in memory pointed to by @p. + */ +#define GSF_LE_SET_GUINT64(p, dat) \ + ((*((guint8 *)(p) + 0) = (guchar) ((dat)) & 0xff), \ + (*((guint8 *)(p) + 1) = (guchar) ((dat) >> 8) & 0xff), \ + (*((guint8 *)(p) + 2) = (guchar) ((dat) >> 16) & 0xff), \ + (*((guint8 *)(p) + 3) = (guchar) ((dat) >> 24) & 0xff), \ + (*((guint8 *)(p) + 4) = (guchar) ((dat) >> 32) & 0xff), \ + (*((guint8 *)(p) + 5) = (guchar) ((dat) >> 40) & 0xff), \ + (*((guint8 *)(p) + 6) = (guchar) ((dat) >> 48) & 0xff), \ + (*((guint8 *)(p) + 7) = (guchar) ((dat) >> 56) & 0xff)) + +/** + * GSF_LE_SET_GINT8 + * @p: pointer to storage + * @dat: 8-bit signed integer + * + * Store @dat in little endian order in memory pointed to by @p. + */ +#define GSF_LE_SET_GINT8(p,dat) GSF_LE_SET_GUINT8((p),(dat)) + +/** + * GSF_LE_SET_GINT16 + * @p: pointer to storage + * @dat: 16-bit signed integer + * + * Store @dat in little endian order in memory pointed to by @p. + */ +#define GSF_LE_SET_GINT16(p,dat) GSF_LE_SET_GUINT16((p),(dat)) + +/** + * GSF_LE_SET_GINT32 + * @p: pointer to storage + * @dat: 32-bit signed integer + * + * Store @dat in little endian order in memory pointed to by @p. + */ +#define GSF_LE_SET_GINT32(p,dat) GSF_LE_SET_GUINT32((p),(dat)) + +/** + * GSF_LE_SET_GINT64 + * @p: pointer to storage + * @dat: 64-bit signed integer + * + * Store @dat in little endian order in memory pointed to by @p. + */ +#define GSF_LE_SET_GINT64(p,dat) GSF_LE_SET_GUINT64((p),(dat)) + +/** + * GSF_LE_SET_FLOAT + * @p: pointer to storage + * @dat: float to be stored + * + * Store @dat in little endian order in memory pointed to by @p. + */ +#define GSF_LE_SET_FLOAT(p,dat) gsf_le_set_float((p),(dat)) + +/** + * GSF_LE_SET_DOUBLE + * @p: pointer to storage + * @dat: double to be stored + * + * Store @dat in little endian order in memory pointed to by @p. + */ +#define GSF_LE_SET_DOUBLE(p,dat) gsf_le_set_double((p),(dat)) + +void gsf_le_set_float (void *p, float f); +void gsf_le_set_double (void *p, double d); + +void gsf_init (void); +void gsf_shutdown (void); +void gsf_init_dynamic (GTypeModule *module); +void gsf_shutdown_dynamic (GTypeModule *module); +gboolean gsf_debug_flag (const char *flag); + +/* Debugging utilities */ +void gsf_mem_dump (guint8 const *ptr, size_t len); +void gsf_input_dump (GsfInput *input, gboolean dump_as_hex); + +/* base64 encoding utilities */ +guint8 *gsf_base64_encode_simple (guint8 const *data, size_t len); +size_t gsf_base64_encode_close (guint8 const *in, size_t inlen, + gboolean break_lines, guint8 *out, + int *state, guint *save); +size_t gsf_base64_encode_step (guint8 const *in, size_t len, + gboolean break_lines, guint8 *out, + int *state, guint *save); + +size_t gsf_base64_decode_simple (guint8 *data, size_t len); +size_t gsf_base64_decode_step (guint8 const *in, size_t len, + guint8 *out, int *state, guint *save); + + +/* For putting filenames into error messages. */ +char *gsf_filename_to_utf8 (char const *filename, gboolean quoted); + +/* Some version checking */ + +/** + * libgsf_major_version: + * + * Major version number of libgsf, indicating the ABI version. + */ +extern int libgsf_major_version; + +/** + * libgsf_minor_version: + * + * Minor (secondary) version number of libgsf, indicating the API version. + */ +extern int libgsf_minor_version; + +/** + * libgsf_micro_version: + * + * Micro (tertiary) version number of libgsf, indicating bug fixes. + */ +extern int libgsf_micro_version; + +char const *gsf_extension_pointer (char const * path); +void gsf_iconv_close (GIConv handle); + +void gsf_property_settings_collect_valist (GType object_type, + GParameter **p_params, + size_t *p_n_params, + const gchar *first_property_name, + va_list var_args); +void gsf_property_settings_collect (GType object_type, + GParameter **p_params, + size_t *p_n_params, + const gchar *first_property_name, + ...); +void gsf_property_settings_free (GParameter *params, + size_t n_params); + + + +/* Errors */ + +#define GSF_ERROR (gsf_error_quark ()) + +/** + * GsfError: + * @GSF_ERROR_OUT_OF_MEMORY: Memory allocation failed + * @GSF_ERROR_INVALID_DATA: Invalid data encountered (e.g. not enough data) + */ + +typedef enum { + GSF_ERROR_OUT_OF_MEMORY, + GSF_ERROR_INVALID_DATA +} GsfError; + +GQuark gsf_error_quark (void); + + +G_END_DECLS + +#endif /* GSF_UTILS_H */ diff --git a/gsf/gsf-zip-impl.h b/gsf/gsf-zip-impl.h new file mode 100644 index 0000000..d36daa8 --- /dev/null +++ b/gsf/gsf-zip-impl.h @@ -0,0 +1,118 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-zip-impl.h: + * + * Copyright (C) 2002-2006 Tambet Ingo (tambet@ximian.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_ZIP_IMPL_H +#define GSF_ZIP_IMPL_H + +#include /* for GsfZipCompressionMethod */ + +G_BEGIN_DECLS + +#define ZIP_HEADER_SIZE 30 +#define ZIP_HEADER_VERSION 4 +#define ZIP_HEADER_OS 5 +#define ZIP_HEADER_FLAGS 6 +#define ZIP_HEADER_COMP_METHOD 8 +#define ZIP_HEADER_TIME 10 +#define ZIP_HEADER_CRC 14 +#define ZIP_HEADER_COMP_SIZE 18 +#define ZIP_HEADER_UNCOMP_SIZE 22 +#define ZIP_HEADER_NAME_LEN 26 +#define ZIP_HEADER_EXTRA_LEN 28 + +#define ZIP_TRAILER_SIZE 22 +#define ZIP_TRAILER_DISK 4 +#define ZIP_TRAILER_DIR_DISK 6 +#define ZIP_TRAILER_ENTRIES 8 +#define ZIP_TRAILER_TOTAL_ENTRIES 10 +#define ZIP_TRAILER_DIR_SIZE 12 +#define ZIP_TRAILER_DIR_POS 16 +#define ZIP_TRAILER_COMMENT_SIZE 20 + +#define ZIP_DIRENT_SIZE 46 +#define ZIP_DIRENT_ENCODER 4 +#define ZIP_DIRENT_EXTRACT 6 +#define ZIP_DIRENT_FLAGS 8 +#define ZIP_DIRENT_COMPR_METHOD 10 +#define ZIP_DIRENT_DOSTIME 12 +#define ZIP_DIRENT_CRC32 16 +#define ZIP_DIRENT_CSIZE 20 +#define ZIP_DIRENT_USIZE 24 +#define ZIP_DIRENT_NAME_SIZE 28 +#define ZIP_DIRENT_EXTRAS_SIZE 30 +#define ZIP_DIRENT_COMMENT_SIZE 32 +#define ZIP_DIRENT_DISKSTART 34 +#define ZIP_DIRENT_FILE_TYPE 36 +#define ZIP_DIRENT_FILE_MODE 38 +#define ZIP_DIRENT_OFFSET 42 + +#define ZIP_FILE_HEADER_SIZE 30 +#define ZIP_FILE_HEADER_EXTRACT 4 +#define ZIP_FILE_HEADER_FLAGS 6 +#define ZIP_FILE_HEADER_COMPR_METHOD 8 +#define ZIP_FILE_HEADER_DOSTIME 10 +#define ZIP_FILE_HEADER_CRC32 14 +#define ZIP_FILE_HEADER_CSIZE 18 +#define ZIP_FILE_HEADER_USIZE 22 +#define ZIP_FILE_HEADER_NAME_SIZE 26 +#define ZIP_FILE_HEADER_EXTRAS_SIZE 28 + +#define ZIP_NAME_SEPARATOR '/' + +#define ZIP_BLOCK_SIZE 32768 +#define ZIP_BUF_SIZE 512 + + +/* z_flags */ +#define ZZIP_IS_ENCRYPTED(p) ((*(unsigned char*)p)&1) +#define ZZIP_IS_COMPRLEVEL(p) (((*(unsigned char*)p)>>1)&3) +#define ZZIP_IS_STREAMED(p) (((*(unsigned char*)p)>>3)&1) + +typedef struct { + char *name; + guint16 flags; + GsfZipCompressionMethod compr_method; + guint32 crc32; + size_t csize; + size_t usize; + gsf_off_t offset; + gsf_off_t data_offset; + guint32 dostime; +} GsfZipDirent; + +typedef struct { + char *name; + gboolean is_directory; + GsfZipDirent *dirent; + GSList *children, *last_child; +} GsfZipVDir; + +GsfZipDirent *gsf_zip_dirent_new (void); +void gsf_zip_dirent_free (GsfZipDirent *dirent); + +GsfZipVDir *gsf_vdir_new (char const *name, gboolean is_directory, + GsfZipDirent *dirent); +void gsf_vdir_free (GsfZipVDir *vdir, gboolean free_dirent); +void gsf_vdir_add_child (GsfZipVDir *vdir, GsfZipVDir *child); + +G_END_DECLS + +#endif /* GSF_ZIP_IMPL_H */ diff --git a/gsf/gsf-zip-utils.c b/gsf/gsf-zip-utils.c new file mode 100644 index 0000000..e9860b4 --- /dev/null +++ b/gsf/gsf-zip-utils.c @@ -0,0 +1,93 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-zip-utils.c: tools for zip archive output. + * + * Copyright (C) 2002-2006 Jon K Hellan (hellan@acm.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Outc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include "gsf-zip-impl.h" + +/** + * SECTION:zip + * @Short_description: Utilities for reading and writing ZIP/JAR files + * @Title: Zip files + * + * #GsfInfile and #GsfOutfile support for zip files. + **/ + +/* Doesn't do much, but include for symmetry */ +GsfZipDirent* +gsf_zip_dirent_new (void) +{ + return g_new0 (GsfZipDirent, 1); +} + +void +gsf_zip_dirent_free (GsfZipDirent *dirent) +{ + g_return_if_fail (dirent != NULL); + + g_free (dirent->name); + dirent->name = NULL; + + g_free (dirent); +} + +GsfZipVDir * +gsf_vdir_new (char const *name, gboolean is_directory, GsfZipDirent *dirent) +{ + GsfZipVDir *vdir = g_new (GsfZipVDir, 1); + + vdir->name = g_strdup (name); + vdir->is_directory = is_directory; + vdir->dirent = dirent; + vdir->children = NULL; + return vdir; +} + +void +gsf_vdir_free (GsfZipVDir *vdir, gboolean free_dirent) +{ + GSList *l; + + if (!vdir) + return; + + for (l = vdir->children; l; l = l->next) + gsf_vdir_free ((GsfZipVDir *)l->data, free_dirent); + + g_slist_free (vdir->children); + g_free (vdir->name); + if (free_dirent && vdir->dirent) + gsf_zip_dirent_free (vdir->dirent); + g_free (vdir); +} + +void +gsf_vdir_add_child (GsfZipVDir *vdir, GsfZipVDir *child) +{ + GSList *tail = g_slist_append (NULL, child); + if (vdir->children) + vdir->last_child->next = tail; + else + vdir->children = tail; + vdir->last_child = tail; +} diff --git a/gsf/gsf.h b/gsf/gsf.h new file mode 100644 index 0000000..3a19305 --- /dev/null +++ b/gsf/gsf.h @@ -0,0 +1,104 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf.h: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#ifndef GSF_H +#define GSF_H + +#include + +G_BEGIN_DECLS + +/** + * GsfInput: + * + * Class representing an input stream. + */ +typedef struct _GsfInput GsfInput; + +/** + * GsfInfil: + * + * Class representing an input file. + */ +typedef struct _GsfInfile GsfInfile; + +/** + * GsfOutput: + * + * Class representing an output stream, counterpart to #GsfInput. + */ +typedef struct _GsfOutput GsfOutput; + +/** + * GsfOutfile: + * + * Class representing an output file, counterpart to #GsfInfile. + */ +typedef struct _GsfOutfile GsfOutfile; + +/** + * GsfDocProp: + * + * Class representing a properties of a document. + */ +typedef struct _GsfDocProp GsfDocProp; + +/** + * GsfDocMetaData: + * + * Class representing information about a document, such as creator and time of + * last modification. + */ +typedef struct _GsfDocMetaData GsfDocMetaData; + +/** + * GsfTimestamp: + * @date : #GDate in local timezone + * @seconds : #glong number of seconds since @date. + * @time_zone : possibly blank #GString of the timezone + * @timet : as from mktime. + * + * A point in time. + */ +typedef struct _GsfTimestamp GsfTimestamp; + +/** + * gsf_off_t: + * + * Data type to represent offsets (positions) within a data stream. + * + * FIXME: + * gsf_off_t is really supposed to be the widest type off_t can be configured + * to on the platform + */ +typedef gint64 gsf_off_t; + +/** + * GSF_OFF_T_FORMAT: + * + * The printf(3) conversion specifier to be used for printing values of type + * #gsf_off_t. + */ +#define GSF_OFF_T_FORMAT G_GINT64_FORMAT + +G_END_DECLS + +#endif /* GSF_H */ diff --git a/gsf/version.c b/gsf/version.c new file mode 100644 index 0000000..705d499 --- /dev/null +++ b/gsf/version.c @@ -0,0 +1,3 @@ +int libgsf_major_version = 1; /* The ABI version */ +int libgsf_minor_version = 14; /* The API version */ +int libgsf_micro_version = 21; /* bug fixes */ diff --git a/gsf/version.c.in b/gsf/version.c.in new file mode 100644 index 0000000..dd19cc9 --- /dev/null +++ b/gsf/version.c.in @@ -0,0 +1,3 @@ +int libgsf_major_version = @LIBGSF_MAJOR_VERSION@; /* The ABI version */ +int libgsf_minor_version = @LIBGSF_MINOR_VERSION@; /* The API version */ +int libgsf_micro_version = @LIBGSF_MICRO_VERSION@; /* bug fixes */ diff --git a/gtk-doc.make b/gtk-doc.make new file mode 100644 index 0000000..57fab98 --- /dev/null +++ b/gtk-doc.make @@ -0,0 +1,230 @@ +# -*- mode: makefile -*- + +#################################### +# Everything below here is generic # +#################################### + +if GTK_DOC_USE_LIBTOOL +GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +GTKDOC_RUN = $(LIBTOOL) --mode=execute +else +GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +GTKDOC_RUN = +endif + +# We set GPATH here; this gives us semantics for GNU make +# which are more like other make's VPATH, when it comes to +# whether a source that is a target of one rule is then +# searched for in VPATH/GPATH. +# +GPATH = $(srcdir) + +TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) + +EXTRA_DIST = \ + $(content_files) \ + $(HTML_IMAGES) \ + $(DOC_MAIN_SGML_FILE) \ + $(DOC_MODULE)-sections.txt \ + $(DOC_MODULE)-overrides.txt + +DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ + pdf-build.stamp \ + $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp \ + $(srcdir)/pdf.stamp + +SCANOBJ_FILES = \ + $(DOC_MODULE).args \ + $(DOC_MODULE).hierarchy \ + $(DOC_MODULE).interfaces \ + $(DOC_MODULE).prerequisites \ + $(DOC_MODULE).signals + +REPORT_FILES = \ + $(DOC_MODULE)-undocumented.txt \ + $(DOC_MODULE)-undeclared.txt \ + $(DOC_MODULE)-unused.txt + +CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) + +if ENABLE_GTK_DOC +if GTK_DOC_BUILD_HTML +HTML_BUILD_STAMP=html-build.stamp +else +HTML_BUILD_STAMP= +endif +if GTK_DOC_BUILD_PDF +PDF_BUILD_STAMP=pdf-build.stamp +else +PDF_BUILD_STAMP= +endif + +all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) +else +all-local: +endif + +docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) + +$(REPORT_FILES): sgml-build.stamp + +#### scan #### + +scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) + @echo 'gtk-doc: Scanning header files' + @-chmod -R u+w $(srcdir) + @_source_dir='' ; for i in $(DOC_SOURCE_DIR) ; do \ + _source_dir="$${_source_dir} --source-dir=$$i" ; \ + done ; \ + cd $(srcdir) && \ + gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) + @if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ + CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ + else \ + cd $(srcdir) ; \ + for i in $(SCANOBJ_FILES) ; do \ + test -f $$i || touch $$i ; \ + done \ + fi + @touch scan-build.stamp + +$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp + @true + +#### templates #### + +tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt + @echo 'gtk-doc: Rebuilding template files' + @-chmod -R u+w $(srcdir) + @cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) + @touch tmpl-build.stamp + +tmpl.stamp: tmpl-build.stamp + @true + +$(srcdir)/tmpl/*.sgml: + @true + +#### xml #### + +sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) + @echo 'gtk-doc: Building XML' + @-chmod -R u+w $(srcdir) + @_source_dir='' ; for i in $(DOC_SOURCE_DIR) ; do \ + _source_dir="$${_source_dir} --source-dir=$$i" ; \ + done ; \ + cd $(srcdir) && \ + gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) + @touch sgml-build.stamp + +sgml.stamp: sgml-build.stamp + @true + +#### html #### + +html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) + @echo 'gtk-doc: Building HTML' + @-chmod -R u+w $(srcdir) + @rm -rf $(srcdir)/html + @mkdir $(srcdir)/html + @mkhtml_options=""; \ + gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ + if test "$(?)" = "0"; then \ + mkhtml_options=--path="$(srcdir)"; \ + fi; \ + cd $(srcdir)/html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) + @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) + @echo 'gtk-doc: Fixing cross-references' + @cd $(srcdir) && gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) + @touch html-build.stamp + +#### pdf #### + +pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) + @echo 'gtk-doc: Building PDF' + @-chmod -R u+w $(srcdir) + @rm -rf $(srcdir)/$(DOC_MODULE).pdf + @mkpdf_imgdirs=""; \ + if test "x$(HTML_IMAGES)" != "x"; then \ + for img in $(HTML_IMAGES); do \ + part=`dirname $$img`; \ + echo $$mkpdf_imgdirs | grep >/dev/null "\-\-imgdir=$$part "; \ + if test $$? != 0; then \ + mkpdf_imgdirs="$$mkpdf_imgdirs --imgdir=$$part"; \ + fi; \ + done; \ + fi; \ + cd $(srcdir) && gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_imgdirs $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) + @touch pdf-build.stamp + +############## + +clean-local: + rm -f *~ *.bak + rm -rf .libs + +distclean-local: + cd $(srcdir) && \ + rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf \ + $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + +maintainer-clean-local: clean + cd $(srcdir) && rm -rf xml html + +install-data-local: + @installfiles=`echo $(srcdir)/html/*`; \ + if test "$$installfiles" = '$(srcdir)/html/*'; \ + then echo '-- Nothing to install' ; \ + else \ + if test -n "$(DOC_MODULE_VERSION)"; then \ + installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ + else \ + installdir="$(DESTDIR)$(TARGET_DIR)"; \ + fi; \ + $(mkinstalldirs) $${installdir} ; \ + for i in $$installfiles; do \ + echo '-- Installing '$$i ; \ + $(INSTALL_DATA) $$i $${installdir}; \ + done; \ + if test -n "$(DOC_MODULE_VERSION)"; then \ + mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ + $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ + mv -f $${installdir}/$(DOC_MODULE).devhelp \ + $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ + fi; \ + $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ + fi + +uninstall-local: + @if test -n "$(DOC_MODULE_VERSION)"; then \ + installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ + else \ + installdir="$(DESTDIR)$(TARGET_DIR)"; \ + fi; \ + rm -rf $${installdir} + +# +# Require gtk-doc when making dist +# +if ENABLE_GTK_DOC +dist-check-gtkdoc: +else +dist-check-gtkdoc: + @echo "*** gtk-doc must be installed and enabled in order to make dist" + @false +endif + +dist-hook: dist-check-gtkdoc dist-hook-local + mkdir $(distdir)/tmpl + mkdir $(distdir)/html + -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl + cp $(srcdir)/html/* $(distdir)/html + -cp $(srcdir)/$(DOC_MODULE).pdf $(distdir)/ + -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ + -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ + cd $(distdir) && rm -f $(DISTCLEANFILES) + $(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html + +.PHONY : dist-hook-local docs diff --git a/install-sh b/install-sh new file mode 100755 index 0000000..6781b98 --- /dev/null +++ b/install-sh @@ -0,0 +1,520 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2009-04-28.21; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/intltool-extract.in b/intltool-extract.in new file mode 100644 index 0000000..e69de29 diff --git a/intltool-merge.in b/intltool-merge.in new file mode 100644 index 0000000..e69de29 diff --git a/intltool-update.in b/intltool-update.in new file mode 100644 index 0000000..e69de29 diff --git a/libgsf-1.pc.in b/libgsf-1.pc.in new file mode 100644 index 0000000..dcc6595 --- /dev/null +++ b/libgsf-1.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libgsf-1 +Description: A library for reading and writing structured files (eg MS OLE and Zip) +Version: @VERSION@ +Requires: glib-2.0 gobject-2.0 libxml-2.0 +Libs: -L${libdir} -lgsf-1 +Cflags: -I${includedir}/libgsf-1 diff --git a/libgsf-1.spec b/libgsf-1.spec new file mode 100644 index 0000000..cc83f60 --- /dev/null +++ b/libgsf-1.spec @@ -0,0 +1,83 @@ +%define name libgsf +%define version 1.14.21 +%define release 1 +%define prefix /usr + +Summary: GNOME Structured File library + +Name: %{name} +Version: %{version} +Release: %{release} +Group: System Environment/Libraries +License: LGPL + +Source: ftp://ftp.gnome.org/pub/GNOME/unstable/sources/libgsf/%{name}-%{version}.tar.gz +Buildroot: /var/tmp/%{name}-%{version}-%{release}-root +URL: http://www.gnumeric.org + +Requires: glib2 >= 2.6.0 +BuildRequires: glib2-devel >= 2.6.0 + +%description +A library for reading and writing structured files (eg MS OLE and Zip) + +%package devel +Summary: Support files necessary to compile applications with libgsf. +Group: Development/Libraries +Requires: libgsf + +%description devel +Libraries, headers, and support files necessary to compile applications using libgsf. + +%prep + +%setup + +%build +%ifarch alpha + MYARCH_FLAGS="--host=alpha-redhat-linux" +%endif + +if [ ! -f configure ]; then +CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%{prefix} +else +CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} +fi + +if [ "$SMP" != "" ]; then + (make "MAKE=make -k -j $SMP"; exit 0) + make +else + make +fi + +%install +if [ -d $RPM_BUILD_ROOT ]; then rm -r $RPM_BUILD_ROOT; fi +mkdir -p $RPM_BUILD_ROOT%{prefix} +make prefix=$RPM_BUILD_ROOT%{prefix} install + +%files +%defattr(644,root,root,755) +%doc AUTHORS COPYING README +%{prefix}/lib/lib*.so* + +%files devel +%defattr(644,root,root,755) +%{prefix}/lib/*a +%{prefix}/lib/pkgconfig/libgsf-*1.pc +%{prefix}/include/libgsf-1/* +%{prefix}/share/doc/libgsf/html/* + +%clean +rm -r $RPM_BUILD_ROOT + +%changelog +* Tue May 13 2003 Rui M. Seabra +- fix spec to reflect current stat of the build + +* Tue Jun 18 2002 Rui M. Seabra +- set permission correctly +- fix common mistake of Copyright flag into License flag. + +* Thu May 23 2002 Jody Goldberg +- Initial version diff --git a/libgsf-1.spec.in b/libgsf-1.spec.in new file mode 100644 index 0000000..49335ea --- /dev/null +++ b/libgsf-1.spec.in @@ -0,0 +1,83 @@ +%define name libgsf +%define version @VERSION@ +%define release 1 +%define prefix /usr + +Summary: GNOME Structured File library + +Name: %{name} +Version: %{version} +Release: %{release} +Group: System Environment/Libraries +License: LGPL + +Source: ftp://ftp.gnome.org/pub/GNOME/unstable/sources/libgsf/%{name}-%{version}.tar.gz +Buildroot: /var/tmp/%{name}-%{version}-%{release}-root +URL: http://www.gnumeric.org + +Requires: glib2 >= 2.6.0 +BuildRequires: glib2-devel >= 2.6.0 + +%description +A library for reading and writing structured files (eg MS OLE and Zip) + +%package devel +Summary: Support files necessary to compile applications with libgsf. +Group: Development/Libraries +Requires: libgsf + +%description devel +Libraries, headers, and support files necessary to compile applications using libgsf. + +%prep + +%setup + +%build +%ifarch alpha + MYARCH_FLAGS="--host=alpha-redhat-linux" +%endif + +if [ ! -f configure ]; then +CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%{prefix} +else +CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} +fi + +if [ "$SMP" != "" ]; then + (make "MAKE=make -k -j $SMP"; exit 0) + make +else + make +fi + +%install +if [ -d $RPM_BUILD_ROOT ]; then rm -r $RPM_BUILD_ROOT; fi +mkdir -p $RPM_BUILD_ROOT%{prefix} +make prefix=$RPM_BUILD_ROOT%{prefix} install + +%files +%defattr(644,root,root,755) +%doc AUTHORS COPYING README +%{prefix}/lib/lib*.so* + +%files devel +%defattr(644,root,root,755) +%{prefix}/lib/*a +%{prefix}/lib/pkgconfig/libgsf-*1.pc +%{prefix}/include/libgsf-1/* +%{prefix}/share/doc/libgsf/html/* + +%clean +rm -r $RPM_BUILD_ROOT + +%changelog +* Tue May 13 2003 Rui M. Seabra +- fix spec to reflect current stat of the build + +* Tue Jun 18 2002 Rui M. Seabra +- set permission correctly +- fix common mistake of Copyright flag into License flag. + +* Thu May 23 2002 Jody Goldberg +- Initial version diff --git a/libgsf-gnome-1.pc.in b/libgsf-gnome-1.pc.in new file mode 100644 index 0000000..91efeb1 --- /dev/null +++ b/libgsf-gnome-1.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libgsf-gnome-1 +Description: GNOME specific extensions to libgsf +Version: @VERSION@ +Requires: libgsf-1 @BONOBO_REQ@ @GNOMEVFS_REQ@ +Libs: -L${libdir} -lgsf-gnome-1 +Cflags: diff --git a/libgsf-gnome-1.spec b/libgsf-gnome-1.spec new file mode 100644 index 0000000..d83263e --- /dev/null +++ b/libgsf-gnome-1.spec @@ -0,0 +1,80 @@ +%define name libgsf-1 +%define version 1.14.21 +%define release 1 +%define prefix /usr + +Summary: GNOME specific extensions to libgsf + +Name: %{name} +Version: %{version} +Release: %{release} +Group: System Environment/Libraries +License: LGPL + +Source: ftp://ftp.gnome.org/pub/GNOME/unstable/sources/libgsf/libgsf-%{version}.tar.gz +Buildroot: /var/tmp/%{name}-%{version}-%{release}-root +URL: http://www.gnumeric.org + +Requires: libgsf-1 >= 1.3.0 gnome-vfs >= 2.0.0 + +%description +GNOME specific extensions to support bonobo and gnome-vfs + +%package devel +Summary: Support files necessary to compile applications with libgsf-gnome. +Group: Development/Libraries +Requires: libgsf-gnome-1 + +%description devel +Libraries, headers, and support files necessary to compile applications using +GNOME specific extensions to libgsf. + +%prep +%setup -n libgsf-%{version} + +%build +%ifarch alpha + MYARCH_FLAGS="--host=alpha-redhat-linux" +%endif + +if [ ! -f configure ]; then +CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%{prefix} +else +CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} +fi + +if [ "$SMP" != "" ]; then + (make "MAKE=make -k -j $SMP"; exit 0) + make +else + make +fi + +%install +if [ -d $RPM_BUILD_ROOT ]; then rm -r $RPM_BUILD_ROOT; fi +mkdir -p $RPM_BUILD_ROOT%{prefix} +make prefix=$RPM_BUILD_ROOT%{prefix} install + +%files +%defattr(644,root,root,755) +%doc AUTHORS COPYING README +%{prefix}/lib/lib*.so.* + +%files devel +%defattr(644,root,root,755) +%{prefix}/lib/lib*.so +%{prefix}/lib/*a +%{prefix}/include/libgsf-1/* ++%{prefix}/lib/pkgconfig/* ++%{prefix}/share/doc/* + +%clean +rm -r $RPM_BUILD_ROOT + +%changelog +* Sun Aug 03 2003 Joseph Frazee +- Fixed some things, %{setup} -n libgsf-%{version} and removed %files devel + %{prefix}/lib/*.sh and %{prefix}/share/doc/gsf/* + +* Thu Aug 15 2002 Jody Goldberg +- Initial version diff --git a/libgsf-gnome-1.spec.in b/libgsf-gnome-1.spec.in new file mode 100644 index 0000000..b7813ed --- /dev/null +++ b/libgsf-gnome-1.spec.in @@ -0,0 +1,80 @@ +%define name libgsf-1 +%define version @VERSION@ +%define release 1 +%define prefix /usr + +Summary: GNOME specific extensions to libgsf + +Name: %{name} +Version: %{version} +Release: %{release} +Group: System Environment/Libraries +License: LGPL + +Source: ftp://ftp.gnome.org/pub/GNOME/unstable/sources/libgsf/libgsf-%{version}.tar.gz +Buildroot: /var/tmp/%{name}-%{version}-%{release}-root +URL: http://www.gnumeric.org + +Requires: libgsf-1 >= 1.3.0 gnome-vfs >= 2.0.0 + +%description +GNOME specific extensions to support bonobo and gnome-vfs + +%package devel +Summary: Support files necessary to compile applications with libgsf-gnome. +Group: Development/Libraries +Requires: libgsf-gnome-1 + +%description devel +Libraries, headers, and support files necessary to compile applications using +GNOME specific extensions to libgsf. + +%prep +%setup -n libgsf-%{version} + +%build +%ifarch alpha + MYARCH_FLAGS="--host=alpha-redhat-linux" +%endif + +if [ ! -f configure ]; then +CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%{prefix} +else +CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} +fi + +if [ "$SMP" != "" ]; then + (make "MAKE=make -k -j $SMP"; exit 0) + make +else + make +fi + +%install +if [ -d $RPM_BUILD_ROOT ]; then rm -r $RPM_BUILD_ROOT; fi +mkdir -p $RPM_BUILD_ROOT%{prefix} +make prefix=$RPM_BUILD_ROOT%{prefix} install + +%files +%defattr(644,root,root,755) +%doc AUTHORS COPYING README +%{prefix}/lib/lib*.so.* + +%files devel +%defattr(644,root,root,755) +%{prefix}/lib/lib*.so +%{prefix}/lib/*a +%{prefix}/include/libgsf-1/* ++%{prefix}/lib/pkgconfig/* ++%{prefix}/share/doc/* + +%clean +rm -r $RPM_BUILD_ROOT + +%changelog +* Sun Aug 03 2003 Joseph Frazee +- Fixed some things, %{setup} -n libgsf-%{version} and removed %files devel + %{prefix}/lib/*.sh and %{prefix}/share/doc/gsf/* + +* Thu Aug 15 2002 Jody Goldberg +- Initial version diff --git a/libgsf-win32-1.pc.in b/libgsf-win32-1.pc.in new file mode 100644 index 0000000..29a9cd3 --- /dev/null +++ b/libgsf-win32-1.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libgsf-gnome-1 +Description: Win32 specific extensions to libgsf +Version: @VERSION@ +Requires: libgsf-1 +Libs: -L${libdir} -lgsf-win32-1 +Cflags: diff --git a/libgsf-zip.in b/libgsf-zip.in new file mode 100755 index 0000000..babf8e7 --- /dev/null +++ b/libgsf-zip.in @@ -0,0 +1,43 @@ +#!/bin/sh + +# Build runtime and developer zipfiles for libgsf and libgsf-gnome for +# Win32. + +ZIP=/tmp/libgsf-@VERSION@.zip +DEVZIP=/tmp/libgsf-dev-@VERSION@.zip +GNOMEZIP=/tmp/libgsf-gnome-@VERSION@.zip +GNOMEDEVZIP=/tmp/libgsf-gnome-dev-@VERSION@.zip + +cd @prefix@ + +rm $ZIP +zip $ZIP -@ <, 1996 + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# Usage: $progname [OPTION]... [MODE-ARG]... +# +# Provide generalized library-building support services. +# +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print informational messages (default) +# --version print version information +# -h, --help print short or long help message +# +# MODE must be one of the following: +# +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory +# +# MODE-ARGS vary depending on the MODE. +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. +# +# When reporting a bug, please describe a test case to reproduce it and +# include the following information: +# +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.2.6b +# automake: $automake_version +# autoconf: $autoconf_version +# +# Report bugs to . + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION=2.2.6b +TIMESTAMP="" +package_revision=1.3018 + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# NLS nuisances: We save the old values to restore during execute mode. +# Only set LANG and LC_ALL to C if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +lt_user_locale= +lt_safe_locale= +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" +done + +$lt_unset CDPATH + + + + + +: ${CP="cp -f"} +: ${ECHO="echo"} +: ${EGREP="/usr/bin/grep -E"} +: ${FGREP="/usr/bin/grep -F"} +: ${GREP="/usr/bin/grep"} +: ${LN_S="ln -s"} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SED="/usr/bin/sed"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} +: ${Xsed="$SED -e 1s/^X//"} + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +exit_status=$EXIT_SUCCESS + +# Make sure IFS has a sensible default +lt_nl=' +' +IFS=" $lt_nl" + +dirname="s,/[^/]*$,," +basename="s,^.*/,," + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + +# Generated shell functions inserted here. + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +# In the unlikely event $progname began with a '-', it would play havoc with +# func_echo (imagine progname=-n), so we prepend ./ in that case: +func_dirname_and_basename "$progpath" +progname=$func_basename_result +case $progname in + -*) progname=./$progname ;; +esac + +# Make sure we have an absolute path for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=$func_dirname_result + progdir=`cd "$progdir" && pwd` + progpath="$progdir/$progname" + ;; + *) + save_IFS="$IFS" + IFS=: + for progdir in $PATH; do + IFS="$save_IFS" + test -x "$progdir/$progname" && break + done + IFS="$save_IFS" + test -n "$progdir" || progdir=`pwd` + progpath="$progdir/$progname" + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed="${SED}"' -e 1s/^X//' +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Re-`\' parameter expansions in output of double_quote_subst that were +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' +# in input to double_quote_subst, that '$' was protected from expansion. +# Since each input `\' is now two `\'s, look for any number of runs of +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. +bs='\\' +bs2='\\\\' +bs4='\\\\\\\\' +dollar='\$' +sed_double_backslash="\ + s/$bs4/&\\ +/g + s/^$bs2$dollar/$bs&/ + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g + s/\n//g" + +# Standard options: +opt_dry_run=false +opt_help=false +opt_quiet=false +opt_verbose=false +opt_warning=: + +# func_echo arg... +# Echo program name prefixed message, along with the current mode +# name if it has been set yet. +func_echo () +{ + $ECHO "$progname${mode+: }$mode: $*" +} + +# func_verbose arg... +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $opt_verbose && func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + +# func_error arg... +# Echo program name prefixed message to standard error. +func_error () +{ + $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 +} + +# func_warning arg... +# Echo program name prefixed warning message to standard error. +func_warning () +{ + $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +} + +# func_fatal_error arg... +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + +# func_fatal_help arg... +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + func_error ${1+"$@"} + func_fatal_error "$help" +} +help="Try \`$progname --help' for more information." ## default + + +# func_grep expression filename +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_mkdir_p directory-path +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + my_directory_path="$1" + my_dir_list= + + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + + # Protect directory names starting with `-' + case $my_directory_path in + -*) my_directory_path="./$my_directory_path" ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$my_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + my_dir_list="$my_directory_path:$my_dir_list" + + # If the last portion added has no slash in it, the list is done + case $my_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` + done + my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` + + save_mkdir_p_IFS="$IFS"; IFS=':' + for my_dir in $my_dir_list; do + IFS="$save_mkdir_p_IFS" + # mkdir can fail with a `File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$my_dir" 2>/dev/null || : + done + IFS="$save_mkdir_p_IFS" + + # Bail out if we (or some other process) failed to create a directory. + test -d "$my_directory_path" || \ + func_fatal_error "Failed to create \`$1'" + fi +} + + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$opt_dry_run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || \ + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + fi + + $ECHO "X$my_tmpdir" | $Xsed +} + + +# func_quote_for_eval arg +# Aesthetically quote ARG to be evaled later. +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT +# is double-quoted, suitable for a subsequent eval, whereas +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters +# which are still active within double quotes backslashified. +func_quote_for_eval () +{ + case $1 in + *[\\\`\"\$]*) + func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; + *) + func_quote_for_eval_unquoted_result="$1" ;; + esac + + case $func_quote_for_eval_unquoted_result in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and and variable + # expansion for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + ;; + *) + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" + esac +} + + +# func_quote_for_expand arg +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + case $1 in + *[\\\`\"]*) + my_arg=`$ECHO "X$1" | $Xsed \ + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + *) + my_arg="$1" ;; + esac + + case $my_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + my_arg="\"$my_arg\"" + ;; + esac + + func_quote_for_expand_result="$my_arg" +} + + +# func_show_eval cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$my_cmd" + my_status=$? + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + +# func_show_eval_locale cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$lt_user_locale + $my_cmd" + my_status=$? + eval "$lt_safe_locale" + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + + + + +# func_version +# Echo version message to standard output and exit. +func_version () +{ + $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p + }' < "$progpath" + exit $? +} + +# func_usage +# Echo short help message to standard output and exit. +func_usage () +{ + $SED -n '/^# Usage:/,/# -h/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p + }' < "$progpath" + $ECHO + $ECHO "run \`$progname --help | more' for full usage" + exit $? +} + +# func_help +# Echo long help message to standard output and exit. +func_help () +{ + $SED -n '/^# Usage:/,/# Report bugs to/ { + s/^# // + s/^# *$// + s*\$progname*'$progname'* + s*\$host*'"$host"'* + s*\$SHELL*'"$SHELL"'* + s*\$LTCC*'"$LTCC"'* + s*\$LTCFLAGS*'"$LTCFLAGS"'* + s*\$LD*'"$LD"'* + s/\$with_gnu_ld/'"$with_gnu_ld"'/ + s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + p + }' < "$progpath" + exit $? +} + +# func_missing_arg argname +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + func_error "missing argument for $1" + exit_cmd=exit +} + +exit_cmd=: + + + + + +# Check that we have a working $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, and then maybe $ECHO will work. + exec $SHELL "$progpath" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + +# Parse options once, thoroughly. This comes as soon as possible in +# the script to make things like `libtool --version' happen quickly. +{ + + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; + esac + + # Parse non-mode specific arguments: + while test "$#" -gt 0; do + opt="$1" + shift + + case $opt in + --config) func_config ;; + + --debug) preserve_args="$preserve_args $opt" + func_echo "enabling shell trace mode" + opt_debug='set -x' + $opt_debug + ;; + + -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break + execute_dlfiles="$execute_dlfiles $1" + shift + ;; + + --dry-run | -n) opt_dry_run=: ;; + --features) func_features ;; + --finish) mode="finish" ;; + + --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break + case $1 in + # Valid mode arguments: + clean) ;; + compile) ;; + execute) ;; + finish) ;; + install) ;; + link) ;; + relink) ;; + uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; + esac + + mode="$1" + shift + ;; + + --preserve-dup-deps) + opt_duplicate_deps=: ;; + + --quiet|--silent) preserve_args="$preserve_args $opt" + opt_silent=: + ;; + + --verbose| -v) preserve_args="$preserve_args $opt" + opt_silent=false + ;; + + --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break + preserve_args="$preserve_args $opt $1" + func_enable_tag "$1" # tagname is set here + shift + ;; + + # Separate optargs to long options: + -dlopen=*|--mode=*|--tag=*) + func_opt_split "$opt" + set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} + shift + ;; + + -\?|-h) func_usage ;; + --help) opt_help=: ;; + --version) func_version ;; + + -*) func_fatal_help "unrecognized option \`$opt'" ;; + + *) nonopt="$opt" + break + ;; + esac + done + + + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_duplicate_deps + ;; + esac + + # Having warned about all mis-specified options, bail out if + # anything was wrong. + $exit_cmd $EXIT_FAILURE +} + +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +## ----------- ## +## Main. ## +## ----------- ## + +$opt_help || { + # Sanity checks first: + func_check_version_match + + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" + fi + + test -z "$mode" && func_fatal_error "error: you must specify a MODE." + + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$mode' for more information." +} + + +# func_lalib_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if `file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case "$lalib_p_line" in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test "$lalib_p" = yes +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + func_lalib_p "$1" +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_ltwrapper_scriptname_result="" + if func_ltwrapper_executable_p "$1"; then + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" + fi +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $opt_debug + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs + eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# `FILE.' does not work on cygwin managed mounts. +func_source () +{ + $opt_debug + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $opt_debug + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_quote_for_eval "$arg" + CC_quoted="$CC_quoted $func_quote_for_eval_result" + done + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_quote_for_eval "$arg" + CC_quoted="$CC_quoted $func_quote_for_eval_result" + done + case "$@ " in + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with \`--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=${1} + if test "$build_libtool_libs" = yes; then + write_lobj=\'${2}\' + else + write_lobj=none + fi + + if test "$build_old_libs" = yes; then + write_oldobj=\'${3}\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T <?"'"'"' &()|`$[]' \ + && func_warning "libobj name \`$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname="$func_basename_result" + xdir="$func_dirname_result" + lobj=${xdir}$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + removelist="$removelist $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + removelist="$removelist $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test "$pic_mode" != no; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + command="$command -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test "$suppress_opt" = yes; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test "$build_old_libs" = yes; then + if test "$pic_mode" != yes; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test "$compiler_c_o" = yes; then + command="$command -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + command="$command$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { +test "$mode" = compile && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -shared do not build a \`.o' file suitable for static linking + -static only build a \`.o' file suitable for static linking + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode \`$mode'" + ;; + esac + + $ECHO + $ECHO "Try \`$progname --help' for more information about other modes." + + exit $? +} + + # Now that we've collected a possible --mode arg, show help if necessary + $opt_help && func_mode_help + + +# func_mode_execute arg... +func_mode_execute () +{ + $opt_debug + # The first argument is the command name. + cmd="$nonopt" + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + test -f "$file" \ + || func_fatal_help "\`$file' is not a file" + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$lib' is not a valid libtool archive" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "\`$file' was not linked with \`-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir="$func_dirname_result" + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir="$func_dirname_result" + ;; + + *) + func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file="$progdir/$program" + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_quote_for_eval "$file" + args="$args $func_quote_for_eval_result" + done + + if test "X$opt_dry_run" = Xfalse; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + $ECHO "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + fi +} + +test "$mode" = execute && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $opt_debug + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_silent && exit $EXIT_SUCCESS + + $ECHO "X----------------------------------------------------------------------" | $Xsed + $ECHO "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + $ECHO + $ECHO "If you ever happen to want to link against installed libraries" + $ECHO "in a given directory, LIBDIR, you must either use libtool, and" + $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" + $ECHO "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" + $ECHO " during execution" + fi + if test -n "$runpath_var"; then + $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" + $ECHO " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + $ECHO + + $ECHO "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" + $ECHO "pages." + ;; + *) + $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + $ECHO "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS +} + +test "$mode" = finish && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $opt_debug + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $ECHO "X$nonopt" | $GREP shtool >/dev/null; then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + install_prog="$install_prog$func_quote_for_eval_result" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + install_prog="$install_prog $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the \`$prev' option requires an argument" + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir="$func_dirname_result" + destname="$func_basename_result" + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "\`$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "\`$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir="$func_dirname_result" + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking \`$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname="$1" + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme="$stripme" + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name="$func_basename_result" + instname="$dir/$name"i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to \`$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script \`$wrapper'" + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "\`$lib' has not been installed in \`$libdir'" + finalize=no + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + $opt_dry_run || { + if test "$finalize" = yes; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file="$func_basename_result" + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_silent || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink \`$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file="$outputname" + else + func_warning "cannot relink \`$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name="$func_basename_result" + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test "$mode" = install && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $opt_debug + my_outputname="$1" + my_originator="$2" + my_pic_p="${3-no}" + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms="${my_outputname}S.c" + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${my_outputname}.nm" + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + func_verbose "generating symbol list for \`$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_verbose "extracting global C symbols from \`$progfile'" + $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + $ECHO >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +" + case $host in + *cygwin* | *mingw* | *cegcc* ) + $ECHO >> "$output_objdir/$my_dlsyms" "\ +/* DATA imports from DLLs on WIN32 con't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs. */" + lt_dlsym_const= ;; + *osf5*) + echo >> "$output_objdir/$my_dlsyms" "\ +/* This system does not cope well with relocations in const data */" + lt_dlsym_const= ;; + *) + lt_dlsym_const=const ;; + esac + + $ECHO >> "$output_objdir/$my_dlsyms" "\ +extern $lt_dlsym_const lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[]; +$lt_dlsym_const lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{\ + { \"$my_originator\", (void *) 0 }," + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + $ECHO >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + if test "X$my_pic_p" != Xno; then + pic_flag_for_symtable=" $pic_flag" + fi + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) symtab_cflags="$symtab_cflags $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for \`$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + $opt_debug + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | + $SED -n -e ' + 1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $opt_debug + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $opt_debug + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib="$func_basename_result" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`basename "$darwin_archive"` + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + + func_extract_archives_result="$my_oldobjs" +} + + + +# func_emit_wrapper_part1 [arg=no] +# +# Emit the first part of a libtool wrapper script on stdout. +# For more information, see the description associated with +# func_emit_wrapper(), below. +func_emit_wrapper_part1 () +{ + func_emit_wrapper_part1_arg1=no + if test -n "$1" ; then + func_emit_wrapper_part1_arg1=$1 + fi + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='${SED} -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + ECHO=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$ECHO works! + : + else + # Restart under the correct shell, and then maybe \$ECHO will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $ECHO "\ + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done +" +} +# end: func_emit_wrapper_part1 + +# func_emit_wrapper_part2 [arg=no] +# +# Emit the second part of a libtool wrapper script on stdout. +# For more information, see the description associated with +# func_emit_wrapper(), below. +func_emit_wrapper_part2 () +{ + func_emit_wrapper_part2_arg1=no + if test -n "$1" ; then + func_emit_wrapper_part2_arg1=$1 + fi + + $ECHO "\ + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} +# end: func_emit_wrapper_part2 + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=no + if test -n "$1" ; then + func_emit_wrapper_arg1=$1 + fi + + # split this up so that func_emit_cwrapperexe_src + # can call each part independently. + func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" + func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" +} + + +# func_to_host_path arg +# +# Convert paths to host format when used with build tools. +# Intended for use with "native" mingw (where libtool itself +# is running under the msys shell), or in the following cross- +# build environments: +# $build $host +# mingw (msys) mingw [e.g. native] +# cygwin mingw +# *nix + wine mingw +# where wine is equipped with the `winepath' executable. +# In the native mingw case, the (msys) shell automatically +# converts paths for any non-msys applications it launches, +# but that facility isn't available from inside the cwrapper. +# Similar accommodations are necessary for $host mingw and +# $build cygwin. Calling this function does no harm for other +# $host/$build combinations not listed above. +# +# ARG is the path (on $build) that should be converted to +# the proper representation for $host. The result is stored +# in $func_to_host_path_result. +func_to_host_path () +{ + func_to_host_path_result="$1" + if test -n "$1" ; then + case $host in + *mingw* ) + lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + case $build in + *mingw* ) # actually, msys + # awkward: cmd appends spaces to result + lt_sed_strip_trailing_spaces="s/[ ]*\$//" + func_to_host_path_tmp1=`( cmd //c echo "$1" |\ + $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + *cygwin* ) + func_to_host_path_tmp1=`cygpath -w "$1"` + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + * ) + # Unfortunately, winepath does not exit with a non-zero + # error code, so we are forced to check the contents of + # stdout. On the other hand, if the command is not + # found, the shell will set an exit code of 127 and print + # *an error message* to stdout. So we must check for both + # error code of zero AND non-empty stdout, which explains + # the odd construction: + func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` + if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + else + # Allow warning below. + func_to_host_path_result="" + fi + ;; + esac + if test -z "$func_to_host_path_result" ; then + func_error "Could not determine host path corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_path_result="$1" + fi + ;; + esac + fi +} +# end: func_to_host_path + +# func_to_host_pathlist arg +# +# Convert pathlists to host format when used with build tools. +# See func_to_host_path(), above. This function supports the +# following $build/$host combinations (but does no harm for +# combinations not listed here): +# $build $host +# mingw (msys) mingw [e.g. native] +# cygwin mingw +# *nix + wine mingw +# +# Path separators are also converted from $build format to +# $host format. If ARG begins or ends with a path separator +# character, it is preserved (but converted to $host format) +# on output. +# +# ARG is a pathlist (on $build) that should be converted to +# the proper representation on $host. The result is stored +# in $func_to_host_pathlist_result. +func_to_host_pathlist () +{ + func_to_host_pathlist_result="$1" + if test -n "$1" ; then + case $host in + *mingw* ) + lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_to_host_pathlist_tmp2="$1" + # Once set for this call, this variable should not be + # reassigned. It is used in tha fallback case. + func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e 's|^:*||' -e 's|:*$||'` + case $build in + *mingw* ) # Actually, msys. + # Awkward: cmd appends spaces to result. + lt_sed_strip_trailing_spaces="s/[ ]*\$//" + func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ + $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + *cygwin* ) + func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + * ) + # unfortunately, winepath doesn't convert pathlists + func_to_host_pathlist_result="" + func_to_host_pathlist_oldIFS=$IFS + IFS=: + for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do + IFS=$func_to_host_pathlist_oldIFS + if test -n "$func_to_host_pathlist_f" ; then + func_to_host_path "$func_to_host_pathlist_f" + if test -n "$func_to_host_path_result" ; then + if test -z "$func_to_host_pathlist_result" ; then + func_to_host_pathlist_result="$func_to_host_path_result" + else + func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" + fi + fi + fi + IFS=: + done + IFS=$func_to_host_pathlist_oldIFS + ;; + esac + if test -z "$func_to_host_pathlist_result" ; then + func_error "Could not determine the host path(s) corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This may break if $1 contains DOS-style drive + # specifications. The fix is not to complicate the expression + # below, but for the user to provide a working wine installation + # with winepath so that path translation in the cross-to-mingw + # case works properly. + lt_replace_pathsep_nix_to_dos="s|:|;|g" + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ + $SED -e "$lt_replace_pathsep_nix_to_dos"` + fi + # Now, add the leading and trailing path separators back + case "$1" in + :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" + ;; + esac + case "$1" in + *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" + ;; + esac + ;; + esac + fi +} +# end: func_to_host_pathlist + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat < +#include +#ifdef _MSC_VER +# include +# include +# include +# define setmode _setmode +#else +# include +# include +# ifdef __CYGWIN__ +# include +# define HAVE_SETENV +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +#ifdef _MSC_VER +# define S_IXUSR _S_IEXEC +# define stat _stat +# ifndef _INTPTR_T_DEFINED +# define intptr_t int +# endif +#endif + +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifdef __CYGWIN__ +# define FOPEN_WB "wb" +#endif + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +#undef LTWRAPPER_DEBUGPRINTF +#if defined DEBUGWRAPPER +# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args +static void +ltwrapper_debugprintf (const char *fmt, ...) +{ + va_list args; + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); +} +#else +# define LTWRAPPER_DEBUGPRINTF(args) +#endif + +const char *program_name = NULL; + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_fatal (const char *message, ...); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_opt_process_env_set (const char *arg); +void lt_opt_process_env_prepend (const char *arg); +void lt_opt_process_env_append (const char *arg); +int lt_split_name_value (const char *arg, char** name, char** value); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); + +static const char *script_text_part1 = +EOF + + func_emit_wrapper_part1 yes | + $SED -e 's/\([\\"]\)/\\\1/g' \ + -e 's/^/ "/' -e 's/$/\\n"/' + echo ";" + cat <"))); + for (i = 0; i < newargc; i++) + { + LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); + } + +EOF + + case $host_os in + mingw*) + cat <<"EOF" + /* execv doesn't actually work on mingw as expected on unix */ + rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); + if (rval == -1) + { + /* failed to start process */ + LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); + return 127; + } + return rval; +EOF + ;; + *) + cat <<"EOF" + execv (lt_argv_zero, newargz); + return rval; /* =127, but avoids unused variable warning */ +EOF + ;; + esac + + cat <<"EOF" +} + +void * +xmalloc (size_t num) +{ + void *p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); + + return p; +} + +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), + string) : NULL; +} + +const char * +base_name (const char *name) +{ + const char *base; + +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char) name[0]) && name[1] == ':') + name += 2; +#endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} + +int +check_executable (const char *path) +{ + struct stat st; + + LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", + path ? (*path ? path : "EMPTY!") : "NULL!")); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", + path ? (*path ? path : "EMPTY!") : "NULL!")); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char *concat_name; + + LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", + wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", + tmp_pathspec)); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + char *errstr = strerror (errno); + lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal ("Could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp (str, pat) == 0) + *str = '\0'; + } + return str; +} + +static void +lt_error_core (int exit_status, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} + +void +lt_setenv (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", + (name ? name : ""), + (value ? value : ""))); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + int len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + int orig_value_len = strlen (orig_value); + int add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +int +lt_split_name_value (const char *arg, char** name, char** value) +{ + const char *p; + int len; + if (!arg || !*arg) + return 1; + + p = strchr (arg, (int)'='); + + if (!p) + return 1; + + *value = xstrdup (++p); + + len = strlen (arg) - strlen (*value); + *name = XMALLOC (char, len); + strncpy (*name, arg, len-1); + (*name)[len - 1] = '\0'; + + return 0; +} + +void +lt_opt_process_env_set (const char *arg) +{ + char *name = NULL; + char *value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); + } + + lt_setenv (name, value); + XFREE (name); + XFREE (value); +} + +void +lt_opt_process_env_prepend (const char *arg) +{ + char *name = NULL; + char *value = NULL; + char *new_value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); + } + + new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + XFREE (name); + XFREE (value); +} + +void +lt_opt_process_env_append (const char *arg) +{ + char *name = NULL; + char *value = NULL; + char *new_value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); + } + + new_value = lt_extend_str (getenv (name), value, 1); + lt_setenv (name, new_value); + XFREE (new_value); + XFREE (name); + XFREE (value); +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + (name ? name : ""), + (value ? value : ""))); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + int len = strlen (new_value); + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[len-1] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + (name ? name : ""), + (value ? value : ""))); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + + +EOF +} +# end: func_emit_cwrapperexe_src + +# func_mode_link arg... +func_mode_link () +{ + $opt_debug + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll which has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=no + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module="${wl}-single_module" + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + test -f "$arg" \ + || func_fatal_error "symbol file \`$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) deplibs="$deplibs $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file \`$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + weak) + weak_libs="$weak_libs $arg" + prev= + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "\`-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; + + -L*) + func_stripname '-L' '' "$arg" + dir=$func_stripname_result + if test -z "$dir"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" + else + func_fatal_error "need path for \`-L' option" + fi + fi + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of \`$dir'" + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + deplibs="$deplibs System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs="$deplibs $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot) + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; + esac + continue + ;; + + -multi_module) + single_module="${wl}-multi_module" + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" + func_warning "assuming \`-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + arg="$arg $wl$func_quote_for_eval_result" + compiler_flags="$compiler_flags $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + arg="$arg $wl$func_quote_for_eval_result" + compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" + linker_flags="$linker_flags $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -F/path gives path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" + func_append finalize_command " $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles="$dlfiles $arg" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= + else + deplibs="$deplibs $arg" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the \`$prevarg' option requires an argument" + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname="$func_basename_result" + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_duplicate_deps ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + libs="$libs $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + esac + pre_post_deps="$pre_post_deps $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test "$linkmode,$pass" = "lib,link"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs="$tmp_deplibs" + fi + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test "$linkmode,$pass" = "lib,dlpreopen"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + case $lib in + *.la) func_source "$lib" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` + case " $weak_libs " in + *" $deplib_base "*) ;; + *) deplibs="$deplibs $deplib" ;; + esac + done + done + libs="$dlprefiles" + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags="$compiler_flags $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + func_warning "\`-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test "$linkmode" = lib; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + *.ltframework) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + *) + func_warning "\`-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + func_stripname '-R' '' "$deplib" + dir=$func_stripname_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + $ECHO + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because the file extensions .$libext of this argument makes me believe" + $ECHO "*** that it is just a static archive that I should not use here." + else + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + ;; + esac + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + + if test "$found" = yes || test -f "$lib"; then : + else + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" + fi + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "\`$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" + fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles="$dlprefiles $lib $dependency_libs" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir="$ladir" + fi + ;; + esac + func_basename "$lib" + laname="$func_basename_result" + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath:" in + *"$absdir:"*) ;; + *) temp_rpath="$temp_rpath$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + notinst_deplibs="$notinst_deplibs $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule="" + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule="$dlpremoduletest" + break + fi + done + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + $ECHO + if test "$linkmode" = prog; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname="$1" + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + func_basename "$soroot" + soname="$func_basename_result" + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from \`$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for \`$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we can not + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null ; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $ECHO + $ECHO "*** And there doesn't seem to be a static archive available" + $ECHO "*** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + elif test -n "$old_library"; then + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && + test "$hardcode_minus_L" != yes && + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + $ECHO + $ECHO "*** Warning: This system can not link to static lib archive $lib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + $ECHO "*** But as you try to build a module library, libtool will still create " + $ECHO "*** a static module, that should work as long as the dlopening application" + $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + $ECHO + $ECHO "*** However, this would only work if libtool was able to extract symbol" + $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" + $ECHO "*** not find such a program. So, this module is probably useless." + $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path="$newlib_search_path $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + case $deplib in + -L*) path="$deplib" ;; + *.la) + func_dirname "$deplib" "" "." + dir="$func_dirname_result" + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of \`$dir'" + absdir="$dir" + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl" ; then + depdepl="$absdir/$objdir/$depdepl" + darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" + path= + fi + fi + ;; + *) + path="-L$absdir/$objdir" + ;; + esac + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "\`$deplib' seems to be moved" + + path="-L$absdir" + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test "$pass" = link; then + if test "$linkmode" = "prog"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs="$tmp_libs $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + fi + if test "$linkmode" = prog || test "$linkmode" = lib; then + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "\`-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "\`-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test "$module" = no && \ + func_fatal_help "libtool library \`$output' must begin with \`lib'" + + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + else + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + test "$dlself" != no && \ + func_warning "\`-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test "$#" -gt 1 && \ + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "\`-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + shift + IFS="$save_ifs" + + test -n "$7" && \ + func_fatal_help "too many parameters to \`-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$1" + number_minor="$2" + number_revision="$3" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + esac + ;; + no) + current="$1" + revision="$2" + age="$3" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT \`$current' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION \`$revision' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE \`$age' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE \`$age' is greater than the current interface number \`$current'" + func_fatal_error "\`$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current" + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + qnx) + major=".$current" + versuffix=".$current" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + + *) + func_fatal_configuration "unknown library version type \`$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + func_warning "undefined symbols not allowed in $host shared libraries" + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + fi + + func_generate_dlsyms "$libname" "$libname" "yes" + libobjs="$libobjs $symfileobj" + test "X$libobjs" = "X " && libobjs= + + if test "$mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + removelist="$removelist $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` + # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` + # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $ECHO + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $ECHO + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ + -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` + done + fi + if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | + $GREP . >/dev/null; then + $ECHO + if test "X$deplibs_check_method" = "Xnone"; then + $ECHO "*** Warning: inter-library dependencies are not supported in this platform." + else + $ECHO "*** Warning: inter-library dependencies are not known to be supported." + fi + $ECHO "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + $ECHO + $ECHO "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + $ECHO "*** a static module, that should work as long as the dlopening" + $ECHO "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + $ECHO + $ECHO "*** However, this would only work if libtool was able to extract symbol" + $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" + $ECHO "*** not find such a program. So, this module is probably useless." + $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + $ECHO "*** The inter-library dependencies that have been dropped here will be" + $ECHO "*** automatically added whenever a program is linked with this library" + $ECHO "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + $ECHO + $ECHO "*** Since this library must not contain undefined symbols," + $ECHO "*** because either the platform does not support them or" + $ECHO "*** it was explicitly requested with -no-undefined," + $ECHO "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname="$1" + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + linknames="$linknames $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols="$output_objdir/$libname.uexp" + delfiles="$delfiles $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols="$export_symbols" + export_symbols= + always_export_symbols=yes + fi + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + func_len " $cmd" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + fi + + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test "$compiler_needs_object" = yes && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + output_la=`$ECHO "X$output" | $Xsed -e "$basename"` + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then + output=${output_objdir}/${output_la}.lnkscript + func_verbose "creating GNU ld script: $output" + $ECHO 'INPUT (' > $output + for obj in $save_libobjs + do + $ECHO "$obj" >> $output + done + $ECHO ')' >> $output + delfiles="$delfiles $output" + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then + output=${output_objdir}/${output_la}.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test "$compiler_needs_object" = yes; then + firstobj="$1 " + shift + fi + for obj + do + $ECHO "$obj" >> $output + done + delfiles="$delfiles $output" + output=$firstobj\"$file_list_spec$output\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-${k}.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test "X$objlist" = X || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + if test -n "$last_robj"; then + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + fi + delfiles="$delfiles $output" + + else + output= + fi + + if ${skipped_export-false}; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + fi + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + if ${skipped_export-false}; then + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + fi + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $dlprefiles + libobjs="$libobjs $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "\`-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object \`$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "\`-release' is ignored for programs" + + test "$preload" = yes \ + && test "$dlopen_support" = unknown \ + && test "$dlopen_self" = unknown \ + && test "$dlopen_self_static" = unknown && \ + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=yes + case $host in + *cygwin* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + *cegcc) + # Disable wrappers for cegcc, we are cross compiling anyway. + wrappers_required=no + ;; + *) + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + esac + if test "$wrappers_required" = no; then + # Replace the output file specification. + compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + fi + + exit $exit_status + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "\`$output' will be relinked during installation" + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + func_show_eval "$link_command" 'exit $?' + + # Now create the wrapper script. + func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + fi + + # Quote $ECHO for shipping. + if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then + case $progpath in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; + *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + esac + qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host" ; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save $symfileobj" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then + oldobjs="$oldobjs $symfileobj" + fi + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $dlprefiles + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $ECHO "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase="$func_basename_result" + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlfiles="$newdlfiles $libdir/$name" + ;; + *) newdlfiles="$newdlfiles $lib" ;; + esac + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlprefiles="$newdlprefiles $libdir/$name" + ;; + esac + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles="$newdlfiles $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" + done + dlprefiles="$newdlprefiles" + fi + $RM $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +{ test "$mode" = link || test "$mode" = relink; } && + func_mode_link ${1+"$@"} + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $opt_debug + RM="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) RM="$RM $arg"; rmforce=yes ;; + -*) RM="$RM $arg" ;; + *) files="$files $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + fi + func_basename "$file" + name="$func_basename_result" + test "$mode" = uninstall && objdir="$dir" + + # Remember objdir for removal later, being careful to avoid duplicates + if test "$mode" = clean; then + case " $rmdirs " in + *" $objdir "*) ;; + *) rmdirs="$rmdirs $objdir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $objdir/$n" + done + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + + case "$mode" in + clean) + case " $library_names " in + # " " in the beginning catches empty $dlname + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && + test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + rmfiles="$rmfiles $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + objdir="$origobjdir" + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +{ test "$mode" = uninstall || test "$mode" = clean; } && + func_mode_uninstall ${1+"$@"} + +test -z "$mode" && { + help="$generic_help" + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode \`$mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: +# vi:sw=2 + diff --git a/m4/Makefile.am b/m4/Makefile.am new file mode 100644 index 0000000..e52dcc3 --- /dev/null +++ b/m4/Makefile.am @@ -0,0 +1,5 @@ +EXTRA_DIST = \ + gtk-doc.m4 \ + intltool.m4 \ + python.m4 + diff --git a/m4/Makefile.in b/m4/Makefile.in new file mode 100644 index 0000000..586413e --- /dev/null +++ b/m4/Makefile.in @@ -0,0 +1,437 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = m4 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/gsf-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BONOBO_REQ = @BONOBO_REQ@ +BZ2_LIBS = @BZ2_LIBS@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURRENT_MINUS_AGE = @CURRENT_MINUS_AGE@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ +GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GNOMEVFS_REQ = @GNOMEVFS_REQ@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEXE = @LIBEXE@ +LIBGSF_BONOBO_CFLAGS = @LIBGSF_BONOBO_CFLAGS@ +LIBGSF_BONOBO_LIBS = @LIBGSF_BONOBO_LIBS@ +LIBGSF_CFLAGS = @LIBGSF_CFLAGS@ +LIBGSF_GIO_CFLAGS = @LIBGSF_GIO_CFLAGS@ +LIBGSF_GIO_LIBS = @LIBGSF_GIO_LIBS@ +LIBGSF_GNOME_CFLAGS = @LIBGSF_GNOME_CFLAGS@ +LIBGSF_GNOME_LIBS = @LIBGSF_GNOME_LIBS@ +LIBGSF_LIBS = @LIBGSF_LIBS@ +LIBGSF_MAJOR_VERSION = @LIBGSF_MAJOR_VERSION@ +LIBGSF_MICRO_VERSION = @LIBGSF_MICRO_VERSION@ +LIBGSF_MINOR_VERSION = @LIBGSF_MINOR_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +PYGTK_CFLAGS = @PYGTK_CFLAGS@ +PYGTK_CODEGEN = @PYGTK_CODEGEN@ +PYGTK_LIBS = @PYGTK_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +WARN_CFLAGS = @WARN_CFLAGS@ +WINDRES = @WINDRES@ +XGETTEXT = @XGETTEXT@ +Z_CPPFLAGS = @Z_CPPFLAGS@ +Z_LIBS = @Z_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = \ + gtk-doc.m4 \ + intltool.m4 \ + python.m4 + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu m4/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +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 . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.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-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + + +# 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/m4/gtk-doc.m4 b/m4/gtk-doc.m4 new file mode 100644 index 0000000..2cfa1e7 --- /dev/null +++ b/m4/gtk-doc.m4 @@ -0,0 +1,61 @@ +dnl -*- mode: autoconf -*- + +# serial 1 + +dnl Usage: +dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) +AC_DEFUN([GTK_DOC_CHECK], +[ + AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first + AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first + + dnl check for tools we added during development + AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check]) + AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) + AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) + + dnl for overriding the documentation installation directory + AC_ARG_WITH([html-dir], + AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, + [with_html_dir='${datadir}/gtk-doc/html']) + HTML_DIR="$with_html_dir" + AC_SUBST([HTML_DIR]) + + dnl enable/disable documentation building + AC_ARG_ENABLE([gtk-doc], + AS_HELP_STRING([--enable-gtk-doc], + [use gtk-doc to build documentation [[default=no]]]),, + [enable_gtk_doc=no]) + + if test x$enable_gtk_doc = xyes; then + ifelse([$1],[], + [PKG_CHECK_EXISTS([gtk-doc],, + AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], + [PKG_CHECK_EXISTS([gtk-doc >= $1],, + AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))]) + fi + + AC_MSG_CHECKING([whether to build gtk-doc documentation]) + AC_MSG_RESULT($enable_gtk_doc) + + dnl enable/disable output formats + AC_ARG_ENABLE([gtk-doc-html], + AS_HELP_STRING([--enable-gtk-doc-html], + [build documentation in html format [[default=yes]]]),, + [enable_gtk_doc_html=yes]) + AC_ARG_ENABLE([gtk-doc-pdf], + AS_HELP_STRING([--enable-gtk-doc-pdf], + [build documentation in pdf format [[default=no]]]),, + [enable_gtk_doc_pdf=no]) + + if test -z "$GTKDOC_MKPDF"; then + enable_gtk_doc_pdf=no + fi + + + AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) + AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) + AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) + AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) + AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"]) +]) diff --git a/m4/intltool.m4 b/m4/intltool.m4 new file mode 100644 index 0000000..839e855 --- /dev/null +++ b/m4/intltool.m4 @@ -0,0 +1,216 @@ +## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*- +## Copyright (C) 2001 Eazel, Inc. +## Author: Maciej Stachowiak +## Kenneth Christiansen +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +## +## As a special exception to the GNU General Public License, if you +## distribute this file as part of a program that contains a +## configuration script generated by Autoconf, you may include it under +## the same distribution terms that you use for the rest of that program. + +dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) +# serial 40 IT_PROG_INTLTOOL +AC_DEFUN([IT_PROG_INTLTOOL], [ +AC_PREREQ([2.50])dnl +AC_REQUIRE([AM_NLS])dnl + +case "$am__api_version" in + 1.[01234]) + AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool]) + ;; + *) + ;; +esac + +if test -n "$1"; then + AC_MSG_CHECKING([for intltool >= $1]) + + INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` + INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` + [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` + ] + AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) + test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || + AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) +fi + +AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update]) +AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge]) +AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract]) +if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then + AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.]) +fi + + INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' +INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@' + INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' +INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' + INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + +_IT_SUBST(INTLTOOL_DESKTOP_RULE) +_IT_SUBST(INTLTOOL_DIRECTORY_RULE) +_IT_SUBST(INTLTOOL_KEYS_RULE) +_IT_SUBST(INTLTOOL_PROP_RULE) +_IT_SUBST(INTLTOOL_OAF_RULE) +_IT_SUBST(INTLTOOL_PONG_RULE) +_IT_SUBST(INTLTOOL_SERVER_RULE) +_IT_SUBST(INTLTOOL_SHEET_RULE) +_IT_SUBST(INTLTOOL_SOUNDLIST_RULE) +_IT_SUBST(INTLTOOL_UI_RULE) +_IT_SUBST(INTLTOOL_XAM_RULE) +_IT_SUBST(INTLTOOL_KBD_RULE) +_IT_SUBST(INTLTOOL_XML_RULE) +_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE) +_IT_SUBST(INTLTOOL_CAVES_RULE) +_IT_SUBST(INTLTOOL_SCHEMAS_RULE) +_IT_SUBST(INTLTOOL_THEME_RULE) +_IT_SUBST(INTLTOOL_SERVICE_RULE) +_IT_SUBST(INTLTOOL_POLICY_RULE) + +# Check the gettext tools to make sure they are GNU +AC_PATH_PROG(XGETTEXT, xgettext) +AC_PATH_PROG(MSGMERGE, msgmerge) +AC_PATH_PROG(MSGFMT, msgfmt) +AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) +if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then + AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) +fi +xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" +mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" +mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" +if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then + AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) +fi + +AC_PATH_PROG(INTLTOOL_PERL, perl) +if test -z "$INTLTOOL_PERL"; then + AC_MSG_ERROR([perl not found]) +fi +AC_MSG_CHECKING([for perl >= 5.8.1]) +$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 +if test $? -ne 0; then + AC_MSG_ERROR([perl 5.8.1 is required for intltool]) +else + IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`" + AC_MSG_RESULT([$IT_PERL_VERSION]) +fi +if test "x$2" != "xno-xml"; then + AC_MSG_CHECKING([for XML::Parser]) + if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then + AC_MSG_RESULT([ok]) + else + AC_MSG_ERROR([XML::Parser perl module is required for intltool]) + fi +fi + +# Substitute ALL_LINGUAS so we can use it in po/Makefile +AC_SUBST(ALL_LINGUAS) + +# Set DATADIRNAME correctly if it is not set yet +# (copied from glib-gettext.m4) +if test -z "$DATADIRNAME"; then + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[]], + [[extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr]])], + [DATADIRNAME=share], + [case $host in + *-*-solaris*) + dnl On Solaris, if bind_textdomain_codeset is in libc, + dnl GNU format message catalog is always supported, + dnl since both are added to the libc all together. + dnl Hence, we'd like to go with DATADIRNAME=share + dnl in this case. + AC_CHECK_FUNC(bind_textdomain_codeset, + [DATADIRNAME=share], [DATADIRNAME=lib]) + ;; + *) + [DATADIRNAME=lib] + ;; + esac]) +fi +AC_SUBST(DATADIRNAME) + +IT_PO_SUBDIR([po]) + +]) + + +# IT_PO_SUBDIR(DIRNAME) +# --------------------- +# All po subdirs have to be declared with this macro; the subdir "po" is +# declared by IT_PROG_INTLTOOL. +# +AC_DEFUN([IT_PO_SUBDIR], +[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. +dnl +dnl The following CONFIG_COMMANDS should be executed at the very end +dnl of config.status. +AC_CONFIG_COMMANDS_PRE([ + AC_CONFIG_COMMANDS([$1/stamp-it], [ + if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then + AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.]) + fi + rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp" + >"$1/stamp-it.tmp" + [sed '/^#/d + s/^[[].*] *// + /^[ ]*$/d + '"s|^| $ac_top_srcdir/|" \ + "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES" + ] + [sed '/^POTFILES =/,/[^\\]$/ { + /^POTFILES =/!d + r $1/POTFILES + } + ' "$1/Makefile.in" >"$1/Makefile"] + rm -f "$1/Makefile.tmp" + mv "$1/stamp-it.tmp" "$1/stamp-it" + ]) +])dnl +]) + +# _IT_SUBST(VARIABLE) +# ------------------- +# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST +# +AC_DEFUN([_IT_SUBST], +[ +AC_SUBST([$1]) +m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) +] +) + +# deprecated macros +AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL]) +# A hint is needed for aclocal from Automake <= 1.9.4: +# AC_DEFUN([AC_PROG_INTLTOOL], ...) + diff --git a/m4/libtool.m4 b/m4/libtool.m4 new file mode 100644 index 0000000..4ff44c8 --- /dev/null +++ b/m4/libtool.m4 @@ -0,0 +1,7365 @@ +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 56 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl +_LT_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. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + +## ------------------------------------- ## +## Accumulate code for creating libtool. ## +## ------------------------------------- ## + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + +## ------------------------ ## +## FIXME: Eliminate VARNAME ## +## ------------------------ ## + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\[$]0 --fallback-echo"')dnl " + lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` + ;; +esac + +_LT_OUTPUT_LIBTOOL_INIT +]) + + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +cat >"$CONFIG_LT" <<_LTEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate a libtool stub with the current configuration. + +lt_cl_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AS_SHELL_SANITIZE +_AS_PREPARE + +exec AS_MESSAGE_FD>&1 +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +if test "$no_create" != yes; then + lt_cl_success=: + test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" + exec AS_MESSAGE_LOG_FD>/dev/null + $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false + exec AS_MESSAGE_LOG_FD>>config.log + $lt_cl_success || AS_EXIT(1) +fi +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_XSI_SHELLFNS + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES +# -------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX +# ----------------------- +# 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. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +AC_LINK_IFELSE([AC_LANG_PROGRAM],[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_SHELL_INIT + + +# _LT_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. +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[_LT_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$lt_ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +ECHO=${lt_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 <<_LT_EOF +[$]* +_LT_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 "$lt_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 && + { 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. +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(lt_ECHO) +]) +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], + [An echo program that does not interpret backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __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-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + 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-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +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" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[AC_CHECK_TOOL(AR, ar, false) +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1]) + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__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 + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "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 -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + 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 + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line __oline__ "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +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 ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__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_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_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. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$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' + ;; + esac + ;; + +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* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw* | cegcc*) + # 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}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + 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 + ;; + +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 + ;; + *) # from 4.6 on, and DragonFly + 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' + ;; + +interix[[3-9]]*) + 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* | k*bsd*-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' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/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' + ;; + +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=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + 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 + 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 + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +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 + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + 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=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method == "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[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_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_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 -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC*) + # IBM XL 8.0 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac +AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.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. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $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' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -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_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_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_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], [ + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + ]) + LDFLAGS="$save_LDFLAGS" + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], + [[If ld is used when linking, flag to hardcode $libdir into a binary + during linking. This must work even if $libdir does not exist]]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [fix_srcfile_path], [1], + [Fix the shell variable $srcfile for the compiler]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_PROG_CXX +# ------------ +# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ +# compiler, we have our own version here. +m4_defun([_LT_PROG_CXX], +[ +pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) +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 +else + _lt_caught_CXX_error=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_CXX + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_CXX], []) + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[AC_REQUIRE([_LT_PROG_CXX])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_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_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + gnu*) + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 will use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed' + ;; + xl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='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_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=echo + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='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_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared -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_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +]) +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case $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_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_PROG_F77 +# ------------ +# Since AC_PROG_F77 is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_F77], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) +AC_PROG_F77 +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_F77 + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_F77], []) + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_REQUIRE([_LT_PROG_F77])dnl +AC_LANG_PUSH(Fortran 77) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${F77-"f77"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_PROG_FC +# ----------- +# Since AC_PROG_FC is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_FC], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) +AC_PROG_FC +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_FC + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_FC], []) + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_REQUIRE([_LT_PROG_FC])dnl +AC_LANG_PUSH(Fortran) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${FC-"f95"} + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC="$lt_save_CC" +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC="$lt_save_CC" +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_XSI_SHELLFNS +# --------------------- +# Bourne and XSI compatible variants of some useful shell functions. +m4_defun([_LT_PROG_XSI_SHELLFNS], +[case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $[*] )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + +dnl func_dirname_and_basename +dnl A portable version of this function is already defined in general.m4sh +dnl so there is no need for it here. + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} + +# sed scripts: +my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[[^=]]*=//' + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$[@]"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]+=\$[2]" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]=\$$[1]\$[2]" +} + +_LT_EOF + ;; + esac +]) diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4 new file mode 100644 index 0000000..34151a3 --- /dev/null +++ b/m4/ltoptions.m4 @@ -0,0 +1,368 @@ +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + +## --------------------------------- ## +## Macros to handle LT_INIT options. ## +## --------------------------------- ## + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [0], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + +## ----------------- ## +## LTDL_INIT Options ## +## ----------------- ## + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4 new file mode 100644 index 0000000..9000a05 --- /dev/null +++ b/m4/ltsugar.m4 @@ -0,0 +1,123 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) diff --git a/m4/ltversion.m4 b/m4/ltversion.m4 new file mode 100644 index 0000000..1da0e8c --- /dev/null +++ b/m4/ltversion.m4 @@ -0,0 +1,23 @@ +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# Generated from ltversion.in. + +# serial 3018 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.2.6b]) +m4_define([LT_PACKAGE_REVISION], [1.3018]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.2.6b' +macro_revision='1.3018' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4 new file mode 100644 index 0000000..637bb20 --- /dev/null +++ b/m4/lt~obsolete.m4 @@ -0,0 +1,92 @@ +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 4 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) diff --git a/m4/python.m4 b/m4/python.m4 new file mode 100644 index 0000000..e1c5266 --- /dev/null +++ b/m4/python.m4 @@ -0,0 +1,62 @@ +## this one is commonly used with AM_PATH_PYTHONDIR ... +dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]]) +dnl Check if a module containing a given symbol is visible to python. +AC_DEFUN([AM_CHECK_PYMOD], +[AC_REQUIRE([AM_PATH_PYTHON]) +py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` +AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1) +AC_CACHE_VAL(py_cv_mod_$py_mod_var, [ +ifelse([$2],[], [prog=" +import sys +try: + import $1 +except ImportError: + sys.exit(1) +except: + sys.exit(0) +sys.exit(0)"], [prog=" +import $1 +$1.$2"]) +if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC + then + eval "py_cv_mod_$py_mod_var=yes" + else + eval "py_cv_mod_$py_mod_var=no" + fi +]) +py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"` +if test "x$py_val" != xno; then + AC_MSG_RESULT(yes) + ifelse([$3], [],, [$3 +])dnl +else + AC_MSG_RESULT(no) + ifelse([$4], [],, [$4 +])dnl +fi +]) + +dnl a macro to check for ability to create python extensions +dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE]) +dnl function also defines PYTHON_INCLUDES +AC_DEFUN([AM_CHECK_PYTHON_HEADERS], +[AC_REQUIRE([AM_PATH_PYTHON]) +AC_MSG_CHECKING(for headers required to compile python extensions) +dnl deduce PYTHON_INCLUDES +py_prefix=`$PYTHON -c "import sys; print sys.prefix"` +py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` +PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" +if test "$py_prefix" != "$py_exec_prefix"; then + PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" +fi +AC_SUBST(PYTHON_INCLUDES) +dnl check if the headers exist: +save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" +AC_TRY_CPP([#include ],dnl +[AC_MSG_RESULT(found) +$1],dnl +[AC_MSG_RESULT(not found) +$2]) +CPPFLAGS="$save_CPPFLAGS" +]) diff --git a/missing b/missing new file mode 100755 index 0000000..28055d2 --- /dev/null +++ b/missing @@ -0,0 +1,376 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2009-04-28.21; # UTC + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, +# 2008, 2009 Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and +\`g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# normalize program name to check for. +program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). This is about non-GNU programs, so use $1 not +# $program. +case $1 in + lex*|yacc*) + # Not GNU programs, they don't have --version. + ;; + + tar*) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $program in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te*) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison*|yacc*) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex*|flex*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit $? + fi + ;; + + makeinfo*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar*) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case $firstarg in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case $firstarg in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/mkinstalldirs b/mkinstalldirs new file mode 100755 index 0000000..4191a45 --- /dev/null +++ b/mkinstalldirs @@ -0,0 +1,162 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy + +scriptversion=2009-04-28.21; # UTC + +# Original author: Noah Friedman +# Created: 1993-05-16 +# Public domain. +# +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' +IFS=" "" $nl" +errstatus=0 +dirmode= + +usage="\ +Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... + +Create each directory DIR (with mode MODE, if specified), including all +leading file name components. + +Report bugs to ." + +# process command line arguments +while test $# -gt 0 ; do + case $1 in + -h | --help | --h*) # -h for help + echo "$usage" + exit $? + ;; + -m) # -m PERM arg + shift + test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } + dirmode=$1 + shift + ;; + --version) + echo "$0 $scriptversion" + exit $? + ;; + --) # stop option processing + shift + break + ;; + -*) # unknown option + echo "$usage" 1>&2 + exit 1 + ;; + *) # first non-opt arg + break + ;; + esac +done + +for file +do + if test -d "$file"; then + shift + else + break + fi +done + +case $# in + 0) exit 0 ;; +esac + +# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and +# mkdir -p a/c at the same time, both will detect that a is missing, +# one will create a, then the other will try to create a and die with +# a "File exists" error. This is a problem when calling mkinstalldirs +# from a parallel make. We use --version in the probe to restrict +# ourselves to GNU mkdir, which is thread-safe. +case $dirmode in + '') + if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + echo "mkdir -p -- $*" + exec 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. + test -d ./-p && rmdir ./-p + test -d ./--version && rmdir ./--version + fi + ;; + *) + if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && + test ! -d ./--version; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + else + # Clean up after NextStep and OpenStep mkdir. + for d in ./-m ./-p ./--version "./$dirmode"; + do + test -d $d && rmdir $d + done + fi + ;; +esac + +for file +do + case $file in + /*) pathcomp=/ ;; + *) pathcomp= ;; + esac + oIFS=$IFS + IFS=/ + set fnord $file + shift + IFS=$oIFS + + for d + do + test "x$d" = x && continue + + pathcomp=$pathcomp$d + case $pathcomp in + -*) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + lasterr= + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi + + pathcomp=$pathcomp/ + done +done + +exit $errstatus + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/packaging/Makefile b/packaging/Makefile new file mode 100644 index 0000000..e8c6726 --- /dev/null +++ b/packaging/Makefile @@ -0,0 +1,5 @@ +PKG_NAME := libgsf +SPECFILE = $(addsuffix .spec, $(PKG_NAME)) +YAMLFILE = $(addsuffix .yaml, $(PKG_NAME)) + +include /usr/share/packaging-tools/Makefile.common diff --git a/packaging/libgsf.changes b/packaging/libgsf.changes index 1567dd9..9a8843d 100644 --- a/packaging/libgsf.changes +++ b/packaging/libgsf.changes @@ -1,2 +1,20 @@ -* Fri May 04 2012 Lin Yang -- test release infrastructure +* Wed May 23 20:44:26 UTC 2012 - tu.c.truong@intel.com +- Initial commit to Gerrit + +* Fri Jun 10 2011 Damien Lespiau - 1.14.21 +- Update to 1.14.21 +- Remove gsf-office-thumbnails and thus gconf dependency +- Update the Source url to use http, not ftp +- Port to yaml + +* Wed Mar 17 2010 Anas Nashif - 1.14.16 +- Disable support for libbonobo and gnome-vfs + +* Mon Mar 01 2010 Anas Nashif - 1.14.16 +- Add python-devel to BuildRequires + +* Tue Nov 24 2009 Anas Nashif - 1.14.16 +- Update to 1.14.16 + +* Thu Feb 19 2009 Anas Nashif 1.14.11 +- Initial import into Moblin diff --git a/packaging/libgsf.spec b/packaging/libgsf.spec index e69de29..7d405a9 100644 --- a/packaging/libgsf.spec +++ b/packaging/libgsf.spec @@ -0,0 +1,109 @@ +# +# Do NOT Edit the Auto-generated Part! +# Generated by: spectacle version 0.22 +# +# >> macros +# << macros + +Name: libgsf +Summary: GNOME Structured File library +Version: 1.14.21 +Release: 1 +Group: System/Libraries +License: LGPLv2 +URL: http://www.gnome.org/projects/libgsf/ +Source0: http://download.gnome.org/sources/%{name}/1.14/%{name}-%{version}.tar.bz2 +Source100: libgsf.yaml +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: perl-XML-Parser +BuildRequires: bzip2-devel +BuildRequires: gettext +BuildRequires: intltool + + +%description +A library for reading and writing structured files (eg MS OLE and Zip) + + +%package devel +Summary: Support files necessary to compile applications with libgsf +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +Libraries, headers, and support files necessary to compile applications +using libgsf. + + + +%prep +%setup -q -n %{name}-%{version} + +# >> setup +# << setup + +%build +# >> build pre +# << build pre + +%configure --disable-static \ + --disable-gtk-doc \ + --without-gnome-vfs \ + --without-bonobo \ + --without-gconf \ + --without-python + +make %{?jobs:-j%jobs} + +# >> build post +# << build post +%install +rm -rf %{buildroot} +# >> install pre +# << install pre +%make_install + +# >> install post + +# << install post +%find_lang libgsf + + + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + + + + + +%files -f libgsf.lang +%defattr(-,root,root,-) +# >> files +%doc COPYING +%{_libdir}/libgsf-1.so.* +# << files + + +%files devel +%defattr(-,root,root,-) +# >> files devel +%{_bindir}/gsf +%{_bindir}/gsf-vba-dump +%{_libdir}/libgsf-1.so +%{_libdir}/pkgconfig/libgsf-1.pc +%dir %{_includedir}/libgsf-1 +# This will be fixed by http://bugzilla.gnome.org/show_bug.cgi?id=652295 +%exclude %{_includedir}/libgsf-1/gsf-gnome +%{_includedir}/libgsf-1/gsf +%{_datadir}/gtk-doc/html/gsf +%{_mandir}/man1/gsf.1.gz +%{_mandir}/man1/gsf-vba-dump.1.gz +# This will be fixed by http://bugzilla.gnome.org/show_bug.cgi?id=652296 +%exclude %{_mandir}/man1/gsf-office-thumbnailer.1.gz +# << files devel + diff --git a/packaging/libgsf.yaml b/packaging/libgsf.yaml new file mode 100644 index 0000000..a8493bd --- /dev/null +++ b/packaging/libgsf.yaml @@ -0,0 +1,33 @@ +Name: libgsf +Summary: GNOME Structured File library +Version: 1.14.21 +Release: 1 +Group: System/Libraries +License: LGPLv2 +URL: http://www.gnome.org/projects/libgsf/ +Sources: + - http://download.gnome.org/sources/%{name}/1.14/%{name}-%{version}.tar.bz2 +Description: A library for reading and writing structured files (eg MS OLE and Zip) + +PkgConfigBR: + - glib-2.0 + - libxml-2.0 +PkgBR: + - perl-XML-Parser + - bzip2-devel + - gettext + - intltool +ConfigOptions: + - --disable-gtk-doc + - --without-gnome-vfs + - --without-bonobo + - --without-gconf + - --without-python +LocaleName: libgsf +SubPackages: + - Name: devel + Summary: Support files necessary to compile applications with libgsf + Group: Development/Libraries + Description: | + Libraries, headers, and support files necessary to compile applications + using libgsf. diff --git a/po/ChangeLog b/po/ChangeLog new file mode 100644 index 0000000..faccf38 --- /dev/null +++ b/po/ChangeLog @@ -0,0 +1,144 @@ +2011-05-20 Morten Welinder + + * Release 1.14.21 + +2011-03-24 Morten Welinder + + * Release 1.14.20 + +2010-09-25 Morten Welinder + + * Release 1.14.19 + +2010-04-07 Morten Welinder + + * Release 1.14.18 + +2010-02-13 Morten Welinder + + * Release 1.14.17 + +2009-10-11 Morten Welinder + + * Release 1.14.16 + +2009-06-20 Morten Welinder + + * Release 1.14.15 + +2009-05-23 Morten Welinder + + * Release 1.14.14 + +2009-05-06 Morten Welinder + + * Release 1.14.13 + +2009-04-25 Morten Welinder + + * Release 1.14.12 + +2009-01-06 Jody Goldberg + + * Release 1.14.11 + +2008-10-19 Jody Goldberg + + * Release 1.14.10 + +2008-08-29 Jody Goldberg + + * Release 1.14.9 + +2008-06-08 Kjartan Maraas + + * nb.po: Added Norwegian bokmål translation. + +2008-03-05 Morten Welinder + + * Release 1.14.8 + +2007-09-16 Daniel Nylander + + * sv.po: Updated Swedish translation. + +2007-09-10 Daniel Nylander + + * sv.po: Updated Swedish translation. + +2007-09-07 Jody Goldberg + + * Release 1.14.7 + +2007-09-03 Jody Goldberg + + * Release 1.14.6 + +2007-07-10 Jody Goldberg + + * Release 1.14.5 + +2007-06-18 Jody Goldberg + + * Release 1.14.4 + +2007-03-19 Abel Cheung + + * zh_HK.po, zh_TW.po: New traditional Chinese translation. + +2006-11-05 Jody Goldberg + + * Release 1.14.3 + +2006-09-26 Jody Goldberg + + * Release 1.14.2 + +2006-05-08 Jody Goldberg + + * Release 1.14.1 + +2006-03-02 Jody Goldberg + + * Release 1.14.0 / 1.13.99 (for Novell) + +2006-02-04 J.H.M. Dassen (Ray) + + * sv.po: New. (Debian #351382) + +2005-11-06 Jody Goldberg + + * Release 1.13.3 + +2005-10-10 Jody Goldberg + + * Release 1.13.2 + +2005-10-10 Jody Goldberg + + * Release 1.13.1 + +2005-10-04 Jody Goldberg + + * Release 1.13.0 + +2005-09-06 Jody Goldberg + + * Release 1.12.3 + +2005-08-13 Morten Welinder + + * Release 1.12.2 + +2005-07-19 gettextize + + * Makefile.in.in: New file, from gettext-0.14.3. + * boldquot.sed: New file, from gettext-0.14.3. + * en@boldquot.header: New file, from gettext-0.14.3. + * en@quot.header: New file, from gettext-0.14.3. + * insert-header.sin: New file, from gettext-0.14.3. + * quot.sed: New file, from gettext-0.14.3. + * remove-potcdate.sin: New file, from gettext-0.14.3. + * Rules-quot: New file, from gettext-0.14.3. + * POTFILES.in: New file. + diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 0000000..88bd5b3 --- /dev/null +++ b/po/LINGUAS @@ -0,0 +1,23 @@ +# please keep this list sorted alphabetically +# +ca +cs +da +de +en_GB +es +eu +fr +gl +it +nb +oc +pa +pl +pt +pt_BR +sl +sv +zh_CN +zh_HK +zh_TW diff --git a/po/Makefile.in.in b/po/Makefile.in.in new file mode 100644 index 0000000..cc8a222 --- /dev/null +++ b/po/Makefile.in.in @@ -0,0 +1,217 @@ +# Makefile for program source directory in GNU NLS utilities package. +# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper +# Copyright (C) 2004-2008 Rodney Dawes +# +# This file may be copied and used freely without restrictions. It may +# be used in projects which are not available under a GNU Public License, +# but which still want to provide support for the GNU gettext functionality. +# +# - Modified by Owen Taylor to use GETTEXT_PACKAGE +# instead of PACKAGE and to look for po2tbl in ./ not in intl/ +# +# - Modified by jacob berkman to install +# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize +# +# - Modified by Rodney Dawes for use with intltool +# +# We have the following line for use by intltoolize: +# INTLTOOL_MAKEFILE + +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +top_builddir = @top_builddir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +datadir = @datadir@ +datarootdir = @datarootdir@ +libdir = @libdir@ +DATADIRNAME = @DATADIRNAME@ +itlocaledir = $(prefix)/$(DATADIRNAME)/locale +subdir = po +install_sh = @install_sh@ +# Automake >= 1.8 provides @mkdir_p@. +# Until it can be supposed, use the safe fallback: +mkdir_p = $(install_sh) -d + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ + +GMSGFMT = @GMSGFMT@ +MSGFMT = @MSGFMT@ +XGETTEXT = @XGETTEXT@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist +GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot + +ALL_LINGUAS = @ALL_LINGUAS@ + +PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi) + +USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi) + +USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done) + +POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done) + +DISTFILES = Makefile.in.in POTFILES.in $(POFILES) +EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS + +POTFILES = \ +# This comment gets stripped out + +CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done) + +.SUFFIXES: +.SUFFIXES: .po .pox .gmo .mo .msg .cat + +.po.pox: + $(MAKE) $(GETTEXT_PACKAGE).pot + $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox + +.po.mo: + $(MSGFMT) -o $@ $< + +.po.gmo: + file=`echo $* | sed 's,.*/,,'`.gmo \ + && rm -f $$file && $(GMSGFMT) -o $$file $< + +.po.cat: + sed -f ../intl/po2msg.sed < $< > $*.msg \ + && rm -f $@ && gencat $@ $*.msg + + +all: all-@USE_NLS@ + +all-yes: $(CATALOGS) +all-no: + +$(GETTEXT_PACKAGE).pot: $(POTFILES) + $(GENPOT) + +install: install-data +install-data: install-data-@USE_NLS@ +install-data-no: all +install-data-yes: all + linguas="$(USE_LINGUAS)"; \ + for lang in $$linguas; do \ + dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ + $(mkdir_p) $$dir; \ + if test -r $$lang.gmo; then \ + $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ + echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \ + else \ + $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ + echo "installing $(srcdir)/$$lang.gmo as" \ + "$$dir/$(GETTEXT_PACKAGE).mo"; \ + fi; \ + if test -r $$lang.gmo.m; then \ + $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \ + echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \ + else \ + if test -r $(srcdir)/$$lang.gmo.m ; then \ + $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \ + $$dir/$(GETTEXT_PACKAGE).mo.m; \ + echo "installing $(srcdir)/$$lang.gmo.m as" \ + "$$dir/$(GETTEXT_PACKAGE).mo.m"; \ + else \ + true; \ + fi; \ + fi; \ + done + +# Empty stubs to satisfy archaic automake needs +dvi info ctags tags CTAGS TAGS ID: + +# Define this as empty until I found a useful application. +install-exec installcheck: + +uninstall: + linguas="$(USE_LINGUAS)"; \ + for lang in $$linguas; do \ + rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ + rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ + done + +check: all $(GETTEXT_PACKAGE).pot + rm -f missing notexist + srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m + if [ -r missing -o -r notexist ]; then \ + exit 1; \ + fi + +mostlyclean: + rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp + rm -f .intltool-merge-cache + +clean: mostlyclean + +distclean: clean + rm -f Makefile Makefile.in POTFILES stamp-it + rm -f *.mo *.msg *.cat *.cat.m *.gmo + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f Makefile.in.in + +distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: $(DISTFILES) + dists="$(DISTFILES)"; \ + extra_dists="$(EXTRA_DISTFILES)"; \ + for file in $$extra_dists; do \ + test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \ + done; \ + for file in $$dists; do \ + test -f $$file || file="$(srcdir)/$$file"; \ + ln $$file $(distdir) 2> /dev/null \ + || cp -p $$file $(distdir); \ + done + +update-po: Makefile + $(MAKE) $(GETTEXT_PACKAGE).pot + tmpdir=`pwd`; \ + linguas="$(USE_LINGUAS)"; \ + for lang in $$linguas; do \ + echo "$$lang:"; \ + result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \ + if $$result; then \ + if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "msgmerge for $$lang.gmo failed!"; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi; \ + done + +Makefile POTFILES: stamp-it + @if test ! -f $@; then \ + rm -f stamp-it; \ + $(MAKE) stamp-it; \ + fi + +stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \ + $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..b810929 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,10 @@ +# List of source files which contain translatable strings. +# Please keep this file sorted alphabetically. +[encoding: UTF-8] +gsf/gsf-blob.c +gsf/gsf-clip-data.c +gsf/gsf-msole-utils.c +gsf/gsf-input-http.c +gsf/gsf-open-pkg-utils.c +tools/gsf.c +thumbnailer/gsf-office-thumbnailer.schemas.in diff --git a/po/ca.po b/po/ca.po new file mode 100644 index 0000000..23b7ccf --- /dev/null +++ b/po/ca.po @@ -0,0 +1,613 @@ +# Catalan translation for libgsf. +# Copyright (C) 2010 libgsf's COPYRIGHT HOLDER +# This file is distributed under the same license as the libgsf package. +# David Planella , 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: libgsf master\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-01-24 23:44+0100\n" +"PO-Revision-Date: 2010-10-01 00:55+0200\n" +"Last-Translator: David Planella \n" +"Language-Team: Catalan \n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../gsf/gsf-blob.c:111 +#, c-format +msgid "Not enough memory to copy %s bytes of data" +msgstr "No hi ha prou memòria per copiar %s bytes de dades" + +#: ../gsf/gsf-clip-data.c:153 +#, c-format +msgid "The clip_data is in %s, but it is smaller than at least %s bytes" +msgstr "L'element clip_data és a %s, però és menor de %s bytes" + +#: ../gsf/gsf-clip-data.c:247 +#, c-format +msgid "" +"The clip_data is in Windows clipboard format, but it is smaller than the " +"required 4 bytes." +msgstr "" +"L'element clip_data és en el format del porta-retalls del Windows, però és " +"menor que els 4 bytes requerits." + +#: ../gsf/gsf-clip-data.c:258 +msgid "Windows Metafile format" +msgstr "Format de metafitxer del Windows" + +#. CF_BITMAP +#: ../gsf/gsf-clip-data.c:264 +msgid "Windows DIB or BITMAP format" +msgstr "Format DIB o BITMAP del Windows" + +#: ../gsf/gsf-clip-data.c:269 +msgid "Windows Enhanced Metafile format" +msgstr "Format de metafitxer millorat del Windows" + +#: ../gsf/gsf-msole-utils.c:315 +#, c-format +msgid "" +"Missing data when reading the %s property; got %s bytes, but %s bytes at " +"least are needed." +msgstr "" +"Mancaren dades en llegir la propietat %s: s'obtingueren %s bytes, però en " +"calen almenys %s." + +#: ../gsf/gsf-msole-utils.c:366 +#, c-format +msgid "" +"Corrupt data in the VT_CF property; clipboard data length must be at least 4 " +"bytes, but the data says it only has %s bytes available." +msgstr "" +"Hi ha dades malmeses a la propietat VT_CF. La llargada de les dades del " +"porta-retalls ha d'ésser d'almenys 4 bytes, però les dades contenen només %s " +"bytes disponibles." + +#: ../gsf/gsf-open-pkg-utils.c:351 +#, c-format +msgid "Unable to find part id='%s' for '%s'" +msgstr "No es pot trobar la part id=«%s» de «%s»" + +#: ../gsf/gsf-open-pkg-utils.c:379 +#, c-format +msgid "Unable to find part with type='%s' for '%s'" +msgstr "No es pot trobar la part de tipus=«%s» de «%s»" + +#: ../gsf/gsf-open-pkg-utils.c:409 +#, c-format +msgid "Missing id for part in '%s'" +msgstr "Manca l'identificador de la part a «%s»" + +#: ../gsf/gsf-open-pkg-utils.c:418 +#, c-format +msgid "Part '%s' in '%s' from '%s' is corrupt!" +msgstr "La part «%s» a «%s» de «%s» està malmesa" + +#: ../tools/gsf.c:22 +msgid "Display program version" +msgstr "Mostra la versió del programa" + +#: ../tools/gsf.c:44 +#, c-format +msgid "%s: Failed to open %s: %s\n" +msgstr "%s: ha fallat l'obertura de %s: %s\n" + +#: ../tools/gsf.c:65 +#, c-format +msgid "%s: Failed to recognize %s as an archive\n" +msgstr "%s: ha fallat el reconeixement de %s com a arxiu\n" + +#: ../tools/gsf.c:102 +#, c-format +msgid "Available subcommands are...\n" +msgstr "Les subordres disponibles són...\n" + +#: ../tools/gsf.c:103 +#, c-format +msgid "* cat output one or more files in archive\n" +msgstr "* cat mostra un o més fitxers de l'arxiu\n" + +#: ../tools/gsf.c:104 +#, c-format +msgid "* dump dump one or more files in archive as hex\n" +msgstr "* dump bolca un o més fitxers de l'arxiu en hexadecimal\n" + +#: ../tools/gsf.c:105 +#, c-format +msgid "* help list subcommands\n" +msgstr "* help mostra una llista de les subordres\n" + +#: ../tools/gsf.c:106 +#, c-format +msgid "* list list files in archive\n" +msgstr "* list mostra una llista dels fitxers de l'arxiu\n" + +#: ../tools/gsf.c:107 +#, c-format +msgid "* listprops list document properties in archive\n" +msgstr "" +"* listprops mostra una llista de les propietats dels documents de l'arxiu\n" + +#: ../tools/gsf.c:108 +#, c-format +msgid "* props print specified document properties\n" +msgstr "* props mostra les propietats del document especificat\n" + +#: ../tools/gsf.c:291 +#, c-format +msgid "No property named %s\n" +msgstr "No hi ha cap propietat anomenada %s\n" + +#: ../tools/gsf.c:364 +msgid "SUBCOMMAND ARCHIVE..." +msgstr "SUBORDRE ARXIU..." + +#: ../tools/gsf.c:371 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"Executeu «%s --help» per veure una llista de les opcions de la línia " +"d'ordres.\n" + +#: ../tools/gsf.c:378 +#, c-format +msgid "gsf version %d.%d.%d\n" +msgstr "versió de la gsf %d.%d.%d\n" + +#: ../tools/gsf.c:384 +#, c-format +msgid "Usage: %s %s\n" +msgstr "Forma d'ús: %s %s\n" + +#: ../tools/gsf.c:405 +#, c-format +msgid "Run '%s help' to see a list subcommands.\n" +msgstr "Executeu «%s help» per veure una llista de les subordres.\n" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "" +"Boolean options available, true enables thumbnailing and false disables the " +"creation of new thumbnails" +msgstr "" +"Hi ha disponibles opcions booleanes: «true» (cert) habilita la " +"miniaturització, i «false» (fals) inhabilita la creació de miniatures noves" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing for OpenOffice 1.x Calc spreadsheets" +msgstr "Habilita la miniaturització de fulls de càlcul de l'OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing for OpenOffice 1.x Drawing templates" +msgstr "" +"Habilita la miniaturització de les plantilles de l'editor de dibuixos de " +"l'OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing for OpenOffice 1.x Impress Presentation templates" +msgstr "" +"Habilita la miniaturització de les plantilles de l'editor de presentacions " +"de l'OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Enable thumbnailing for OpenOffice 1.x Impress presentations" +msgstr "" +"Habilita la miniaturització de les presentacions de l'editor de " +"presentacions de l'OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Enable thumbnailing for OpenOffice 1.x Math documents" +msgstr "" +"Habilita la miniaturització dels documents de fórmules de l'OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Enable thumbnailing for OpenOffice 1.x Spreadsheet templates" +msgstr "" +"Habilita la miniaturització de les plantilles de l'editor de fulls de càlcul " +"de l'OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Enable thumbnailing for OpenOffice 1.x Writer documents" +msgstr "" +"Habilita la miniaturització dels documents del processador de texts de " +"l'OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Enable thumbnailing for OpenOffice 1.x Writer global templates" +msgstr "" +"Habilita la miniaturització de les plantilles globals de l'editor de texts " +"de l'OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Enable thumbnailing for OpenOffice 1.x Writer templates" +msgstr "" +"Habilita la miniaturització de les plantilles de l'editor de texts de " +"l'OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:11 +msgid "Enable thumbnailing of Microsoft Excel 2007 spreadsheets" +msgstr "" +"Habilita la miniaturització dels fulls de càlcul del Microsoft Excel 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:12 +msgid "Enable thumbnailing of Microsoft Excel spreadsheets" +msgstr "Habilita la miniaturització dels fulls de càlcul del Microsoft Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:13 +msgid "Enable thumbnailing of Microsoft PowerPoint 2007 presentations" +msgstr "" +"Habilita la miniaturització de les presentacions del Microsoft PowerPoint " +"2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:14 +msgid "Enable thumbnailing of Microsoft PowerPoint presentations" +msgstr "" +"Habilita la miniaturització de les presentacions del Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:15 +msgid "Enable thumbnailing of Microsoft Word 2007 documents" +msgstr "Habilita la miniaturització dels documents del Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:16 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "Habilita la miniaturització dels documents del Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:17 +msgid "Enable thumbnailing of OpenDocument charts" +msgstr "Habilita la miniaturització dels diagrames OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:18 +msgid "Enable thumbnailing of OpenDocument drawing templates" +msgstr "Habilita la miniaturització de les plantilles de dibuix OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:19 +msgid "Enable thumbnailing of OpenDocument drawings" +msgstr "Habilita la miniaturització dels dibuixos OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:20 +msgid "Enable thumbnailing of OpenDocument formulas" +msgstr "Habilita la miniaturització de les fórmules OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:21 +msgid "Enable thumbnailing of OpenDocument images" +msgstr "Habilita la miniaturització de les imatges OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:22 +msgid "Enable thumbnailing of OpenDocument presentation templates" +msgstr "" +"Habilita la miniaturització de les plantilles de presentació OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:23 +msgid "Enable thumbnailing of OpenDocument presentations" +msgstr "Habilita la miniaturització de les presentacions OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:24 +msgid "Enable thumbnailing of OpenDocument spreadsheet templates" +msgstr "" +"Habilita la miniaturització de les plantilles de full de càlcul OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:25 +msgid "Enable thumbnailing of OpenDocument spreadsheets" +msgstr "Habilita la miniaturització de les fulles de càlcul OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:26 +msgid "Enable thumbnailing of OpenDocument wordprocessing document templates" +msgstr "" +"Habilita la miniaturització de les plantilles de documents del processament " +"de text OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:27 +msgid "Enable thumbnailing of OpenDocument wordprocessing documents" +msgstr "" +"Habilita la miniaturització dels documents dels processament de text " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:28 +msgid "Enable thumbnailing of OpenDocument wordprocessing master documents" +msgstr "" +"Habilita la miniaturització dels documents mestre dels processament de text " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:29 +msgid "Thumbnail command for Microsoft Excel 2007 spreadsheets" +msgstr "Ordre de miniaturització dels fulls de càlcul del Microsoft Excel 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:30 +msgid "Thumbnail command for Microsoft Excel spreadsheets" +msgstr "Ordre de miniaturització dels fulls de càlcul del Microsoft Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:31 +msgid "Thumbnail command for Microsoft PowerPoint 2007 presentations" +msgstr "" +"Ordre de miniaturització de les presentacions del Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:32 +msgid "Thumbnail command for Microsoft PowerPoint presentations" +msgstr "Ordre de miniaturització de les presentacions del Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:33 +msgid "Thumbnail command for Microsoft Word 2007 documents" +msgstr "Ordre de miniaturització dels documents del Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:34 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "Ordre de miniaturització dels documents del Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:35 +msgid "Thumbnail command for OpenDocument charts" +msgstr "Ordre de miniaturització dels diagrames OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:36 +msgid "Thumbnail command for OpenDocument drawing templates" +msgstr "Ordre de miniaturització de les plantilles de dibuix OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:37 +msgid "Thumbnail command for OpenDocument drawings" +msgstr "Ordre de miniaturització dels dibuixos OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:38 +msgid "Thumbnail command for OpenDocument formulas" +msgstr "Ordre de miniaturització de les fórmules OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:39 +msgid "Thumbnail command for OpenDocument images" +msgstr "Ordre de miniaturització de les imatges OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:40 +msgid "Thumbnail command for OpenDocument presentation templates" +msgstr "Ordre de miniaturització de les plantilles de presentació OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:41 +msgid "Thumbnail command for OpenDocument presentations" +msgstr "Ordre de miniaturització de les presentacions OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:42 +msgid "Thumbnail command for OpenDocument spreadsheet templates" +msgstr "" +"Ordre de miniaturització de les plantilles de fulls de càlcul OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:43 +msgid "Thumbnail command for OpenDocument spreadsheets" +msgstr "Ordre de miniaturització dels fulls de càlcul OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:44 +msgid "Thumbnail command for OpenDocument wordprocessing document templates" +msgstr "" +"Ordre de miniaturització de les plantilles de documents del processament de " +"text OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:45 +msgid "Thumbnail command for OpenDocument wordprocessing documents" +msgstr "" +"Ordre de miniaturització dels documents del processament de text OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:46 +msgid "Thumbnail command for OpenDocument wordprocessing master documents" +msgstr "" +"Ordre de miniaturització dels documents mestre del processament de text " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:47 +msgid "Thumbnail command for OpenOffice 1.x Calc spreadsheets" +msgstr "Ordre de miniaturització dels fulls de càlcul de l'OpenOffice 1.x Calc" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:48 +msgid "Thumbnail command for OpenOffice 1.x Drawing templates" +msgstr "Ordre de miniaturització de les plantilles de l'OpenOffice 1.x Drawing" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:49 +msgid "Thumbnail command for OpenOffice 1.x Impress Presentation templates" +msgstr "" +"Ordre de miniaturització de les plantilles de presentació de l'OpenOffice 1." +"x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:50 +msgid "Thumbnail command for OpenOffice 1.x Impress presentations" +msgstr "Ordre de miniaturització de les plantilles de l'OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:51 +msgid "Thumbnail command for OpenOffice 1.x Math documents" +msgstr "Ordre de miniaturització dels documents de l'OpenOffice 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:52 +msgid "Thumbnail command for OpenOffice 1.x Spreadsheet templates" +msgstr "" +"Ordre de miniaturització de les plantilles de l'OpenOffice 1.x Spreadsheet" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:53 +msgid "Thumbnail command for OpenOffice 1.x Writer documents" +msgstr "Ordre de miniaturització dels documents de l'OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:54 +msgid "Thumbnail command for OpenOffice 1.x Writer global templates" +msgstr "" +"Ordre de miniaturització de les plantilles globals de l'OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:55 +msgid "Thumbnail command for OpenOffice 1.x Writer templates" +msgstr "Ordre de miniaturització de les plantilles de l'OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:56 +msgid "Valid command plus arguments for the Microsoft Excel 2007 spreadsheets." +msgstr "" +"Ordre vàlida i arguments per als fulls de càlcul del Microsoft Excel 2007." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:57 +msgid "Valid command plus arguments for the Microsoft Excel spreadsheets." +msgstr "Ordre vàlida i arguments per als fulls de càlcul del Microsoft Excel." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:58 +msgid "" +"Valid command plus arguments for the Microsoft PowerPoint 2007 thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador del Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:59 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador del Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:60 +msgid "Valid command plus arguments for the Microsoft Word 2007 thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador del Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:61 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer" +msgstr "Ordre vàlida i arguments per al miniaturitzador del Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:62 +msgid "Valid command plus arguments for the OpenDocument chart thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador de diagrames de " +"l'OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:63 +msgid "" +"Valid command plus arguments for the OpenDocument drawing template " +"thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador de plantilles de dibuix de " +"l'OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:64 +msgid "Valid command plus arguments for the OpenDocument drawing thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador de dibuixos de l'OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:65 +msgid "Valid command plus arguments for the OpenDocument formula thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador de fórmules de l'OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:66 +msgid "Valid command plus arguments for the OpenDocument image thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador d'imatges de l'OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:67 +msgid "" +"Valid command plus arguments for the OpenDocument presentation template " +"thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador de plantilles de presentació " +"de l'OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:68 +msgid "" +"Valid command plus arguments for the OpenDocument presentation thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador de presentacions de " +"l'OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:69 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet template " +"thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador de plantilles de fulls de " +"càlcul de l'OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:70 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador de fulls de càlcul de " +"l'OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:71 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"template thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador de plantilles de " +"processament de text de l'OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:72 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador de processament de text de " +"l'OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:73 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing master " +"document thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador de documents mestre de " +"processament de text de l'OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:74 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Drawing template " +"thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador de plantilles de " +"l'OpenOffice 1.x Drawing" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:75 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador de l'OpenOffice 1.x Drawing" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:76 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"template thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador de plantilles de presentació " +"de l'OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:77 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador de presentacions de " +"l'OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:78 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador de documents de l'OpenOffice " +"1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:79 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer document " +"thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador de documents de l'OpenOffice " +"1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:80 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer global template " +"thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador de plantilles globals de " +"l'OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:81 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer template " +"thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador de plantilles de " +"l'OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:82 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" +msgstr "" +"Ordre vàlida i arguments per al miniaturitzador fulls de càlcul de " +"l'OpenOffice 1.x" diff --git a/po/cs.po b/po/cs.po new file mode 100644 index 0000000..0cc025a --- /dev/null +++ b/po/cs.po @@ -0,0 +1,552 @@ +# Czech translation for libgsf. +# Copyright (C) 2010 libgsf's COPYRIGHT HOLDER +# This file is distributed under the same license as the libgsf package. +# Jachym Simak , 2010. +# Lucas Lommer , 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: libgsf master\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=libgsf&component=General\n" +"POT-Creation-Date: 2010-03-16 19:17+0000\n" +"PO-Revision-Date: 2010-03-29 21:14+0100\n" +"Last-Translator: Jachym Simak \n" +"Language-Team: Czech \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#: ../gsf/gsf-blob.c:111 +#, c-format +msgid "Not enough memory to copy %s bytes of data" +msgstr "Nedostatek paměti pro kopírování %s bytů" + +#: ../gsf/gsf-clip-data.c:153 +#, c-format +msgid "The clip_data is in %s, but it is smaller than at least %s bytes" +msgstr "Clip_data je ve %s, ale je menší než potřebné %s byty." + +#: ../gsf/gsf-clip-data.c:247 +#, c-format +msgid "" +"The clip_data is in Windows clipboard format, but it is smaller than the " +"required 4 bytes." +msgstr "" +"Clip_data je ve formátu schránky Windows, ale je menší než potřebné 4 byty." + +#: ../gsf/gsf-clip-data.c:258 +msgid "Windows Metafile format" +msgstr "formátu Windows Metafile" + +#. CF_BITMAP +#: ../gsf/gsf-clip-data.c:264 +msgid "Windows DIB or BITMAP format" +msgstr "formátu Windows DIB nebo BITMAP" + +#: ../gsf/gsf-clip-data.c:269 +msgid "Windows Enhanced Metafile format" +msgstr "formátu Windows Enhanced Metafile" + +#: ../gsf/gsf-msole-utils.c:315 +#, c-format +msgid "" +"Missing data when reading the %s property; got %s bytes, but %s bytes at " +"least are needed." +msgstr "" +"Chybějící data při čtení vlastnosti %s; přečteno %s bytů, ale alespoň %s " +"bytů je vyžadováno." + +#: ../gsf/gsf-msole-utils.c:366 +#, c-format +msgid "" +"Corrupt data in the VT_CF property; clipboard data length must be at least 4 " +"bytes, but the data says it only has %s bytes available." +msgstr "" +"Poškozená data vlastnosti VT_CF; délka dat schránky musí být aspoň 4 byty, " +"ale k dispozici je jen %s bytů." + +#: ../gsf/gsf-open-pkg-utils.c:351 +#, c-format +msgid "Unable to find part id='%s' for '%s'" +msgstr "Nelze nalézt část id=„%s“ pro „%s“" + +#: ../gsf/gsf-open-pkg-utils.c:379 +#, c-format +msgid "Unable to find part with type='%s' for '%s'" +msgstr "Nelze nalézt část s type=„%s“ pro „%s“" + +#: ../gsf/gsf-open-pkg-utils.c:409 +#, c-format +msgid "Missing id for part in '%s'" +msgstr "Chybí id pro část v „%s“" + +#: ../gsf/gsf-open-pkg-utils.c:418 +#, c-format +msgid "Part '%s' in '%s' from '%s' is corrupt!" +msgstr "Část „%s“ v „%s“ z „%s“ je poškozena!" + +#: ../tools/gsf.c:22 +msgid "Display program version" +msgstr "Zobrazit verzi aplikace" + +#: ../tools/gsf.c:44 +#, c-format +msgid "%s: Failed to open %s: %s\n" +msgstr "%s: Nepodařilo se otevřít %s: %s\n" + +#: ../tools/gsf.c:65 +#, c-format +msgid "%s: Failed to recognize %s as an archive\n" +msgstr "%s: Selhalo rozpoznání %s jako archívu\n" + +#: ../tools/gsf.c:102 +#, c-format +msgid "Available subcommands are...\n" +msgstr "Dostupné dílčí příkazy jsou…\n" + +#: ../tools/gsf.c:103 +#, c-format +msgid "* cat output one or more files in archive\n" +msgstr "* cat výstup jednoho či více souborů v archívu\n" + +#: ../tools/gsf.c:104 +#, c-format +msgid "* dump dump one or more files in archive as hex\n" +msgstr "* dump šestnáctkový výstup jednoho či více souborů v archívu\n" + +#: ../tools/gsf.c:105 +#, c-format +msgid "* help list subcommands\n" +msgstr "* help seznam dílčích příkazů\n" + +#: ../tools/gsf.c:106 +#, c-format +msgid "* list list files in archive\n" +msgstr "* list seznam souborů v archívu\n" + +#: ../tools/gsf.c:107 +#, c-format +msgid "* listprops list document properties in archive\n" +msgstr "* listprops seznam vlastností dokumentu v archívu\n" + +#: ../tools/gsf.c:108 +#, c-format +msgid "* props print specified document properties\n" +msgstr "* props vytiskne vybrané vlastnosti dokumentu\n" + +#: ../tools/gsf.c:291 +#, c-format +msgid "No property named %s\n" +msgstr "Žádná položka s názvem %s\n" + +#: ../tools/gsf.c:364 +msgid "SUBCOMMAND ARCHIVE..." +msgstr "DÍLČÍ_PŘÍKAZ ARCHÍV…" + +#: ../tools/gsf.c:371 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"Spusťte „%s --help“ pro zobrazení seznamu dostupných přepínačů příkazového " +"řádku.\n" + +#: ../tools/gsf.c:378 +#, c-format +msgid "gsf version %d.%d.%d\n" +msgstr "gsf verze %d.%d.%d\n" + +#: ../tools/gsf.c:384 +#, c-format +msgid "Usage: %s %s\n" +msgstr "Použití: %s %s\n" + +#: ../tools/gsf.c:405 +#, c-format +msgid "Run '%s help' to see a list subcommands.\n" +msgstr "Spuštěním „%s help“ zobrazíte seznam dílčích příkazů\n" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "" +"Boolean options available, true enables thumbnailing and false disables the " +"creation of new thumbnails" +msgstr "" +"Dostupné logické hodnoty, pravdivá hodnota povoluje tvorbu náhledů a " +"nepravdivá hodnota zakazuje tvorbu nových náhledů." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing for OpenOffice 1.x Calc spreadsheets" +msgstr "Povolit náhledy sešitů OpenOffice 1.x Calc" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing for OpenOffice 1.x Drawing templates" +msgstr "Povolit náhledy šablon kresby OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing for OpenOffice 1.x Impress Presentation templates" +msgstr "Povolit náhledy šablon prezentací OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Enable thumbnailing for OpenOffice 1.x Impress presentations" +msgstr "Povolit náhledy prezentací OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Enable thumbnailing for OpenOffice 1.x Math documents" +msgstr "Povolit náhledy dokumentů OpenOffice 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Enable thumbnailing for OpenOffice 1.x Spreadsheet templates" +msgstr "Povolit náhledy šablon sešitů OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Enable thumbnailing for OpenOffice 1.x Writer documents" +msgstr "Povolit náhledy dokumentů OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Enable thumbnailing for OpenOffice 1.x Writer global templates" +msgstr "Povolit náhledy globálních šablon OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Enable thumbnailing for OpenOffice 1.x Writer templates" +msgstr "Povolit náhledy šablon OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:11 +msgid "Enable thumbnailing of Microsoft Excel 2007 spreadsheets" +msgstr "Povolit náhledy sešitů Microsoft Excel 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:12 +msgid "Enable thumbnailing of Microsoft Excel spreadsheets" +msgstr "Povolit náhledy sešitů Microsoft Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:13 +msgid "Enable thumbnailing of Microsoft PowerPoint 2007 presentations" +msgstr "Povolit náhledy prezentací Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:14 +msgid "Enable thumbnailing of Microsoft PowerPoint presentations" +msgstr "Povolit náhledy prezentací Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:15 +msgid "Enable thumbnailing of Microsoft Word 2007 documents" +msgstr "Povolit náhledy dokumentů Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:16 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "Povolit náhledy dokumentů Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:17 +msgid "Enable thumbnailing of OpenDocument charts" +msgstr "Povolit náhledy grafů OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:18 +msgid "Enable thumbnailing of OpenDocument drawing templates" +msgstr "Povolit náhledy šablon kreseb OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:19 +msgid "Enable thumbnailing of OpenDocument drawings" +msgstr "Povolit náhledy kreseb OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:20 +msgid "Enable thumbnailing of OpenDocument formulas" +msgstr "Povolit náhledy vzorců OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:21 +msgid "Enable thumbnailing of OpenDocument images" +msgstr "Povolit náhledy obrázků OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:22 +msgid "Enable thumbnailing of OpenDocument presentation templates" +msgstr "Povolit náhledy šablon prezentací OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:23 +msgid "Enable thumbnailing of OpenDocument presentations" +msgstr "Povolit náhledy prezentací OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:24 +msgid "Enable thumbnailing of OpenDocument spreadsheet templates" +msgstr "Povolit náhledy šablon sešitů OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:25 +msgid "Enable thumbnailing of OpenDocument spreadsheets" +msgstr "Povolit náhledy sešitů OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:26 +msgid "Enable thumbnailing of OpenDocument wordprocessing document templates" +msgstr "Povolit náhledy šablon dokumentů zpracování textu OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:27 +msgid "Enable thumbnailing of OpenDocument wordprocessing documents" +msgstr "Povolit náhledy dokumentů zpracování textu OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:28 +msgid "Enable thumbnailing of OpenDocument wordprocessing master documents" +msgstr "Povolit náhledy hlavních dokumentů zpracování textu OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:29 +msgid "Thumbnail command for Microsoft Excel 2007 spreadsheets" +msgstr "Příkaz pro tvorbu náhledů sešitů Microsoft Excel 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:30 +msgid "Thumbnail command for Microsoft Excel spreadsheets" +msgstr "Příkaz pro tvorbu náhledů sešitů Microsoft Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:31 +msgid "Thumbnail command for Microsoft PowerPoint 2007 presentations" +msgstr "Příkaz pro tvorbu náhledů prezentací Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:32 +msgid "Thumbnail command for Microsoft PowerPoint presentations" +msgstr "Příkaz pro tvorbu náhledů prezentací Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:33 +msgid "Thumbnail command for Microsoft Word 2007 documents" +msgstr "Příkaz pro tvorbu náhledů dokumentů Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:34 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "Příkaz pro tvorbu náhledů dokumentů Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:35 +msgid "Thumbnail command for OpenDocument charts" +msgstr "Příkaz pro tvorbu náhledů grafů OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:36 +msgid "Thumbnail command for OpenDocument drawing templates" +msgstr "Příkaz pro tvorbu náhledů šablon kreslení OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:37 +msgid "Thumbnail command for OpenDocument drawings" +msgstr "Příkaz pro tvorbu náhledů kreseb OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:38 +msgid "Thumbnail command for OpenDocument formulas" +msgstr "Příkaz pro tvorbu náhledů vzorců OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:39 +msgid "Thumbnail command for OpenDocument images" +msgstr "Příkaz pro tvorbu náhledů obrázků OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:40 +msgid "Thumbnail command for OpenDocument presentation templates" +msgstr "Příkaz pro tvorbu náhledů šablon prezentací OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:41 +msgid "Thumbnail command for OpenDocument presentations" +msgstr "Příkaz pro tvorbu náhledů prezentací OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:42 +msgid "Thumbnail command for OpenDocument spreadsheet templates" +msgstr "Příkaz pro tvorbu náhledů šablon sešitů OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:43 +msgid "Thumbnail command for OpenDocument spreadsheets" +msgstr "Příkaz pro tvorbu náhledů sešitů OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:44 +msgid "Thumbnail command for OpenDocument wordprocessing document templates" +msgstr "" +"Příkaz pro tvorbu náhledů šablon dokumentů zpracování textu OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:45 +msgid "Thumbnail command for OpenDocument wordprocessing documents" +msgstr "Příkaz pro tvorbu náhledů dokumentů zpracování textu OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:46 +msgid "Thumbnail command for OpenDocument wordprocessing master documents" +msgstr "" +"Příkaz pro tvorbu náhledů hlavních dokumentů zpracování textu OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:47 +msgid "Thumbnail command for OpenOffice 1.x Calc spreadsheets" +msgstr "Příkaz pro tvorbu náhledů sešitů OpenOffice 1.x Calc" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:48 +msgid "Thumbnail command for OpenOffice 1.x Drawing templates" +msgstr "Příkaz pro tvorbu náhledů šablon OpenOffice 1.x Drawing" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:49 +msgid "Thumbnail command for OpenOffice 1.x Impress Presentation templates" +msgstr "Příkaz pro tvorbu náhledů šablon prezentací OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:50 +msgid "Thumbnail command for OpenOffice 1.x Impress presentations" +msgstr "Příkaz pro tvorbu náhledů prezentací OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:51 +msgid "Thumbnail command for OpenOffice 1.x Math documents" +msgstr "Příkaz pro tvorbu náhledů dokumentů OpenOffice 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:52 +msgid "Thumbnail command for OpenOffice 1.x Spreadsheet templates" +msgstr "Příkaz pro tvorbu náhledů šablon sešitů OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:53 +msgid "Thumbnail command for OpenOffice 1.x Writer documents" +msgstr "Příkaz pro tvorbu náhledů dokumentů OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:54 +msgid "Thumbnail command for OpenOffice 1.x Writer global templates" +msgstr "Příkaz pro tvorbu náhledů globálních šablon OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:55 +msgid "Thumbnail command for OpenOffice 1.x Writer templates" +msgstr "Příkaz pro tvorbu náhledů šablon OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:56 +msgid "Valid command plus arguments for the Microsoft Excel 2007 spreadsheets." +msgstr "Platný příkaz a argumenty pro sešity Microsoft Excel 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:57 +msgid "Valid command plus arguments for the Microsoft Excel spreadsheets." +msgstr "Platný příkaz a argumenty pro sešity Microsoft Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:58 +msgid "" +"Valid command plus arguments for the Microsoft PowerPoint 2007 thumbnailer" +msgstr "Platný příkaz a argumenty pro tvorbu náhledů Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:59 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" +msgstr "Platný příkaz a argumenty pro tvorbu náhledů Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:60 +msgid "Valid command plus arguments for the Microsoft Word 2007 thumbnailer" +msgstr "Platný příkaz a argumenty pro tvorbu náhledů Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:61 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer" +msgstr "Platný příkaz a argumenty pro tvorbu náhledů Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:62 +msgid "Valid command plus arguments for the OpenDocument chart thumbnailer" +msgstr "Platný příkaz a argumenty pro tvorbu náhledů šablon grafů OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:63 +msgid "" +"Valid command plus arguments for the OpenDocument drawing template " +"thumbnailer" +msgstr "" +"Platný příkaz a argumenty pro tvorbu šablon náhledů kreseb OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:64 +msgid "Valid command plus arguments for the OpenDocument drawing thumbnailer" +msgstr "Platný příkaz a argumenty pro tvorbu náhledů kreseb OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:65 +msgid "Valid command plus arguments for the OpenDocument formula thumbnailer" +msgstr "Platný příkaz a argumenty pro tvorbu náhledů vzorců OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:66 +msgid "Valid command plus arguments for the OpenDocument image thumbnailer" +msgstr "Platný příkaz a argumenty pro tvorbu náhledů obrázků OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:67 +msgid "" +"Valid command plus arguments for the OpenDocument presentation template " +"thumbnailer" +msgstr "" +"Platný příkaz a argumenty pro tvorbu náhledů šablon prezentací OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:68 +msgid "" +"Valid command plus arguments for the OpenDocument presentation thumbnailer" +msgstr "Platný příkaz a argumenty pro tvorbu náhledů prezentací OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:69 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet template " +"thumbnailer" +msgstr "" +"Platný příkaz a argumenty pro tvorbu náhledů šablon sešitů OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:70 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" +msgstr "Platný příkaz a argumenty pro tvorbu náhledů sešitů OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:71 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"template thumbnailer" +msgstr "" +"Platný příkaz a argumenty pro tvorbu náhledů šablon dokumentů zpracování " +"textu OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:72 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"thumbnailer" +msgstr "" +"Platný příkaz a argumenty pro tvorbu náhledů dokumentů zpracování textu " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:73 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing master " +"document thumbnailer" +msgstr "" +"Platný příkaz a argumenty pro tvorbu náhledů hlavních dokumentů zpracování " +"textu OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:74 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Drawing template " +"thumbnailer" +msgstr "" +"Platný příkaz a argumenty pro tvorbu náhledů šablon OpenOffice 1.x Drawing" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:75 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" +msgstr "Platný příkaz a argumenty pro tvorbu náhledů OpenOffice 1.x Drawing" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:76 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"template thumbnailer" +msgstr "" +"Platný příkaz a argumenty pro tvorbu náhledů šablon prezentací OpenOffice 1." +"x Impres" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:77 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"thumbnailer" +msgstr "" +"Platný příkaz a argumenty pro tvorbu náhledů prezentací OpenOffice 1.x " +"Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:78 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" +msgstr "Platný příkaz a argumenty pro tvorbu náhledů OpenOffice 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:79 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer document " +"thumbnailer" +msgstr "Platný příkaz a argumenty pro tvorbu náhledů OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:80 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer global template " +"thumbnailer" +msgstr "" +"Platný příkaz a argumenty pro tvorbu náhledů globálních šablon OpenOffice 1." +"x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:81 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer template " +"thumbnailer" +msgstr "" +"Platný příkaz a argumenty pro tvorbu náhledů šablon OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:82 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" +msgstr "Platný příkaz a argumenty pro tvorbu náhledů sešitů OpenOffice 1.x" + diff --git a/po/da.po b/po/da.po new file mode 100644 index 0000000..571806b --- /dev/null +++ b/po/da.po @@ -0,0 +1,592 @@ +# Danish translation for libgsf. +# Copyright (C) 2010 libgsf's COPYRIGHT HOLDER +# This file is distributed under the same license as the libgsf package. +# Joe Hansen , 2010. +# +# corrupt -> beskadiget +# dump -> skriv +# list -> vis +# +msgid "" +msgstr "" +"Project-Id-Version: libgsf master\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-05-16 17:51+0200\n" +"PO-Revision-Date: 2010-05-12 18:29+0200\n" +"Last-Translator: Joe Hansen \n" +"Language-Team: Danish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../gsf/gsf-blob.c:111 +#, c-format +msgid "Not enough memory to copy %s bytes of data" +msgstr "Ikke nok hukommelse til at kopiere %s byte data" + +#: ../gsf/gsf-clip-data.c:153 +#, c-format +msgid "The clip_data is in %s, but it is smaller than at least %s bytes" +msgstr "" +"Dataene fra udklipsholderen er i %s, men de er mindre end mindst %s byte" + +#: ../gsf/gsf-clip-data.c:247 +#, c-format +msgid "" +"The clip_data is in Windows clipboard format, but it is smaller than the " +"required 4 bytes." +msgstr "" +"Dataene fra udklipsholderen er i Windowsformat, men de er mindre end de " +"krævede 4 byte." + +#: ../gsf/gsf-clip-data.c:258 +msgid "Windows Metafile format" +msgstr "Windows metafilformat" + +#. CF_BITMAP +#: ../gsf/gsf-clip-data.c:264 +msgid "Windows DIB or BITMAP format" +msgstr "Windows DIB- eller BITMAP-format" + +#: ../gsf/gsf-clip-data.c:269 +msgid "Windows Enhanced Metafile format" +msgstr "Windows forbedrede metafilformat" + +#: ../gsf/gsf-msole-utils.c:315 +#, c-format +msgid "" +"Missing data when reading the %s property; got %s bytes, but %s bytes at " +"least are needed." +msgstr "" +"Mangler data under læsning af egenskaben %s; fik %s byte, men mindst %s byte " +"kræves." + +#: ../gsf/gsf-msole-utils.c:366 +#, c-format +msgid "" +"Corrupt data in the VT_CF property; clipboard data length must be at least 4 " +"bytes, but the data says it only has %s bytes available." +msgstr "" +"Beskadiget data i egenskaben VT_CF; længden på data fra udklipsholder skal " +"mindst være på 4 byte, men dataene siger, at de kun har %s byte tilgængelige." + +#: ../gsf/gsf-open-pkg-utils.c:351 +#, c-format +msgid "Unable to find part id='%s' for '%s'" +msgstr "Kunne ikke finde del id='%s' for '%s'" + +#: ../gsf/gsf-open-pkg-utils.c:379 +#, c-format +msgid "Unable to find part with type='%s' for '%s'" +msgstr "Kunne ikke finde del med type='%s' for '%s'" + +#: ../gsf/gsf-open-pkg-utils.c:409 +#, c-format +msgid "Missing id for part in '%s'" +msgstr "Mangler id for del i '%s'" + +#: ../gsf/gsf-open-pkg-utils.c:418 +#, c-format +msgid "Part '%s' in '%s' from '%s' is corrupt!" +msgstr "Del '%s' i '%s' fra '%s' er beskadiget!" + +#: ../tools/gsf.c:22 +msgid "Display program version" +msgstr "Vis programversion" + +#: ../tools/gsf.c:44 +#, c-format +msgid "%s: Failed to open %s: %s\n" +msgstr "%s: Kunne ikke åbne %s: %s\n" + +#: ../tools/gsf.c:65 +#, c-format +msgid "%s: Failed to recognize %s as an archive\n" +msgstr "%s: Kunne ikke genkende %s som et arkiv\n" + +#: ../tools/gsf.c:102 +#, c-format +msgid "Available subcommands are...\n" +msgstr "Tilgængelige underkommandoer er...\n" + +#: ../tools/gsf.c:103 +#, c-format +msgid "* cat output one or more files in archive\n" +msgstr "* cat udskriv en eller flere filer i arkivet\n" + +#: ../tools/gsf.c:104 +#, c-format +msgid "* dump dump one or more files in archive as hex\n" +msgstr "* dump skriv en eller flere filer i arkivet i heksformat\n" + +#: ../tools/gsf.c:105 +#, c-format +msgid "* help list subcommands\n" +msgstr "* help vis underkommandoer\n" + +#: ../tools/gsf.c:106 +#, c-format +msgid "* list list files in archive\n" +msgstr "* list vis filer i arkivet\n" + +#: ../tools/gsf.c:107 +#, c-format +msgid "* listprops list document properties in archive\n" +msgstr "* listprops vis dokumentegenskaber i arkivet\n" + +#: ../tools/gsf.c:108 +#, c-format +msgid "* props print specified document properties\n" +msgstr "* props udskriv angivet dokumentegenskaber\n" + +#: ../tools/gsf.c:291 +#, c-format +msgid "No property named %s\n" +msgstr "Ingen egenskab navngivet %s\n" + +#: ../tools/gsf.c:364 +msgid "SUBCOMMAND ARCHIVE..." +msgstr "UNDERKOMMANDO ARKIV..." + +#: ../tools/gsf.c:371 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"Kør '%s --help' for at se en fuldstændig liste over tilgængelige " +"kommandolinjetilvalg.\n" + +#: ../tools/gsf.c:378 +#, c-format +msgid "gsf version %d.%d.%d\n" +msgstr "gsf version %d.%d.%d\n" + +#: ../tools/gsf.c:384 +#, c-format +msgid "Usage: %s %s\n" +msgstr "Brug: %s %s\n" + +#: ../tools/gsf.c:405 +#, c-format +msgid "Run '%s help' to see a list subcommands.\n" +msgstr "Kør '%s help' for at se en liste over underkommandoer.\n" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "" +"Boolean options available, true enables thumbnailing and false disables the " +"creation of new thumbnails" +msgstr "" +"Booleske tilvalg tilgængelige, true slår miniaturebilleder til og false slår " +"oprettelsen af nye miniaturebilleder fra" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing for OpenOffice 1.x Calc spreadsheets" +msgstr "Aktiver miniaturebilleder til OpenOffice 1.x Calc-regneark" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing for OpenOffice 1.x Drawing templates" +msgstr "Aktiver miniaturebilleder til OpenOffice 1.x tegneskabeloner" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing for OpenOffice 1.x Impress Presentation templates" +msgstr "" +"Aktiver miniaturebilleder til OpenOffice 1.x Impresspræsentationsskabeloner" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Enable thumbnailing for OpenOffice 1.x Impress presentations" +msgstr "Aktiver miniaturebilleder til OpenOffice 1.x Impresspræsentationer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Enable thumbnailing for OpenOffice 1.x Math documents" +msgstr "Aktiver miniaturebilleder til OpenOffice 1.x Mathdokumenter" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Enable thumbnailing for OpenOffice 1.x Spreadsheet templates" +msgstr "Aktiver miniaturebilleder til OpenOffice 1.x regnearksskabeloner" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Enable thumbnailing for OpenOffice 1.x Writer documents" +msgstr "Aktiver miniaturebilleder til OpenOffice 1.x Writerdokumenter" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Enable thumbnailing for OpenOffice 1.x Writer global templates" +msgstr "Aktiver miniaturebilleder til OpenOffice 1.x Writer globale skabeloner" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Enable thumbnailing for OpenOffice 1.x Writer templates" +msgstr "Aktiver miniaturebilleder til OpenOffice 1.x Writerskabeloner" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:11 +msgid "Enable thumbnailing of Microsoft Excel 2007 spreadsheets" +msgstr "Aktiver miniaturebilleder til Microsoft Excel 2007 regneark" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:12 +msgid "Enable thumbnailing of Microsoft Excel spreadsheets" +msgstr "Aktiver miniaturebilleder til Microsoft Excel regneark" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:13 +msgid "Enable thumbnailing of Microsoft PowerPoint 2007 presentations" +msgstr "Aktiver miniaturebilleder til Microsoft PowerPoint 2007 præsentationer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:14 +msgid "Enable thumbnailing of Microsoft PowerPoint presentations" +msgstr "Aktiver miniaturebilleder til Microsoft PowerPoint præsentationer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:15 +msgid "Enable thumbnailing of Microsoft Word 2007 documents" +msgstr "Aktiver miniaturebilleder til Microsoft Word 2007 dokumenter" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:16 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "Aktiver miniaturebilleder til Microsoft Word documenter" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:17 +msgid "Enable thumbnailing of OpenDocument charts" +msgstr "Aktiver miniaturebilleder til OpenDocument diagrammer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:18 +msgid "Enable thumbnailing of OpenDocument drawing templates" +msgstr "Aktiver miniaturebilleder til OpenDocument tegneskabeloner" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:19 +msgid "Enable thumbnailing of OpenDocument drawings" +msgstr "Aktiver miniaturebilleder til OpenDocument tegninger" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:20 +msgid "Enable thumbnailing of OpenDocument formulas" +msgstr "Aktiver miniaturebilleder til OpenDocument formler" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:21 +msgid "Enable thumbnailing of OpenDocument images" +msgstr "Aktiver miniaturebilleder til OpenDocument billeder" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:22 +msgid "Enable thumbnailing of OpenDocument presentation templates" +msgstr "Aktiver miniaturebilleder til OpenDocument præsentationsskabeloner" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:23 +msgid "Enable thumbnailing of OpenDocument presentations" +msgstr "Aktiver miniaturebilleder til OpenDocument præsentationer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:24 +msgid "Enable thumbnailing of OpenDocument spreadsheet templates" +msgstr "Aktiver miniaturebilleder til OpenDocument regnearksskabeloner" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:25 +msgid "Enable thumbnailing of OpenDocument spreadsheets" +msgstr "Aktiver miniaturebilleder til OpenDocument regneark" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:26 +msgid "Enable thumbnailing of OpenDocument wordprocessing document templates" +msgstr "" +"Aktiver miniaturebilleder til OpenDocument tekstbehandlingsdokumentskabeloner" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:27 +msgid "Enable thumbnailing of OpenDocument wordprocessing documents" +msgstr "Aktiver miniaturebilleder til OpenDocument tekstbehandlingsdokumenter" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:28 +msgid "Enable thumbnailing of OpenDocument wordprocessing master documents" +msgstr "" +"Aktiver miniaturebilleder til OpenDocument skabelontekstbehandlingsdokumenter" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:29 +msgid "Thumbnail command for Microsoft Excel 2007 spreadsheets" +msgstr "Miniaturebilledkommando til Microsoft Excel 2007 regneark" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:30 +msgid "Thumbnail command for Microsoft Excel spreadsheets" +msgstr "Miniaturebilledkommando til Microsoft Excel regneark" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:31 +msgid "Thumbnail command for Microsoft PowerPoint 2007 presentations" +msgstr "Miniaturebilledkommando til Microsoft PowerPoint 2007 præsentationer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:32 +msgid "Thumbnail command for Microsoft PowerPoint presentations" +msgstr "Miniaturebilledkommando til Microsoft PowerPoint præsentationer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:33 +msgid "Thumbnail command for Microsoft Word 2007 documents" +msgstr "Miniaturebilledkommando til Microsoft Word 2007 dokumenter" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:34 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "Miniaturebilledkommando til Microsoft Word dokumenter" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:35 +msgid "Thumbnail command for OpenDocument charts" +msgstr "Miniaturebilledkommando til OpenDocument diagrammer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:36 +msgid "Thumbnail command for OpenDocument drawing templates" +msgstr "Miniaturebilledkommando til OpenDocument tegneskabeloner" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:37 +msgid "Thumbnail command for OpenDocument drawings" +msgstr "Miniaturebilledkommando til OpenDocument tegninger" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:38 +msgid "Thumbnail command for OpenDocument formulas" +msgstr "Miniaturebilledkommando til OpenDocument formler" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:39 +msgid "Thumbnail command for OpenDocument images" +msgstr "Miniaturebilledkommando til OpenDocument billeder" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:40 +msgid "Thumbnail command for OpenDocument presentation templates" +msgstr "Miniaturebilledkommando til OpenDocument præsentationsskabeloner" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:41 +msgid "Thumbnail command for OpenDocument presentations" +msgstr "Miniaturebilledkommando til OpenDocument præsentationer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:42 +msgid "Thumbnail command for OpenDocument spreadsheet templates" +msgstr "Miniaturebilledkommando til OpenDocument regnearksskabeloner" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:43 +msgid "Thumbnail command for OpenDocument spreadsheets" +msgstr "Miniaturebilledkommando til OpenDocument regneark" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:44 +msgid "Thumbnail command for OpenDocument wordprocessing document templates" +msgstr "" +"Miniaturebilledkommando til OpenDocument tekstbehandlingsdokumentskabeloner" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:45 +msgid "Thumbnail command for OpenDocument wordprocessing documents" +msgstr "Miniaturebilledkommando til OpenDocument tekstbehandlingsdokumenter" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:46 +msgid "Thumbnail command for OpenDocument wordprocessing master documents" +msgstr "" +"Miniaturebilledkommando til OpenDocument tekstbehandlingsskabelondokumenter" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:47 +msgid "Thumbnail command for OpenOffice 1.x Calc spreadsheets" +msgstr "Miniaturebilledkommando til OpenOffice 1.x Calc regneark" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:48 +msgid "Thumbnail command for OpenOffice 1.x Drawing templates" +msgstr "Miniaturebilledkommando til OpenOffice 1.x tegneskabeloner" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:49 +msgid "Thumbnail command for OpenOffice 1.x Impress Presentation templates" +msgstr "" +"Miniaturebilledkommando til OpenOffice 1.x Impress præsentationsskabeloner" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:50 +msgid "Thumbnail command for OpenOffice 1.x Impress presentations" +msgstr "Miniaturebilledkommando til OpenOffice 1.x Impress præsentationer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:51 +msgid "Thumbnail command for OpenOffice 1.x Math documents" +msgstr "Miniaturebilledkommando til OpenOffice 1.x Math dokumenter" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:52 +msgid "Thumbnail command for OpenOffice 1.x Spreadsheet templates" +msgstr "Miniaturebilledkommando til OpenOffice 1.x regnearksskabeloner" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:53 +msgid "Thumbnail command for OpenOffice 1.x Writer documents" +msgstr "Miniaturebilledkommando til OpenOffice 1.x Writer dokumenter" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:54 +msgid "Thumbnail command for OpenOffice 1.x Writer global templates" +msgstr "Miniaturebilledkommando til OpenOffice 1.x Writer globale skabeloner" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:55 +msgid "Thumbnail command for OpenOffice 1.x Writer templates" +msgstr "Miniaturebilledkommando til OpenOffice 1.x Writer skabeloner" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:56 +msgid "Valid command plus arguments for the Microsoft Excel 2007 spreadsheets." +msgstr "" +"Gyldig kommando samt argumenter for regnearkene til Microsoft Excel 2007." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:57 +msgid "Valid command plus arguments for the Microsoft Excel spreadsheets." +msgstr "Gyldig kommando samt argumenter for regnearkene til Microsoft Excel." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:58 +msgid "" +"Valid command plus arguments for the Microsoft PowerPoint 2007 thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til Microsoft " +"Powerpoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:59 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til Microsoft " +"PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:60 +msgid "Valid command plus arguments for the Microsoft Word 2007 thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til Microsoft Word " +"2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:61 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:62 +msgid "Valid command plus arguments for the OpenDocument chart thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenDocument " +"diagram" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:63 +msgid "" +"Valid command plus arguments for the OpenDocument drawing template " +"thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenDocument " +"tegneskabelon" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:64 +msgid "Valid command plus arguments for the OpenDocument drawing thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenDocument " +"tegning" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:65 +msgid "Valid command plus arguments for the OpenDocument formula thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenDocument " +"formler" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:66 +msgid "Valid command plus arguments for the OpenDocument image thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenDocument " +"billede" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:67 +msgid "" +"Valid command plus arguments for the OpenDocument presentation template " +"thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenDocument " +"præsentationsskabelon" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:68 +msgid "" +"Valid command plus arguments for the OpenDocument presentation thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenDocument " +"præsentation" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:69 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet template " +"thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenDocument " +"regnearksskabelon" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:70 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenDocument " +"regneark" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:71 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"template thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenDocument " +"tekstbehandling" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:72 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenDocument " +"tekstbehandlingsdokument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:73 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing master " +"document thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenDocument " +"tekstbehandlingsskabelondokument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:74 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Drawing template " +"thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenOffice 1.x " +"tegneskabelon" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:75 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenOffice 1.x " +"tegning" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:76 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"template thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenOffice 1.x " +"Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:77 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenOffice 1.x " +"Impress præsentation" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:78 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenOffice 1.x " +"Math dokument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:79 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer document " +"thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenOffice 1.x " +"Writer dokument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:80 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer global template " +"thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenOffice 1.x " +"Writer global skabelon" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:81 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer template " +"thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenOffice 1.x " +"Writer skabelon" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:82 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" +msgstr "" +"Gyldig kommando samt argumenter til miniaturetjenesten til OpenOffice 1.x " +"regneark" diff --git a/po/de.po b/po/de.po new file mode 100644 index 0000000..1653efd --- /dev/null +++ b/po/de.po @@ -0,0 +1,566 @@ +# German translation for libgsf. +# Copyright (C) 2009 libgsf's COPYRIGHT HOLDER +# This file is distributed under the same license as the libgsf package. +# Mario Blättermann , 2009. +# Christian Kirbach , 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: libgsf master\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=libgsf&component=General\n" +"POT-Creation-Date: 2009-09-21 19:38+0000\n" +"PO-Revision-Date: 2009-09-21 22:44+0200\n" +"Last-Translator: Mario Blättermann \n" +"Language-Team: German \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Poedit-Language: German\n" +"X-Poedit-Country: GERMANY\n" + +#: ../gsf/gsf-blob.c:111 +#, c-format +msgid "Not enough memory to copy %s bytes of data" +msgstr "Nicht genug Speicher zum Kopieren von %s Bytes an Daten." + +#: ../gsf/gsf-clip-data.c:153 +#, c-format +msgid "The clip_data is in %s, but it is smaller than at least %s bytes" +msgstr "" +"clip_data liegt im %s-Format vor, jedoch kleiner als die nötigen %s Bytes" + +#: ../gsf/gsf-clip-data.c:247 +#, c-format +msgid "" +"The clip_data is in Windows clipboard format, but it is smaller than the " +"required 4 bytes." +msgstr "" +"clip_data liegt im Windows-Zwischenablagenformat vor, jedoch kleiner als die " +"nötigen 4 Bytes." + +#: ../gsf/gsf-clip-data.c:258 +msgid "Windows Metafile format" +msgstr "Windows Metafile-Format" + +#. CF_BITMAP +#: ../gsf/gsf-clip-data.c:264 +msgid "Windows DIB or BITMAP format" +msgstr "Windows-DIB- oder BITMAP-Format" + +#: ../gsf/gsf-clip-data.c:269 +msgid "Windows Enhanced Metafile format" +msgstr "Windows Enhanced-Metafile-Format" + +#: ../gsf/gsf-msole-utils.c:315 +#, c-format +msgid "" +"Missing data when reading the %s property; got %s bytes, but %s bytes at " +"least are needed." +msgstr "" +"Fehlende Daten beim Lesen der Eigenschaft %s, erhalten wurden %s Bytes, aber " +"mindestens %s Bytes sind erforderlich." + +#: ../gsf/gsf-msole-utils.c:366 +#, c-format +msgid "" +"Corrupt data in the VT_CF property; clipboard data length must be at least 4 " +"bytes, but the data says it only has %s bytes available." +msgstr "" +"Beschädigte Daten in der Eigenschaft VT_CF. Länge der Daten in der " +"Zwischenablage muss mindestens 4 Bytes sein, Daten verfügen jedoch nur über " +"%s Bytes." + +#: ../gsf/gsf-open-pkg-utils.c:351 +#, c-format +msgid "Unable to find part id='%s' for '%s'" +msgstr "Teil der Kennung id='%s' für »%s« kann nicht gefunden werden" + +#: ../gsf/gsf-open-pkg-utils.c:379 +#, c-format +msgid "Unable to find part with type='%s' for '%s'" +msgstr "Teil des Typs type='%s' für »%s« kann nicht gefunden werden" + +#: ../gsf/gsf-open-pkg-utils.c:409 +#, c-format +msgid "Missing id for part in '%s'" +msgstr "Fehlende Kennung für Teil in »%s«" + +#: ../gsf/gsf-open-pkg-utils.c:418 +#, c-format +msgid "Part '%s' in '%s' from '%s' is corrupt!" +msgstr "Teil »%s« in »%s« aus »%s« ist beschädigt!" + +#: ../tools/gsf.c:22 +msgid "Display program version" +msgstr "Programmversion anzeigen" + +#: ../tools/gsf.c:44 +#, c-format +msgid "%s: Failed to open %s: %s\n" +msgstr "%s: Öffnen von %s gescheitert: %s\n" + +#: ../tools/gsf.c:65 +#, c-format +msgid "%s: Failed to recognize %s as an archive\n" +msgstr "%s: Erkennung von %s als Archiv ist gescheitert\n" + +#: ../tools/gsf.c:102 +#, c-format +msgid "Available subcommands are...\n" +msgstr "Verfügbare Unterbefehle sind …\n" + +#: ../tools/gsf.c:103 +#, c-format +msgid "* cat output one or more files in archive\n" +msgstr "* cat eine oder mehrere Dateien im Archiv ausgeben\n" + +#: ../tools/gsf.c:104 +#, c-format +msgid "* dump dump one or more files in archive as hex\n" +msgstr "* dump eine oder mehrere Dateien im Archiv hexadezimal ablegen\n" + +#: ../tools/gsf.c:105 +#, c-format +msgid "* help list subcommands\n" +msgstr "* help Unterbefehle auflisten\n" + +#: ../tools/gsf.c:106 +#, c-format +msgid "* list list files in archive\n" +msgstr "* list Dateien im Archiv auflisten\n" + +#: ../tools/gsf.c:107 +#, c-format +msgid "* listprops list document properties in archive\n" +msgstr "* listprops Dokumenteigenschaften im Archiv auflisten\n" + +#: ../tools/gsf.c:108 +#, c-format +msgid "* props print specified document properties\n" +msgstr "* props angegebene Dokumenteigenschaften ausgeben\n" + +#: ../tools/gsf.c:291 +#, c-format +msgid "No property named %s\n" +msgstr "Keine Eigenschaft namens %s\n" + +#: ../tools/gsf.c:364 +msgid "SUBCOMMAND ARCHIVE..." +msgstr "UNTERBEFEHL-ARCHIV …" + +#: ../tools/gsf.c:371 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"Rufen Sie »%s --help« auf, um alle verfügbaren Befehlszeilenoptionen " +"anzuzeigen.\n" + +#: ../tools/gsf.c:378 +#, c-format +msgid "gsf version %d.%d.%d\n" +msgstr "gsf-Version %d.%d.%d\n" + +#: ../tools/gsf.c:384 +#, c-format +msgid "Usage: %s %s\n" +msgstr "Aufruf: %s %s\n" + +#: ../tools/gsf.c:405 +#, c-format +msgid "Run '%s help' to see a list subcommands.\n" +msgstr "Rufen Sie »%s help« auf, um eine Liste der Unterbefehle zu erhalten.\n" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "" +"Boolean options available, true enables thumbnailing and false disables the " +"creation of new thumbnails" +msgstr "" +"Boolesche Optionen sind verfügbar, »wahr« aktiviert die Erzeugung von " +"Vorschauen und »falsch« deaktiviert die Erzeugung neuer Vorschauen" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing for OpenOffice 1.x Calc spreadsheets" +msgstr "Vorschau für OpenOffice 1.x Kalkulationstabellen aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing for OpenOffice 1.x Drawing templates" +msgstr "Vorschau für OpenOffice 1.x Zeichnungsvorlagen aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing for OpenOffice 1.x Impress Presentation templates" +msgstr "Vorschau für OpenOffice 1.x Impress-Präsentationsvorlagen aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Enable thumbnailing for OpenOffice 1.x Impress presentations" +msgstr "Vorschau für OpenOffice 1.x Impress-Präsentationen aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Enable thumbnailing for OpenOffice 1.x Math documents" +msgstr "Vorschau für OpenOffice 1.x Mathematik-Dokumente aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Enable thumbnailing for OpenOffice 1.x Spreadsheet templates" +msgstr "Vorschau für OpenOffice 1.x Tabellenvorlagen aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Enable thumbnailing for OpenOffice 1.x Writer documents" +msgstr "Vorschau für OpenOffice 1.x Writer-Dokumente aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Enable thumbnailing for OpenOffice 1.x Writer global templates" +msgstr "Vorschau für OpenOffice 1.x Writer-Globalvorlagen aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Enable thumbnailing for OpenOffice 1.x Writer templates" +msgstr "Vorschau für OpenOffice 1.x Writer-Vorlagen aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:11 +msgid "Enable thumbnailing of Microsoft Excel 2007 spreadsheets" +msgstr "Vorschau für Microsoft Excel-2007-Tabellen aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:12 +msgid "Enable thumbnailing of Microsoft Excel spreadsheets" +msgstr "Vorschau für Microsoft Excel-Tabellen aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:13 +msgid "Enable thumbnailing of Microsoft PowerPoint 2007 presentations" +msgstr "Vorschau für Microsoft PowerPoint-2007-Präsentationen aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:14 +msgid "Enable thumbnailing of Microsoft PowerPoint presentations" +msgstr "Vorschau für Microsoft PowerPoint-Präsentationen aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:15 +msgid "Enable thumbnailing of Microsoft Word 2007 documents" +msgstr "Vorschau für Microsoft Word-2007-Dokumente aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:16 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "Vorschau für Microsoft Word-Dokumente aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:17 +msgid "Enable thumbnailing of OpenDocument charts" +msgstr "Vorschau für OpenDocument-Diagramme aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:18 +msgid "Enable thumbnailing of OpenDocument drawing templates" +msgstr "Vorschau für OpenDocument-Zeichnungsvorlagen aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:19 +msgid "Enable thumbnailing of OpenDocument drawings" +msgstr "Vorschau für OpenDocument-Zeichnungen aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:20 +msgid "Enable thumbnailing of OpenDocument formulas" +msgstr "Vorschau für OpenDocument-Formeln aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:21 +msgid "Enable thumbnailing of OpenDocument images" +msgstr "Vorschau für OpenDocument-Bilder aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:22 +msgid "Enable thumbnailing of OpenDocument presentation templates" +msgstr "Vorschau für OpenDocument-Präsentationsvorlagen aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:23 +msgid "Enable thumbnailing of OpenDocument presentations" +msgstr "Vorschau für OpenDocument-Präsentationen aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:24 +msgid "Enable thumbnailing of OpenDocument spreadsheet templates" +msgstr "Vorschau für OpenDocument-Tabellenvorlagen aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:25 +msgid "Enable thumbnailing of OpenDocument spreadsheets" +msgstr "Vorschau für OpenDocument-Tabellen aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:26 +msgid "Enable thumbnailing of OpenDocument wordprocessing document templates" +msgstr "Vorschau für OpenDocument-Textdokumentvorlagen aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:27 +msgid "Enable thumbnailing of OpenDocument wordprocessing documents" +msgstr "Vorschau für OpenDocument-Textdokumente aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:28 +msgid "Enable thumbnailing of OpenDocument wordprocessing master documents" +msgstr "Vorschau für OpenDocument Global-Textdokumente aktivieren" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:29 +msgid "Thumbnail command for Microsoft Excel 2007 spreadsheets" +msgstr "Vorschaubefehl für Microsoft Excel-2007-Tabellen" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:30 +msgid "Thumbnail command for Microsoft Excel spreadsheets" +msgstr "Vorschaubefehl für Microsoft Excel-Tabellen" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:31 +msgid "Thumbnail command for Microsoft PowerPoint 2007 presentations" +msgstr "Vorschaubefehl für Microsoft PowerPoint-2007-Präsentationen" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:32 +msgid "Thumbnail command for Microsoft PowerPoint presentations" +msgstr "Vorschaubefehl für Microsoft PowerPoint-Präsentationen" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:33 +msgid "Thumbnail command for Microsoft Word 2007 documents" +msgstr "Vorschaubefehl für Microsoft Word-2007-Dokumente" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:34 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "Vorschaubefehl für Microsoft Word-Dokumente" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:35 +msgid "Thumbnail command for OpenDocument charts" +msgstr "Vorschaubefehl für OpenDocument-Diagramme" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:36 +msgid "Thumbnail command for OpenDocument drawing templates" +msgstr "Vorschaubefehl für OpenDocument-Zeichnungsvorlagen" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:37 +msgid "Thumbnail command for OpenDocument drawings" +msgstr "Vorschaubefehl für OpenDocument-Zeichnungen" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:38 +msgid "Thumbnail command for OpenDocument formulas" +msgstr "Vorschaubefehl für OpenDocument-Formeln" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:39 +msgid "Thumbnail command for OpenDocument images" +msgstr "Vorschaubefehl für OpenDocument-Bilder" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:40 +msgid "Thumbnail command for OpenDocument presentation templates" +msgstr "Vorschaubefehl für OpenDocument-Präsentationsvorlagen" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:41 +msgid "Thumbnail command for OpenDocument presentations" +msgstr "Vorschaubefehl für OpenDocument-Präsentationen" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:42 +msgid "Thumbnail command for OpenDocument spreadsheet templates" +msgstr "Vorschaubefehl für OpenDocument-Tabellenvorlagen" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:43 +msgid "Thumbnail command for OpenDocument spreadsheets" +msgstr "Vorschaubefehl für OpenDocument-Tabellen" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:44 +msgid "Thumbnail command for OpenDocument wordprocessing document templates" +msgstr "Vorschaubefehl für OpenDocument-Textdokumentvorlagen" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:45 +msgid "Thumbnail command for OpenDocument wordprocessing documents" +msgstr "Vorschaubefehl für OpenDocument-Textdokumente" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:46 +msgid "Thumbnail command for OpenDocument wordprocessing master documents" +msgstr "Vorschaubefehl für OpenDocument-Global-Textdokumente" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:47 +msgid "Thumbnail command for OpenOffice 1.x Calc spreadsheets" +msgstr "Vorschaubefehl für OpenOffice 1.x Kalkulationstabellen" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:48 +msgid "Thumbnail command for OpenOffice 1.x Drawing templates" +msgstr "Vorschaubefehl für OpenOffice 1.x Zeichnungsvorlagen" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:49 +msgid "Thumbnail command for OpenOffice 1.x Impress Presentation templates" +msgstr "Vorschaubefehl für OpenOffice 1.x Impress-Präsentationsvorlagen" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:50 +msgid "Thumbnail command for OpenOffice 1.x Impress presentations" +msgstr "Vorschaubefehl für OpenOffice 1.x Impress-Präsentationen" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:51 +msgid "Thumbnail command for OpenOffice 1.x Math documents" +msgstr "Vorschaubefehl für OpenOffice 1.x Mathematik-Dokumente" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:52 +msgid "Thumbnail command for OpenOffice 1.x Spreadsheet templates" +msgstr "Vorschaubefehl für OpenOffice 1.x Tabellenvorlagen" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:53 +msgid "Thumbnail command for OpenOffice 1.x Writer documents" +msgstr "Vorschaubefehl für OpenOffice 1.x Writer-Dokumente" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:54 +msgid "Thumbnail command for OpenOffice 1.x Writer global templates" +msgstr "Vorschaubefehl für OpenOffice 1.x Writer-Globalvorlagen" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:55 +msgid "Thumbnail command for OpenOffice 1.x Writer templates" +msgstr "Vorschaubefehl für OpenOffice 1.x Writer-Vorlagen" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:56 +msgid "Valid command plus arguments for the Microsoft Excel 2007 spreadsheets." +msgstr "Gültiger Befehl plus Argumente für die Microsoft Excel-2007-Tabellen." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:57 +msgid "Valid command plus arguments for the Microsoft Excel spreadsheets." +msgstr "Gültiger Befehl plus Argumente für die Microsoft Excel-Tabellen." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:58 +msgid "" +"Valid command plus arguments for the Microsoft PowerPoint 2007 thumbnailer" +msgstr "" +"Gültiger Befehl plus Argumente für die Microsoft PowerPoint-2007-Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:59 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" +msgstr "Gültiger Befehl plus Argumente für die Microsoft PowerPoint-Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:60 +msgid "Valid command plus arguments for the Microsoft Word 2007 thumbnailer" +msgstr "Gültiger Befehl plus Argumente für die Microsoft Word-2007-Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:61 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer" +msgstr "Gültiger Befehl plus Argumente für die Microsoft Word-Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:62 +msgid "Valid command plus arguments for the OpenDocument chart thumbnailer" +msgstr "Gültiger Befehl plus Argumente für die OpenDocument-Diagrammvorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:63 +msgid "" +"Valid command plus arguments for the OpenDocument drawing template " +"thumbnailer" +msgstr "" +"Gültiger Befehl plus Argumente für die OpenDocument-Zeichnungsvorlagen-" +"Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:64 +msgid "Valid command plus arguments for the OpenDocument drawing thumbnailer" +msgstr "" +"Gültiger Befehl plus Argumente für die OpenDocument-Zeichnungs-Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:65 +msgid "Valid command plus arguments for the OpenDocument formula thumbnailer" +msgstr "Gültiger Befehl plus Argumente für die OpenDocument-Formel-Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:66 +msgid "Valid command plus arguments for the OpenDocument image thumbnailer" +msgstr "Gültiger Befehl plus Argumente für die OpenDocument-Bild-Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:67 +msgid "" +"Valid command plus arguments for the OpenDocument presentation template " +"thumbnailer" +msgstr "" +"Gültiger Befehl plus Argumente für die OpenDocument-Präsentationsvorlagen-" +"Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:68 +msgid "" +"Valid command plus arguments for the OpenDocument presentation thumbnailer" +msgstr "" +"Gültiger Befehl plus Argumente für die OpenDocument-Präsentations-Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:69 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet template " +"thumbnailer" +msgstr "" +"Gültiger Befehl plus Argumente für die OpenDocument-Tabellenvorlagen-Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:70 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" +msgstr "Gültiger Befehl plus Argumente für die OpenDocument-Tabellen-Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:71 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"template thumbnailer" +msgstr "" +"Gültiger Befehl plus Argumente für die OpenDocument-Textdokumentvorlagen-" +"Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:72 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"thumbnailer" +msgstr "" +"Gültiger Befehl plus Argumente für die OpenDocument-Textdokumenten-Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:73 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing master " +"document thumbnailer" +msgstr "" +"Gültiger Befehl plus Argumente für die OpenDocument-Text-Globaldokument-" +"Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:74 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Drawing template " +"thumbnailer" +msgstr "" +"Gültiger Befehl plus Argumente für die OpenOffice 1.x Zeichnungsvorlagen-" +"Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:75 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" +msgstr "" +"Gültiger Befehl plus Argumente für die OpenOffice 1.x Zeichnungs-Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:76 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"template thumbnailer" +msgstr "" +"Gültiger Befehl plus Argumente für die OpenOffice 1.x Impress-" +"Präsentationsvorlagen-Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:77 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"thumbnailer" +msgstr "" +"Gültiger Befehl plus Argumente für die OpenOffice 1.x Impress-Präsentations-" +"Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:78 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" +msgstr "" +"Gültiger Befehl plus Argumente für die OpenOffice 1.x Mathematik-Dokumenten-" +"Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:79 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer document " +"thumbnailer" +msgstr "" +"Gültiger Befehl plus Argumente für die OpenOffice 1.x Writer-Dokumenten-" +"Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:80 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer global template " +"thumbnailer" +msgstr "" +"Gültiger Befehl plus Argumente für die OpenOffice 1.x Writer-Globalvorlagen-" +"Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:81 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer template " +"thumbnailer" +msgstr "" +"Gültiger Befehl plus Argumente für die OpenOffice 1.x Writer-Vorlagen-" +"Vorschau" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:82 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" +msgstr "" +"Gültiger Befehl plus Argumente für die OpenOffice 1.x Tabellen-Vorschau" diff --git a/po/en_GB.po b/po/en_GB.po new file mode 100644 index 0000000..9c3b301 --- /dev/null +++ b/po/en_GB.po @@ -0,0 +1,554 @@ +# British English translation for libgsf. +# Copyright (C) 2009 libgsf's COPYRIGHT HOLDER +# This file is distributed under the same license as the libgsf package. +# Philip Withnall , 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: libgsf master\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=libgsf&component=General\n" +"POT-Creation-Date: 2009-09-13 03:28+0000\n" +"PO-Revision-Date: 2009-09-13 03:28+0000\n" +"Last-Translator: Philip Withnall \n" +"Language-Team: British English \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../gsf/gsf-blob.c:108 +msgid "Not enough memory to copy %" +msgstr "Not enough memory to copy %" + +#: ../gsf/gsf-clip-data.c:150 +msgid "The clip_data is in %s, but it is smaller than at least %" +msgstr "The clip_data is in %s, but it is smaller than at least %" + +#: ../gsf/gsf-clip-data.c:243 +#, c-format +msgid "" +"The clip_data is in Windows clipboard format, but it is smaller than the " +"required 4 bytes." +msgstr "" +"The clip_data is in Windows clipboard format, but it is smaller than the " +"required 4 bytes." + +#: ../gsf/gsf-clip-data.c:254 +msgid "Windows Metafile format" +msgstr "Windows Metafile format" + +#. CF_BITMAP +#: ../gsf/gsf-clip-data.c:260 +msgid "Windows DIB or BITMAP format" +msgstr "Windows DIB or BITMAP format" + +#: ../gsf/gsf-clip-data.c:265 +msgid "Windows Enhanced Metafile format" +msgstr "Windows Enhanced Metafile format" + +#: ../gsf/gsf-msole-utils.c:311 +msgid "Missing data when reading the %s property; got %" +msgstr "Missing data when reading the %s property; got %" + +#: ../gsf/gsf-msole-utils.c:357 +msgid "" +"Corrupt data in the VT_CF property; clipboard data length must be at least 4 " +"bytes, but the data says it only has %" +msgstr "" +"Corrupt data in the VT_CF property; clipboard data length must be at least 4 " +"bytes, but the data says it only has %" + +#: ../gsf/gsf-open-pkg-utils.c:351 +#, c-format +msgid "Unable to find part id='%s' for '%s'" +msgstr "Unable to find part id='%s' for '%s'" + +#: ../gsf/gsf-open-pkg-utils.c:379 +#, c-format +msgid "Unable to find part with type='%s' for '%s'" +msgstr "Unable to find part with type='%s' for '%s'" + +#: ../gsf/gsf-open-pkg-utils.c:409 +#, c-format +msgid "Missing id for part in '%s'" +msgstr "Missing id for part in '%s'" + +#: ../gsf/gsf-open-pkg-utils.c:418 +#, c-format +msgid "Part '%s' in '%s' from '%s' is corrupt!" +msgstr "Part '%s' in '%s' from '%s' is corrupt!" + +#: ../tools/gsf.c:22 +msgid "Display program version" +msgstr "Display program version" + +#: ../tools/gsf.c:44 +#, c-format +msgid "%s: Failed to open %s: %s\n" +msgstr "%s: Failed to open %s: %s\n" + +#: ../tools/gsf.c:65 +#, c-format +msgid "%s: Failed to recognize %s as an archive\n" +msgstr "%s: Failed to recognise %s as an archive\n" + +#: ../tools/gsf.c:102 +#, c-format +msgid "Available subcommands are...\n" +msgstr "Available subcommands are...\n" + +#: ../tools/gsf.c:103 +#, c-format +msgid "* cat output one or more files in archive\n" +msgstr "* cat output one or more files in archive\n" + +#: ../tools/gsf.c:104 +#, c-format +msgid "* dump dump one or more files in archive as hex\n" +msgstr "* dump dump one or more files in archive as hex\n" + +#: ../tools/gsf.c:105 +#, c-format +msgid "* help list subcommands\n" +msgstr "* help list subcommands\n" + +#: ../tools/gsf.c:106 +#, c-format +msgid "* list list files in archive\n" +msgstr "* list list files in archive\n" + +#: ../tools/gsf.c:107 +#, c-format +msgid "* listprops list document properties in archive\n" +msgstr "* listprops list document properties in archive\n" + +#: ../tools/gsf.c:108 +#, c-format +msgid "* props print specified document properties\n" +msgstr "* props print specified document properties\n" + +#: ../tools/gsf.c:291 +#, c-format +msgid "No property named %s\n" +msgstr "No property named %s\n" + +#: ../tools/gsf.c:364 +msgid "SUBCOMMAND ARCHIVE..." +msgstr "SUBCOMMAND ARCHIVE..." + +#: ../tools/gsf.c:371 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" + +#: ../tools/gsf.c:378 +#, c-format +msgid "gsf version %d.%d.%d\n" +msgstr "gsf version %d.%d.%d\n" + +#: ../tools/gsf.c:384 +#, c-format +msgid "Usage: %s %s\n" +msgstr "Usage: %s %s\n" + +#: ../tools/gsf.c:405 +#, c-format +msgid "Run '%s help' to see a list subcommands.\n" +msgstr "Run '%s help' to see a list of subcommands.\n" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "" +"Boolean options available, true enables thumbnailing and false disables the " +"creation of new thumbnails" +msgstr "" +"Boolean options available, true enables thumbnailing and false disables the " +"creation of new thumbnails" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing for OpenOffice 1.x Calc spreadsheets" +msgstr "Enable thumbnailing of OpenOffice 1.x Calc spreadsheets" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing for OpenOffice 1.x Drawing templates" +msgstr "Enable thumbnailing of OpenOffice 1.x Drawing templates" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing for OpenOffice 1.x Impress Presentation templates" +msgstr "Enable thumbnailing of OpenOffice 1.x Impress Presentation templates" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Enable thumbnailing for OpenOffice 1.x Impress presentations" +msgstr "Enable thumbnailing of OpenOffice 1.x Impress presentations" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Enable thumbnailing for OpenOffice 1.x Math documents" +msgstr "Enable thumbnailing of OpenOffice 1.x Math documents" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Enable thumbnailing for OpenOffice 1.x Spreadsheet templates" +msgstr "Enable thumbnailing of OpenOffice 1.x Spreadsheet templates" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Enable thumbnailing for OpenOffice 1.x Writer documents" +msgstr "Enable thumbnailing of OpenOffice 1.x Writer documents" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Enable thumbnailing for OpenOffice 1.x Writer global templates" +msgstr "Enable thumbnailing of OpenOffice 1.x Writer global templates" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Enable thumbnailing for OpenOffice 1.x Writer templates" +msgstr "Enable thumbnailing of OpenOffice 1.x Writer templates" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:11 +msgid "Enable thumbnailing of Microsoft Excel 2007 spreadsheets" +msgstr "Enable thumbnailing of Microsoft Excel 2007 spreadsheets" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:12 +msgid "Enable thumbnailing of Microsoft Excel spreadsheets" +msgstr "Enable thumbnailing of Microsoft Excel spreadsheets" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:13 +msgid "Enable thumbnailing of Microsoft PowerPoint 2007 presentations" +msgstr "Enable thumbnailing of Microsoft PowerPoint 2007 presentations" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:14 +msgid "Enable thumbnailing of Microsoft PowerPoint presentations" +msgstr "Enable thumbnailing of Microsoft PowerPoint presentations" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:15 +msgid "Enable thumbnailing of Microsoft Word 2007 documents" +msgstr "Enable thumbnailing of Microsoft Word 2007 documents" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:16 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "Enable thumbnailing of Microsoft Word documents" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:17 +msgid "Enable thumbnailing of OpenDocument charts" +msgstr "Enable thumbnailing of OpenDocument charts" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:18 +msgid "Enable thumbnailing of OpenDocument drawing templates" +msgstr "Enable thumbnailing of OpenDocument drawing templates" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:19 +msgid "Enable thumbnailing of OpenDocument drawings" +msgstr "Enable thumbnailing of OpenDocument drawings" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:20 +msgid "Enable thumbnailing of OpenDocument formulas" +msgstr "Enable thumbnailing of OpenDocument formulae" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:21 +msgid "Enable thumbnailing of OpenDocument images" +msgstr "Enable thumbnailing of OpenDocument images" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:22 +msgid "Enable thumbnailing of OpenDocument presentation templates" +msgstr "Enable thumbnailing of OpenDocument presentation templates" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:23 +msgid "Enable thumbnailing of OpenDocument presentations" +msgstr "Enable thumbnailing of OpenDocument presentations" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:24 +msgid "Enable thumbnailing of OpenDocument spreadsheet templates" +msgstr "Enable thumbnailing of OpenDocument spreadsheet templates" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:25 +msgid "Enable thumbnailing of OpenDocument spreadsheets" +msgstr "Enable thumbnailing of OpenDocument spreadsheets" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:26 +msgid "Enable thumbnailing of OpenDocument wordprocessing document templates" +msgstr "Enable thumbnailing of OpenDocument word processing document templates" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:27 +msgid "Enable thumbnailing of OpenDocument wordprocessing documents" +msgstr "Enable thumbnailing of OpenDocument word processing documents" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:28 +msgid "Enable thumbnailing of OpenDocument wordprocessing master documents" +msgstr "Enable thumbnailing of OpenDocument word processing master documents" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:29 +msgid "Thumbnail command for Microsoft Excel 2007 spreadsheets" +msgstr "Thumbnail command for Microsoft Excel 2007 spreadsheets" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:30 +msgid "Thumbnail command for Microsoft Excel spreadsheets" +msgstr "Thumbnail command for Microsoft Excel spreadsheets" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:31 +msgid "Thumbnail command for Microsoft PowerPoint 2007 presentations" +msgstr "Thumbnail command for Microsoft PowerPoint 2007 presentations" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:32 +msgid "Thumbnail command for Microsoft PowerPoint presentations" +msgstr "Thumbnail command for Microsoft PowerPoint presentations" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:33 +msgid "Thumbnail command for Microsoft Word 2007 documents" +msgstr "Thumbnail command for Microsoft Word 2007 documents" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:34 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "Thumbnail command for Microsoft Word documents" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:35 +msgid "Thumbnail command for OpenDocument charts" +msgstr "Thumbnail command for OpenDocument charts" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:36 +msgid "Thumbnail command for OpenDocument drawing templates" +msgstr "Thumbnail command for OpenDocument drawing templates" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:37 +msgid "Thumbnail command for OpenDocument drawings" +msgstr "Thumbnail command for OpenDocument drawings" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:38 +msgid "Thumbnail command for OpenDocument formulas" +msgstr "Thumbnail command for OpenDocument formulae" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:39 +msgid "Thumbnail command for OpenDocument images" +msgstr "Thumbnail command for OpenDocument images" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:40 +msgid "Thumbnail command for OpenDocument presentation templates" +msgstr "Thumbnail command for OpenDocument presentation templates" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:41 +msgid "Thumbnail command for OpenDocument presentations" +msgstr "Thumbnail command for OpenDocument presentations" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:42 +msgid "Thumbnail command for OpenDocument spreadsheet templates" +msgstr "Thumbnail command for OpenDocument spreadsheet templates" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:43 +msgid "Thumbnail command for OpenDocument spreadsheets" +msgstr "Thumbnail command for OpenDocument spreadsheets" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:44 +msgid "Thumbnail command for OpenDocument wordprocessing document templates" +msgstr "Thumbnail command for OpenDocument word processing document templates" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:45 +msgid "Thumbnail command for OpenDocument wordprocessing documents" +msgstr "Thumbnail command for OpenDocument word processing documents" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:46 +msgid "Thumbnail command for OpenDocument wordprocessing master documents" +msgstr "Thumbnail command for OpenDocument word processing master documents" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:47 +msgid "Thumbnail command for OpenOffice 1.x Calc spreadsheets" +msgstr "Thumbnail command for OpenOffice 1.x Calc spreadsheets" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:48 +msgid "Thumbnail command for OpenOffice 1.x Drawing templates" +msgstr "Thumbnail command for OpenOffice 1.x Drawing templates" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:49 +msgid "Thumbnail command for OpenOffice 1.x Impress Presentation templates" +msgstr "Thumbnail command for OpenOffice 1.x Impress Presentation templates" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:50 +msgid "Thumbnail command for OpenOffice 1.x Impress presentations" +msgstr "Thumbnail command for OpenOffice 1.x Impress presentations" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:51 +msgid "Thumbnail command for OpenOffice 1.x Math documents" +msgstr "Thumbnail command for OpenOffice 1.x Math documents" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:52 +msgid "Thumbnail command for OpenOffice 1.x Spreadsheet templates" +msgstr "Thumbnail command for OpenOffice 1.x Spreadsheet templates" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:53 +msgid "Thumbnail command for OpenOffice 1.x Writer documents" +msgstr "Thumbnail command for OpenOffice 1.x Writer documents" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:54 +msgid "Thumbnail command for OpenOffice 1.x Writer global templates" +msgstr "Thumbnail command for OpenOffice 1.x Writer global templates" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:55 +msgid "Thumbnail command for OpenOffice 1.x Writer templates" +msgstr "Thumbnail command for OpenOffice 1.x Writer templates" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:56 +msgid "Valid command plus arguments for the Microsoft Excel 2007 spreadsheets." +msgstr "" +"Valid command plus arguments for the Microsoft Excel 2007 spreadsheets." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:57 +msgid "Valid command plus arguments for the Microsoft Excel spreadsheets." +msgstr "Valid command plus arguments for the Microsoft Excel spreadsheets." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:58 +msgid "" +"Valid command plus arguments for the Microsoft PowerPoint 2007 thumbnailer" +msgstr "" +"Valid command plus arguments for the Microsoft PowerPoint 2007 thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:59 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" +msgstr "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:60 +msgid "Valid command plus arguments for the Microsoft Word 2007 thumbnailer" +msgstr "Valid command plus arguments for the Microsoft Word 2007 thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:61 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer" +msgstr "Valid command plus arguments for the Microsoft Word thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:62 +msgid "Valid command plus arguments for the OpenDocument chart thumbnailer" +msgstr "Valid command plus arguments for the OpenDocument chart thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:63 +msgid "" +"Valid command plus arguments for the OpenDocument drawing template " +"thumbnailer" +msgstr "" +"Valid command plus arguments for the OpenDocument drawing template " +"thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:64 +msgid "Valid command plus arguments for the OpenDocument drawing thumbnailer" +msgstr "Valid command plus arguments for the OpenDocument drawing thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:65 +msgid "Valid command plus arguments for the OpenDocument formula thumbnailer" +msgstr "Valid command plus arguments for the OpenDocument formula thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:66 +msgid "Valid command plus arguments for the OpenDocument image thumbnailer" +msgstr "Valid command plus arguments for the OpenDocument image thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:67 +msgid "" +"Valid command plus arguments for the OpenDocument presentation template " +"thumbnailer" +msgstr "" +"Valid command plus arguments for the OpenDocument presentation template " +"thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:68 +msgid "" +"Valid command plus arguments for the OpenDocument presentation thumbnailer" +msgstr "" +"Valid command plus arguments for the OpenDocument presentation thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:69 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet template " +"thumbnailer" +msgstr "" +"Valid command plus arguments for the OpenDocument spreadsheet template " +"thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:70 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" +msgstr "" +"Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:71 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"template thumbnailer" +msgstr "" +"Valid command plus arguments for the OpenDocument word processing document " +"template thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:72 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"thumbnailer" +msgstr "" +"Valid command plus arguments for the OpenDocument word processing document " +"thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:73 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing master " +"document thumbnailer" +msgstr "" +"Valid command plus arguments for the OpenDocument word processing master " +"document thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:74 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Drawing template " +"thumbnailer" +msgstr "" +"Valid command plus arguments for the OpenOffice 1.x Drawing template " +"thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:75 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" +msgstr "" +"Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:76 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"template thumbnailer" +msgstr "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"template thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:77 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"thumbnailer" +msgstr "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:78 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" +msgstr "" +"Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:79 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer document " +"thumbnailer" +msgstr "" +"Valid command plus arguments for the OpenOffice 1.x Writer document " +"thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:80 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer global template " +"thumbnailer" +msgstr "" +"Valid command plus arguments for the OpenOffice 1.x Writer global template " +"thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:81 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer template " +"thumbnailer" +msgstr "" +"Valid command plus arguments for the OpenOffice 1.x Writer template " +"thumbnailer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:82 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" +msgstr "" +"Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" diff --git a/po/es.po b/po/es.po new file mode 100644 index 0000000..90cc61a --- /dev/null +++ b/po/es.po @@ -0,0 +1,631 @@ +# translation of libgsf.master.po to Español +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Jorge González , 2009. +msgid "" +msgstr "" +"Project-Id-Version: libgsf.master\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=libgsf&component=General\n" +"POT-Creation-Date: 2009-09-21 19:38+0000\n" +"PO-Revision-Date: 2009-09-28 22:09+0200\n" +"Last-Translator: Jorge González \n" +"Language-Team: Español \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: UTF-8\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../gsf/gsf-blob.c:111 +#, c-format +#| msgid "Not enough memory to copy %" +msgid "Not enough memory to copy %s bytes of data" +msgstr "No hay memoria suficiente para copiar %s bytes de datos" + +#: ../gsf/gsf-clip-data.c:153 +#, c-format +#| msgid "The clip_data is in %s, but it is smaller than at least %" +msgid "The clip_data is in %s, but it is smaller than at least %s bytes" +msgstr "El clip_data está en %s, pero es más pequeño de al menos %s bytes" + +#: ../gsf/gsf-clip-data.c:247 +#, c-format +msgid "" +"The clip_data is in Windows clipboard format, but it is smaller than the " +"required 4 bytes." +msgstr "" +"El clip_data está en el formato de Windows, pero es más pequeño de los 4 " +"bytes requeridos." + +#: ../gsf/gsf-clip-data.c:258 +msgid "Windows Metafile format" +msgstr "Formato de meta archivo de Windows" + +#. CF_BITMAP +#: ../gsf/gsf-clip-data.c:264 +msgid "Windows DIB or BITMAP format" +msgstr "Formato DIB o BITMAP de Windows" + +#: ../gsf/gsf-clip-data.c:269 +msgid "Windows Enhanced Metafile format" +msgstr "Formato de meta archivo mejorado de Windows" + +#: ../gsf/gsf-msole-utils.c:315 +#, c-format +#| msgid "Missing data when reading the %s property; got %" +msgid "" +"Missing data when reading the %s property; got %s bytes, but %s bytes at " +"least are needed." +msgstr "" +"Faltan datos al leer la propiedad %s; se obtuvieron %s bytes pero se " +"necesitan al menos %s bytes." + +#: ../gsf/gsf-msole-utils.c:366 +#, c-format +#| msgid "" +#| "Corrupt data in the VT_CF property; clipboard data length must be at " +#| "least 4 bytes, but the data says it only has %" +msgid "" +"Corrupt data in the VT_CF property; clipboard data length must be at least 4 " +"bytes, but the data says it only has %s bytes available." +msgstr "" +"Datos corruptos en la propiedad VT_CF; la longitud del portapapeles debe ser " +"de al menos 4 bytes, pero los datos dicen que sólo tiene %s bytes " +"disponibles." + +#: ../gsf/gsf-open-pkg-utils.c:351 +#, c-format +msgid "Unable to find part id='%s' for '%s'" +msgstr "No se pudo encontrar la parte con ID=«%s» para «%s»" + +#: ../gsf/gsf-open-pkg-utils.c:379 +#, c-format +msgid "Unable to find part with type='%s' for '%s'" +msgstr "No se pudo encontrar la parte con el tipo=«%s» para «%s»" + +#: ../gsf/gsf-open-pkg-utils.c:409 +#, c-format +msgid "Missing id for part in '%s'" +msgstr "Falta un ID para una parte en «%s»" + +#: ../gsf/gsf-open-pkg-utils.c:418 +#, c-format +msgid "Part '%s' in '%s' from '%s' is corrupt!" +msgstr "La parte «%s» en «%s» de «%s» está corrupta." + +#: ../tools/gsf.c:22 +msgid "Display program version" +msgstr "Mostrar la versión del programa" + +#: ../tools/gsf.c:44 +#, c-format +msgid "%s: Failed to open %s: %s\n" +msgstr "%s: Falló al abrir %s: %s\n" + +#: ../tools/gsf.c:65 +#, c-format +msgid "%s: Failed to recognize %s as an archive\n" +msgstr "%s: Falló al reconocer %s como un archivador\n" + +#: ../tools/gsf.c:102 +#, c-format +msgid "Available subcommands are...\n" +msgstr "Los subcomandos disponibles son...\n" + +#: ../tools/gsf.c:103 +#, c-format +msgid "* cat output one or more files in archive\n" +msgstr "* cat muestra la salida de uno o más archivadores\n" + +#: ../tools/gsf.c:104 +#, c-format +msgid "* dump dump one or more files in archive as hex\n" +msgstr "" +"* dump vuelca uno o más archivos en un archivador como datos " +"hexadecimales\n" + +#: ../tools/gsf.c:105 +#, c-format +msgid "* help list subcommands\n" +msgstr "* help lista los subcomandos\n" + +#: ../tools/gsf.c:106 +#, c-format +msgid "* list list files in archive\n" +msgstr "* list lista los archivos en el archivador\n" + +#: ../tools/gsf.c:107 +#, c-format +msgid "* listprops list document properties in archive\n" +msgstr "" +"* listprops lista las propiedades de los documentos en el archivador\n" + +#: ../tools/gsf.c:108 +#, c-format +msgid "* props print specified document properties\n" +msgstr "* props imprime las propiedades del documento especificado\n" + +#: ../tools/gsf.c:291 +#, c-format +msgid "No property named %s\n" +msgstr "No existe la propiedad de nombre %s\n" + +#: ../tools/gsf.c:364 +msgid "SUBCOMMAND ARCHIVE..." +msgstr "SUBCOMANDO ARCHIVADOR..." + +#: ../tools/gsf.c:371 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"Ejecute «%s --help» para ver una lista completa de todas las opciones " +"disponibles de la línea de comandos.\n" + +#: ../tools/gsf.c:378 +#, c-format +msgid "gsf version %d.%d.%d\n" +msgstr "Versión de gsf %d.%d.%d\n" + +#: ../tools/gsf.c:384 +#, c-format +msgid "Usage: %s %s\n" +msgstr "Uso: %s %s\n" + +#: ../tools/gsf.c:405 +#, c-format +msgid "Run '%s help' to see a list subcommands.\n" +msgstr "Ejecite «%s help» para ver una lista de los subcomandos.\n" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "" +"Boolean options available, true enables thumbnailing and false disables the " +"creation of new thumbnails" +msgstr "" +"Opciones booleanas disponibles: \"true\" habilita la generación de imágenes " +"en miniatura y \"false\" la deshabilita" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing for OpenOffice 1.x Calc spreadsheets" +msgstr "Activar miniaturas para hojas de cálculo de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing for OpenOffice 1.x Drawing templates" +msgstr "Activar miniaturas para plantillas de OpenOffice 1.x Dibujos" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing for OpenOffice 1.x Impress Presentation templates" +msgstr "" +"Activar miniaturas para plantillas de presentaciones OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Enable thumbnailing for OpenOffice 1.x Impress presentations" +msgstr "Activar miniaturas para presentaciones OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Enable thumbnailing for OpenOffice 1.x Math documents" +msgstr "Activar miniaturas para documentos de OpenOffice 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Enable thumbnailing for OpenOffice 1.x Spreadsheet templates" +msgstr "" +"Activar miniaturas para plantillas de hojas de cálculo de OpenOffice 1.x " + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Enable thumbnailing for OpenOffice 1.x Writer documents" +msgstr "" +"Activar miniaturas para documentos de procesador de textos de OpenOffice 1.x " + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Enable thumbnailing for OpenOffice 1.x Writer global templates" +msgstr "" +"Activar miniaturas para plantillas globales del procesador de textos " +"OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Enable thumbnailing for OpenOffice 1.x Writer templates" +msgstr "" +"Activar miniaturas para plantillas del procesador de textos de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:11 +msgid "Enable thumbnailing of Microsoft Excel 2007 spreadsheets" +msgstr "Activar miniaturas para hojas de cálculo de Microsoft Excel 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:12 +msgid "Enable thumbnailing of Microsoft Excel spreadsheets" +msgstr "Activar miniaturas para hojas de cálculo de Microsoft Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:13 +msgid "Enable thumbnailing of Microsoft PowerPoint 2007 presentations" +msgstr "Activar miniaturas para presentaciones de Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:14 +msgid "Enable thumbnailing of Microsoft PowerPoint presentations" +msgstr "Activar miniaturas para presentaciones de Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:15 +msgid "Enable thumbnailing of Microsoft Word 2007 documents" +msgstr "Activar miniaturas para documentos de Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:16 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "Activar miniaturas para documentos de Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:17 +msgid "Enable thumbnailing of OpenDocument charts" +msgstr "Activar miniaturas para gráficas de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:18 +msgid "Enable thumbnailing of OpenDocument drawing templates" +msgstr "Activar miniaturas para plantillas de dibujos de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:19 +msgid "Enable thumbnailing of OpenDocument drawings" +msgstr "Activar miniaturas para dibujos de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:20 +msgid "Enable thumbnailing of OpenDocument formulas" +msgstr "Activar miniaturas para fórmulas de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:21 +msgid "Enable thumbnailing of OpenDocument images" +msgstr "Activar miniaturas para imágenes de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:22 +msgid "Enable thumbnailing of OpenDocument presentation templates" +msgstr "Activar miniaturas para plantillas de presentaciones de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:23 +msgid "Enable thumbnailing of OpenDocument presentations" +msgstr "Activar miniaturas para presentaciones de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:24 +msgid "Enable thumbnailing of OpenDocument spreadsheet templates" +msgstr "Activar miniaturas para plantillas de hojas de cálculo de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:25 +msgid "Enable thumbnailing of OpenDocument spreadsheets" +msgstr "Activar miniaturas para hojas de cálculo OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:26 +msgid "Enable thumbnailing of OpenDocument wordprocessing document templates" +msgstr "" +"Activar miniaturas para plantillas de documentos del procesador de " +"documentos de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:27 +msgid "Enable thumbnailing of OpenDocument wordprocessing documents" +msgstr "" +"Activar miniaturas para documentos del procesador de textos de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:28 +msgid "Enable thumbnailing of OpenDocument wordprocessing master documents" +msgstr "" +"Activar miniaturas para documentos maestros del procesador de textos de " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:29 +msgid "Thumbnail command for Microsoft Excel 2007 spreadsheets" +msgstr "" +"Comando para generar miniaturas para documentos de hojas de cálculo de " +"Microsoft Excel 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:30 +msgid "Thumbnail command for Microsoft Excel spreadsheets" +msgstr "" +"Comando para generar miniaturas para documentos de hojas de cálculo de " +"Microsoft Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:31 +msgid "Thumbnail command for Microsoft PowerPoint 2007 presentations" +msgstr "" +"Comando para generar miniaturas para presentaciones de Microsoft PowerPoint " +"2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:32 +msgid "Thumbnail command for Microsoft PowerPoint presentations" +msgstr "" +"Comando para generar miniaturas para presentaciones de Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:33 +msgid "Thumbnail command for Microsoft Word 2007 documents" +msgstr "Comando para generar miniaturas para archivos de Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:34 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "Comando para generar miniaturas para archivos de Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:35 +msgid "Thumbnail command for OpenDocument charts" +msgstr "Comando para generar miniaturas para gráficas de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:36 +msgid "Thumbnail command for OpenDocument drawing templates" +msgstr "" +"Comando para generar miniaturas para plantillas de dibujos de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:37 +msgid "Thumbnail command for OpenDocument drawings" +msgstr "Comando para generar miniaturas para dibujos de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:38 +msgid "Thumbnail command for OpenDocument formulas" +msgstr "Comando para generar miniaturas para fórmulas de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:39 +msgid "Thumbnail command for OpenDocument images" +msgstr "Comando para generar miniaturas para imágenes de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:40 +msgid "Thumbnail command for OpenDocument presentation templates" +msgstr "" +"Comando para generar miniaturas para plantillas de presentaciones de " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:41 +msgid "Thumbnail command for OpenDocument presentations" +msgstr "Comando para generar miniaturas para presentaciones de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:42 +msgid "Thumbnail command for OpenDocument spreadsheet templates" +msgstr "" +"Comando para generar miniaturas para plantillas de hojas de cálculo de " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:43 +msgid "Thumbnail command for OpenDocument spreadsheets" +msgstr "Comando para generar miniaturas para hojas de cálculo de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:44 +msgid "Thumbnail command for OpenDocument wordprocessing document templates" +msgstr "" +"Comando para generar miniaturas para plantillas de documentos de " +"procesadores de texto de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:45 +msgid "Thumbnail command for OpenDocument wordprocessing documents" +msgstr "" +"Comando para generar miniaturas para documentos de procesadores de texto de " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:46 +msgid "Thumbnail command for OpenDocument wordprocessing master documents" +msgstr "" +"Comando para generar miniaturas para documentos maestros de procesadores de " +"texto de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:47 +msgid "Thumbnail command for OpenOffice 1.x Calc spreadsheets" +msgstr "" +"Comando para generar miniaturas para hojas de cálculo de OpenOffice 1.x Calc" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:48 +msgid "Thumbnail command for OpenOffice 1.x Drawing templates" +msgstr "" +"Comando para generar miniaturas para plantillas de OpenOffice 1.x Dibujos" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:49 +msgid "Thumbnail command for OpenOffice 1.x Impress Presentation templates" +msgstr "" +"Comando para generar miniaturas para plantillas de presentaciones de " +"OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:50 +msgid "Thumbnail command for OpenOffice 1.x Impress presentations" +msgstr "Comando para generar miniaturas para presentaciones de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:51 +msgid "Thumbnail command for OpenOffice 1.x Math documents" +msgstr "Comando para generar miniaturas para documentos de OpenOffice 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:52 +msgid "Thumbnail command for OpenOffice 1.x Spreadsheet templates" +msgstr "" +"Comando para generar miniaturas para plantillas de OpenOffice 1.x Spreadsheet" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:53 +msgid "Thumbnail command for OpenOffice 1.x Writer documents" +msgstr "" +"Comando para generar miniaturas para documentos de OpenOffice 1.x writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:54 +msgid "Thumbnail command for OpenOffice 1.x Writer global templates" +msgstr "" +"Comando para generar miniaturas para plantillas globales de OpenOffice 1.x " +"writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:55 +msgid "Thumbnail command for OpenOffice 1.x Writer templates" +msgstr "" +"Comando para generar miniaturas para plantillas de OpenOffice 1.x writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:56 +msgid "Valid command plus arguments for the Microsoft Excel 2007 spreadsheets." +msgstr "" +"Comando válido y argumentos para hojas de cálculo de Microsoft Excel 2007." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:57 +msgid "Valid command plus arguments for the Microsoft Excel spreadsheets." +msgstr "Comando válido y argumentos para hojas de cálculo de Microsoft Excel." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:58 +msgid "" +"Valid command plus arguments for the Microsoft PowerPoint 2007 thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de Microsoft " +"PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:59 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de Microsoft " +"PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:60 +msgid "Valid command plus arguments for the Microsoft Word 2007 thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de Microsoft " +"Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:61 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:62 +msgid "Valid command plus arguments for the OpenDocument chart thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de gráficos de " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:63 +msgid "" +"Valid command plus arguments for the OpenDocument drawing template " +"thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de plantillas de " +"dibujos de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:64 +msgid "Valid command plus arguments for the OpenDocument drawing thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de dibujos de " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:65 +msgid "Valid command plus arguments for the OpenDocument formula thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de fórmulas de " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:66 +msgid "Valid command plus arguments for the OpenDocument image thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de imágenes de " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:67 +msgid "" +"Valid command plus arguments for the OpenDocument presentation template " +"thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de plantillas de " +"presentaciones de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:68 +msgid "" +"Valid command plus arguments for the OpenDocument presentation thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de " +"presentaciones de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:69 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet template " +"thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de plantillas de " +"hojas de cálculo de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:70 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de hojas de " +"cálculo de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:71 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"template thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de plantillas de " +"documentos de procesadores de texto de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:72 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de documentos de " +"procesadores de texto de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:73 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing master " +"document thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas documentos " +"maestros de procesadores de texto de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:74 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Drawing template " +"thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de plantillas de " +"OpenOffice 1.x Dibujos" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:75 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de OpenOffice 1." +"x Dibujos" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:76 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"template thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de plantillas de " +"presentaciones de OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:77 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de " +"presentaciones de OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:78 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de documentos de " +"OpenOffice 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:79 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer document " +"thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de documentos de " +"OpenOffice 1.x writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:80 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer global template " +"thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de plantillas " +"globales de OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:81 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer template " +"thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de plantillas de " +"OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:82 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" +msgstr "" +"Comando válido y argumentos para el generador de miniaturas de hojas de " +"cálculo de OpenOffice 1.x" diff --git a/po/eu.po b/po/eu.po new file mode 100644 index 0000000..9ded091 --- /dev/null +++ b/po/eu.po @@ -0,0 +1,590 @@ +# translation of eu.po to Basque +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Iñaki Larrañaga Murgoitio , 2009, 2010. +msgid "" +msgstr "" +"Project-Id-Version: eu\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-03-15 18:58+0100\n" +"PO-Revision-Date: 2010-03-15 19:00+0100\n" +"Last-Translator: Iñaki Larrañaga Murgoitio \n" +"Language-Team: Basque \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../gsf/gsf-blob.c:111 +#, c-format +msgid "Not enough memory to copy %s bytes of data" +msgstr "Ez dago nahikoa memoriarik datuen %s byte kopiatzeko" + +#: ../gsf/gsf-clip-data.c:153 +#, c-format +msgid "The clip_data is in %s, but it is smaller than at least %s bytes" +msgstr "clip_data %s(e)n dago, honakoa baino txikiegia da ordea: %s byte" + +#: ../gsf/gsf-clip-data.c:247 +#, c-format +msgid "" +"The clip_data is in Windows clipboard format, but it is smaller than the " +"required 4 bytes." +msgstr "" +"clip_data Windows-eko arbeleko formatuan dago, beharrezkoa den 4 byte baino " +"txikiagoa da ordea." + +#: ../gsf/gsf-clip-data.c:258 +msgid "Windows Metafile format" +msgstr "Windows-eko metafitxategi formatua" + +#. CF_BITMAP +#: ../gsf/gsf-clip-data.c:264 +msgid "Windows DIB or BITMAP format" +msgstr "Windows DIB edo BITMAP formatua" + +#: ../gsf/gsf-clip-data.c:269 +msgid "Windows Enhanced Metafile format" +msgstr "Windows-eko hobetutako metafitxategi formatua" + +#: ../gsf/gsf-msole-utils.c:315 +#, c-format +msgid "" +"Missing data when reading the %s property; got %s bytes, but %s bytes at " +"least are needed." +msgstr "" +"Datuak falta dira %s(r)en propietateak irakurtzean. Lortutakoa: %s byte, " +"baino gutxienez %s byte behar dira." + +#: ../gsf/gsf-msole-utils.c:366 +#, c-format +msgid "" +"Corrupt data in the VT_CF property; clipboard data length must be at least 4 " +"bytes, but the data says it only has %s bytes available." +msgstr "" +"Hondatutako datuak VT_CF propietatean. Arbeleko datuen luzera gutxienez 4 " +"byte-ekoa izan behar duen arren, datuek honakoa dutela diote: erabilgarri " +"%s byte" + +#: ../gsf/gsf-open-pkg-utils.c:351 +#, c-format +msgid "Unable to find part id='%s' for '%s'" +msgstr "Ezin da id='%s' zatia aurkitu '%s'(r)entzako" + +#: ../gsf/gsf-open-pkg-utils.c:379 +#, c-format +msgid "Unable to find part with type='%s' for '%s'" +msgstr "Ezin da type='%s' zatia aurkitu '%s'(r)entzako" + +#: ../gsf/gsf-open-pkg-utils.c:409 +#, c-format +msgid "Missing id for part in '%s'" +msgstr "ID zatia falta da '%s'(e)n" + +#: ../gsf/gsf-open-pkg-utils.c:418 +#, c-format +msgid "Part '%s' in '%s' from '%s' is corrupt!" +msgstr "'%2$s'(e)ko '%1$s' zatia '%3$s'(e)tik hondatuta dago!" + +#: ../tools/gsf.c:22 +msgid "Display program version" +msgstr "Bistaratu programaren bertsioa" + +#: ../tools/gsf.c:44 +#, c-format +msgid "%s: Failed to open %s: %s\n" +msgstr "%s: huts egin du %s irekitzean: %s\n" + +#: ../tools/gsf.c:65 +#, c-format +msgid "%s: Failed to recognize %s as an archive\n" +msgstr "%s: huts egin du %s artxibo gisa onartzean\n" + +#: ../tools/gsf.c:102 +#, c-format +msgid "Available subcommands are...\n" +msgstr "Azpikomando erabilgarriak...\n" + +#: ../tools/gsf.c:103 +#, c-format +msgid "* cat output one or more files in archive\n" +msgstr "* cat artxiboko fitxategi bate edo gehiago erakusten du\n" + +#: ../tools/gsf.c:104 +#, c-format +msgid "* dump dump one or more files in archive as hex\n" +msgstr "" +"* dump artxiboko fitxategi bat edo gehiago iraultzen du hamaseitar " +"gisa\n" + +#: ../tools/gsf.c:105 +#, c-format +msgid "* help list subcommands\n" +msgstr "* help azpikomandoak zerrendatzen ditu\n" + +#: ../tools/gsf.c:106 +#, c-format +msgid "* list list files in archive\n" +msgstr "* list artxiboko fitxategiak zerrendatzen ditu\n" + +#: ../tools/gsf.c:107 +#, c-format +msgid "* listprops list document properties in archive\n" +msgstr "* listprops artxiboko dokumentuen propietateak zerrendatzen ditu\n" + +#: ../tools/gsf.c:108 +#, c-format +msgid "* props print specified document properties\n" +msgstr "* props zehaztutako dokumentuaren propietateak erakusten ditu\n" + +#: ../tools/gsf.c:291 +#, c-format +msgid "No property named %s\n" +msgstr "Ez dago '%s' izeneko propietaterik\n" + +#: ../tools/gsf.c:364 +msgid "SUBCOMMAND ARCHIVE..." +msgstr "AZPIKOMANDOA ARTXIBOA..." + +#: ../tools/gsf.c:371 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"Exekutatu '%s --help' komando-lerroko aukera guztiak zerrendatzeko.\n" + +#: ../tools/gsf.c:378 +#, c-format +msgid "gsf version %d.%d.%d\n" +msgstr "gsf %d.%d.%d bertsioa\n" + +#: ../tools/gsf.c:384 +#, c-format +msgid "Usage: %s %s\n" +msgstr "Erabilera: %s %s\n" + +#: ../tools/gsf.c:405 +#, c-format +msgid "Run '%s help' to see a list subcommands.\n" +msgstr "Exekutatu '%s help' azpikomandoen zerrenda ikusteko.\n" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "" +"Boolean options available, true enables thumbnailing and false disables the " +"creation of new thumbnails" +msgstr "" +"Aukera boolear erabilgarriak, TRUE (egia) ezartzeak koadro txikiak gaitzen " +"ditu, eta FALSEk (faltsua) berriz koadro txiki berriak sortzea desgaitzen du." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing for OpenOffice 1.x Calc spreadsheets" +msgstr "Gaitu koadro txikiak sortzea OpenOffice 1.x Calc kalkulu-orriarentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing for OpenOffice 1.x Drawing templates" +msgstr "Gaitu koadro txikiak sortzea OpenOffice 1.x Draw txantiloientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing for OpenOffice 1.x Impress Presentation templates" +msgstr "" +"Gaitu koadro txikiak sortzea OpenOffice 1.x Impress aurkezpeneko " +"txantiloientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Enable thumbnailing for OpenOffice 1.x Impress presentations" +msgstr "Gaitu koadro txikiak sortzea OpenOffice 1.x Impress aurkezpenentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Enable thumbnailing for OpenOffice 1.x Math documents" +msgstr "Gaitu koadro txikiak sortzea OpenOffice 1.x Math dokumentuentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Enable thumbnailing for OpenOffice 1.x Spreadsheet templates" +msgstr "Gaitu koadro txikiak sortzea OpenOffice 1.x kalkulu-orriaren txantiloientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Enable thumbnailing for OpenOffice 1.x Writer documents" +msgstr "Gaitu koadro txikiak sortzea OpenOffice 1.x Writer dokumentuentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Enable thumbnailing for OpenOffice 1.x Writer global templates" +msgstr "Gaitu koadro txikiak sortzea OpenOffice 1.x Writer txantiloi globalentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Enable thumbnailing for OpenOffice 1.x Writer templates" +msgstr "Gaitu koadro txikiak sortzea OpenOffice 1.x Writer txantiloientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:11 +msgid "Enable thumbnailing of Microsoft Excel 2007 spreadsheets" +msgstr "Gaitu koadro txikiak sortzea Microsoft Excel 2007 kalkulu-orrientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:12 +msgid "Enable thumbnailing of Microsoft Excel spreadsheets" +msgstr "Gaitu koadro txikiak sortzea Microsoft Excel kalkulu-orrientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:13 +msgid "Enable thumbnailing of Microsoft PowerPoint 2007 presentations" +msgstr "Gaitu koadro txikiak sortzea Microsoft PowerPoint 2007 aurkezpenentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:14 +msgid "Enable thumbnailing of Microsoft PowerPoint presentations" +msgstr "Gaitu koadro txikiak sortzea Microsoft PowerPoint aurkezpenentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:15 +msgid "Enable thumbnailing of Microsoft Word 2007 documents" +msgstr "Gaitu koadro txikiak sortzea Microsoft Word 2007 dokumentuentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:16 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "Gaitu koadro txikiak sortzea Microsoft Word dokumentuentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:17 +msgid "Enable thumbnailing of OpenDocument charts" +msgstr "Gaitu koadro txikiak sortzea OpenDocument diagramentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:18 +msgid "Enable thumbnailing of OpenDocument drawing templates" +msgstr "Gaitu koadro txikiak sortzea OpenDocument marrazkien txantiloientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:19 +msgid "Enable thumbnailing of OpenDocument drawings" +msgstr "Gaitu koadro txikiak sortzea OpenDocument marrazkientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:20 +msgid "Enable thumbnailing of OpenDocument formulas" +msgstr "Gaitu koadro txikiak sortzea OpenDocument formulentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:21 +msgid "Enable thumbnailing of OpenDocument images" +msgstr "Gaitu koadro txikiak sortzea OpenDocument irudientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:22 +msgid "Enable thumbnailing of OpenDocument presentation templates" +msgstr "Gaitu koadro txikiak sortzea OpenDocument aurkezpenen txantiloientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:23 +msgid "Enable thumbnailing of OpenDocument presentations" +msgstr "Gaitu koadro txikiak sortzea OpenDocument aurkezpenentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:24 +msgid "Enable thumbnailing of OpenDocument spreadsheet templates" +msgstr "Gaitu koadro txikiak sortzea OpenDocument kalkulu-orrien txantiloientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:25 +msgid "Enable thumbnailing of OpenDocument spreadsheets" +msgstr "Gaitu koadro txikiak sortzea OpenDocument kalkulu-orrientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:26 +msgid "Enable thumbnailing of OpenDocument wordprocessing document templates" +msgstr "Gaitu koadro txikiak sortzea OpenDocument testu-dokumentuen txantiloientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:27 +msgid "Enable thumbnailing of OpenDocument wordprocessing documents" +msgstr "Gaitu koadro txikiak sortzea OpenDocument testu-dokumentuentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:28 +msgid "Enable thumbnailing of OpenDocument wordprocessing master documents" +msgstr "Gaitu koadro txikiak sortzea OpenDocument testu-dokumentu maisuentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:29 +msgid "Thumbnail command for Microsoft Excel 2007 spreadsheets" +msgstr "Koadro txikiak sortzeko komandoa Microsoft Excel 2007 kalkulu-orrientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:30 +msgid "Thumbnail command for Microsoft Excel spreadsheets" +msgstr "Koadro txikiak sortzeko komandoa Microsoft Excel kalkulu-orrientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:31 +msgid "Thumbnail command for Microsoft PowerPoint 2007 presentations" +msgstr "Koadro txikiak sortzeko komandoa Microsoft PowerPoint 2007 aurkezpenentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:32 +msgid "Thumbnail command for Microsoft PowerPoint presentations" +msgstr "Koadro txikiak sortzeko komandoa Microsoft PowerPoint aurkezpenentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:33 +msgid "Thumbnail command for Microsoft Word 2007 documents" +msgstr "Koadro txikiak sortzeko komandoa Microsoft Word 2007 dokumentuentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:34 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "Koadro txikiak sortzeko komandoa Microsoft Word dokumentuentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:35 +msgid "Thumbnail command for OpenDocument charts" +msgstr "Koadro txikiak sortzeko komandoa OpenDocument diagramentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:36 +msgid "Thumbnail command for OpenDocument drawing templates" +msgstr "Koadro txikiak sortzeko komandoa OpenDocument marrazkien txantiloientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:37 +msgid "Thumbnail command for OpenDocument drawings" +msgstr "Koadro txikiak sortzeko komandoa OpenDocument marrazkientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:38 +msgid "Thumbnail command for OpenDocument formulas" +msgstr "Koadro txikiak sortzeko komandoa OpenDocument formulentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:39 +msgid "Thumbnail command for OpenDocument images" +msgstr "Koadro txikiak sortzeko komandoa OpenDocument irudientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:40 +msgid "Thumbnail command for OpenDocument presentation templates" +msgstr "Koadro txikiak sortzeko komandoa OpenDocument aurkezpenen txantiloientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:41 +msgid "Thumbnail command for OpenDocument presentations" +msgstr "Koadro txikiak sortzeko komandoa OpenDocument aurkezpenentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:42 +msgid "Thumbnail command for OpenDocument spreadsheet templates" +msgstr "Koadro txikiak sortzeko komandoa OpenDocument kalkulu-orrien txantiloientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:43 +msgid "Thumbnail command for OpenDocument spreadsheets" +msgstr "Koadro txikiak sortzeko komandoa OpenDocument kalkulu-orrientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:44 +msgid "Thumbnail command for OpenDocument wordprocessing document templates" +msgstr "" +"Koadro txikiak sortzeko komandoa OpenDocument testu-dokumentuen " +"txantiloientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:45 +msgid "Thumbnail command for OpenDocument wordprocessing documents" +msgstr "Koadro txikiak sortzeko komandoa OpenDocument testu-dokumentuentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:46 +msgid "Thumbnail command for OpenDocument wordprocessing master documents" +msgstr "Koadro txikiak sortzeko komandoa OpenDocument testu-dokumentu maisuentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:47 +msgid "Thumbnail command for OpenOffice 1.x Calc spreadsheets" +msgstr "Koadro txikiak sortzeko komandoa OpenOffice 1.x Calc kalkulu-orrientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:48 +msgid "Thumbnail command for OpenOffice 1.x Drawing templates" +msgstr "" +"Koadro txikiak sortzeko komandoa OpenOffice 1.x Draw marrazkien " +"txantiloientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:49 +msgid "Thumbnail command for OpenOffice 1.x Impress Presentation templates" +msgstr "" +"Koadro txikiak sortzeko komandoa OpenOffice 1.x Impress aurkezpenen " +"txantiloientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:50 +msgid "Thumbnail command for OpenOffice 1.x Impress presentations" +msgstr "Koadro txikiak sortzeko komandoa OpenOffice 1.x Impress aurkezpenentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:51 +msgid "Thumbnail command for OpenOffice 1.x Math documents" +msgstr "Koadro txikiak sortzeko komandoa OpenOffice 1.x Math dokumentuentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:52 +msgid "Thumbnail command for OpenOffice 1.x Spreadsheet templates" +msgstr "Koadro txikiak sortzeko komandoa OpenOffice 1.x kalkulu-orrientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:53 +msgid "Thumbnail command for OpenOffice 1.x Writer documents" +msgstr "Koadro txikiak sortzeko komandoa OpenOffice 1.x Writer dokumentuentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:54 +msgid "Thumbnail command for OpenOffice 1.x Writer global templates" +msgstr "" +"Koadro txikiak sortzeko komandoa OpenOffice 1.x Writer txantiloi " +"globalentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:55 +msgid "Thumbnail command for OpenOffice 1.x Writer templates" +msgstr "Koadro txikiak sortzeko komandoa OpenOffice 1.x Writer txantiloientzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:56 +msgid "Valid command plus arguments for the Microsoft Excel 2007 spreadsheets." +msgstr "Baliozko komandoa argumentuekin Microsoft Excel 2007 kalkulu-orrientzako." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:57 +msgid "Valid command plus arguments for the Microsoft Excel spreadsheets." +msgstr "Baliozko komandoa argumentuekin Microsoft Excel kalkulu-orrientzako." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:58 +msgid "Valid command plus arguments for the Microsoft PowerPoint 2007 thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin Microsoft PowerPoint 2007 koadro txikien " +"sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:59 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin Microsoft PowerPoint koadro txikien " +"sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:60 +msgid "Valid command plus arguments for the Microsoft Word 2007 thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin Microsoft Word 2007 koadro txikien " +"sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:61 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin Microsoft Word koadro txikien " +"sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:62 +msgid "Valid command plus arguments for the OpenDocument chart thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenDocument diagramen koadro txikien " +"sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:63 +msgid "" +"Valid command plus arguments for the OpenDocument drawing template " +"thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenDocument marrazkien txantiloien koadro " +"txikien sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:64 +msgid "Valid command plus arguments for the OpenDocument drawing thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenDocument marrazkien koadro txikien " +"sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:65 +msgid "Valid command plus arguments for the OpenDocument formula thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenDocument formulen koadro txikien " +"sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:66 +msgid "Valid command plus arguments for the OpenDocument image thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenDocument irudien koadro txikien " +"sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:67 +msgid "" +"Valid command plus arguments for the OpenDocument presentation template " +"thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenDocument aurkezpenen txantiloien koadro " +"txikien sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:68 +msgid "Valid command plus arguments for the OpenDocument presentation thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenDocument aurkezpenen koadro txikien " +"sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:69 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet template " +"thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenDocument kalkulu-orrien txantiloien " +"koadro txikien sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:70 +msgid "Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenDocument kalkulu-orrien koadro txikien " +"sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:71 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"template thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenDocument testu-dokumentuen txantiloien " +"koadro txikien sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:72 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenDocument testu-dokumentuen koadro " +"txikien sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:73 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing master " +"document thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenDocument testu-dokumentu maisuen koadro " +"txikien sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:74 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Drawing template " +"thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenOffice 1.x marrazkien txantiloien koadro " +"txikien sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:75 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenOffice 1.x marrazkien koadro txikien " +"sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:76 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"template thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenOffice 1.x Impress aurkezpenen " +"txantiloien koadro txikien sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:77 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenOffice 1.x Impress aurkezpenen koadro " +"txikien sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:78 +msgid "Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenOffice 1.x Math dokumentuen koadro " +"txikien sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:79 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer document " +"thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenOffice 1.x Writer dokumentuen koadro " +"txikien sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:80 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer global template " +"thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenOffice 1.x Writer txantiloi globalen " +"koadro txikien sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:81 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer template " +"thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenOffice 1.x Writer txantiloien koadro " +"txikien sortzailearentzako" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:82 +msgid "Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" +msgstr "" +"Baliozko komandoa argumentuekin OpenOffice 1.x kalkulu-orrien txantiloien " +"koadro txikien sortzailearentzako" + diff --git a/po/fr.po b/po/fr.po new file mode 100644 index 0000000..f15f11a --- /dev/null +++ b/po/fr.po @@ -0,0 +1,634 @@ +# French translation of libgsf. +# Copyright (C) 2009 Free Software Foundation, Inc. +# This file is distributed under the same license as the libgsf package. +# +# Gérard Baylard <, 2009 +# +msgid "" +msgstr "" +"Project-Id-Version: libgsf-1.14.15 fr\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=libgsf&component=General\n" +"POT-Creation-Date: 2009-09-21 19:38+0000\n" +"PO-Revision-Date: 2009-09-19 16:48+0100\n" +"Last-Translator: Gérard Baylard \n" +"Language-Team: GNOME French Team \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../gsf/gsf-blob.c:111 +#, c-format +msgid "Not enough memory to copy %s bytes of data" +msgstr "Mémoire insuffisante pour copier %s octets de données" + +#: ../gsf/gsf-clip-data.c:153 +#, c-format +msgid "The clip_data is in %s, but it is smaller than at least %s bytes" +msgstr "" +"Les données du presse-papiers sont dans le format %s, mais leur taille est " +"inférieure à %s octets" + +#: ../gsf/gsf-clip-data.c:247 +#, c-format +msgid "" +"The clip_data is in Windows clipboard format, but it is smaller than the " +"required 4 bytes." +msgstr "" +"Les données sont au format presse-papiers Windows, mais elles sont plus " +"petites que les 4 octets requis." + +#: ../gsf/gsf-clip-data.c:258 +msgid "Windows Metafile format" +msgstr "Format Windows Metafile" + +#. CF_BITMAP +#: ../gsf/gsf-clip-data.c:264 +msgid "Windows DIB or BITMAP format" +msgstr "Format DIB ou BITMAP Windows" + +#: ../gsf/gsf-clip-data.c:269 +msgid "Windows Enhanced Metafile format" +msgstr "Format Windows Enhanced Metafile" + +#: ../gsf/gsf-msole-utils.c:315 +#, c-format +msgid "" +"Missing data when reading the %s property; got %s bytes, but %s bytes at " +"least are needed." +msgstr "" +"Données manquantes à la lecture de la propriété %s ; %s octets reçus, mais " +"il faut au moins %s octets." + +#: ../gsf/gsf-msole-utils.c:366 +#, c-format +msgid "" +"Corrupt data in the VT_CF property; clipboard data length must be at least 4 " +"bytes, but the data says it only has %s bytes available." +msgstr "" +"Données endommagées pour la propriété VT_CF ; la taille des données du " +"presse-papiers doit être de 4 octets minimum, mais les données indiquent que " +"seuls %s octets sont disponibles." + +#: ../gsf/gsf-open-pkg-utils.c:351 +#, c-format +msgid "Unable to find part id='%s' for '%s'" +msgstr "Impossible de trouver la partie id=« %s » pour « %s »" + +#: ../gsf/gsf-open-pkg-utils.c:379 +#, c-format +msgid "Unable to find part with type='%s' for '%s'" +msgstr "Impossible de trouver la partie type=« %s » pour « %s »" + +#: ../gsf/gsf-open-pkg-utils.c:409 +#, c-format +msgid "Missing id for part in '%s'" +msgstr "Identificateur manquant pour une partie dans « %s »" + +#: ../gsf/gsf-open-pkg-utils.c:418 +#, c-format +msgid "Part '%s' in '%s' from '%s' is corrupt!" +msgstr "La partie « %s » dans « %s » venant de « %s » est endommagée." + +#: ../tools/gsf.c:22 +msgid "Display program version" +msgstr "Affiche le numéro de version du programme" + +#: ../tools/gsf.c:44 +#, c-format +msgid "%s: Failed to open %s: %s\n" +msgstr "%s : échec à l'ouverture de %s : %s\n" + +#: ../tools/gsf.c:65 +#, c-format +msgid "%s: Failed to recognize %s as an archive\n" +msgstr "%s : %s n'a pas été reconnu en tant qu'archive\n" + +#: ../tools/gsf.c:102 +#, c-format +msgid "Available subcommands are...\n" +msgstr "Les sous-commandes disponibles sont ...\n" + +#: ../tools/gsf.c:103 +#, c-format +msgid "* cat output one or more files in archive\n" +msgstr "* cat affiche un ou plusieurs fichiers de l'archive\n" + +#: ../tools/gsf.c:104 +#, c-format +msgid "* dump dump one or more files in archive as hex\n" +msgstr "" +"* dump vidage hexadécimal d'un ou plusieurs fichiers de l'archive\n" + +#: ../tools/gsf.c:105 +#, c-format +msgid "* help list subcommands\n" +msgstr "* help affiche la liste des sous-commandes\n" + +#: ../tools/gsf.c:106 +#, c-format +msgid "* list list files in archive\n" +msgstr "* list liste les fichiers de l'archive\n" + +#: ../tools/gsf.c:107 +#, c-format +msgid "* listprops list document properties in archive\n" +msgstr "* listprops liste les propriétés des documents de l'archive\n" + +#: ../tools/gsf.c:108 +#, c-format +msgid "* props print specified document properties\n" +msgstr "* props affiche les propriétés de documents spécifiées\n" + +#: ../tools/gsf.c:291 +#, c-format +msgid "No property named %s\n" +msgstr "Pas de propriété nommée %s\n" + +#: ../tools/gsf.c:364 +msgid "SUBCOMMAND ARCHIVE..." +msgstr "SOUS-COMMANDE ARCHIVE..." + +#: ../tools/gsf.c:371 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"Lancez « %s --help » pour voir la liste complète des options disponibles en " +"ligne de commande.\n" + +#: ../tools/gsf.c:378 +#, c-format +msgid "gsf version %d.%d.%d\n" +msgstr "gsf version %d.%d.%d\n" + +#: ../tools/gsf.c:384 +#, c-format +msgid "Usage: %s %s\n" +msgstr "Utilisation : %s %s\n" + +#: ../tools/gsf.c:405 +#, c-format +msgid "Run '%s help' to see a list subcommands.\n" +msgstr "Lancez « %s help » pour voir la liste des sous-commandes.\n" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "" +"Boolean options available, true enables thumbnailing and false disables the " +"creation of new thumbnails" +msgstr "" +"Option booléenne : true (vrai) active la création de miniatures, false (faux) " +"désactive la création de nouvelles miniatures" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing for OpenOffice 1.x Calc spreadsheets" +msgstr "" +"Active la création de miniatures pour feuilles de calcul OpenOffice 1.x Calc" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing for OpenOffice 1.x Drawing templates" +msgstr "Active la création de miniatures pour modèles OpenOffice 1.x Drawing " + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing for OpenOffice 1.x Impress Presentation templates" +msgstr "" +"Active la création de miniatures pour modèles de présentations OpenOffice 1." +"x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Enable thumbnailing for OpenOffice 1.x Impress presentations" +msgstr "" +"Active la création de miniatures pour présentations OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Enable thumbnailing for OpenOffice 1.x Math documents" +msgstr "Active la création de miniatures pour documents OpenOffice 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Enable thumbnailing for OpenOffice 1.x Spreadsheet templates" +msgstr "" +"Active la création de miniatures pour modèles OpenOffice 1.x Spreadsheet" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Enable thumbnailing for OpenOffice 1.x Writer documents" +msgstr "Active la création de miniatures pour documents OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Enable thumbnailing for OpenOffice 1.x Writer global templates" +msgstr "" +"Active la création de miniatures pour modèles globaux OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Enable thumbnailing for OpenOffice 1.x Writer templates" +msgstr "Active la création de miniatures pour modèles OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:11 +msgid "Enable thumbnailing of Microsoft Excel 2007 spreadsheets" +msgstr "" +"Active la création de miniatures pour feuilles de calcul Microsoft Excel 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:12 +msgid "Enable thumbnailing of Microsoft Excel spreadsheets" +msgstr "" +"Active la création de miniatures pour feuilles de calcul Microsoft Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:13 +msgid "Enable thumbnailing of Microsoft PowerPoint 2007 presentations" +msgstr "" +"Active la création de miniatures pour présentations Microsoft PowerPoint " +"2007 " + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:14 +msgid "Enable thumbnailing of Microsoft PowerPoint presentations" +msgstr "" +"Active la création de miniatures pour présentations Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:15 +msgid "Enable thumbnailing of Microsoft Word 2007 documents" +msgstr "Active la création de miniatures pour documents Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:16 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "Active la création de miniatures pour documents Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:17 +msgid "Enable thumbnailing of OpenDocument charts" +msgstr "Active la création de miniatures pour graphiques OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:18 +msgid "Enable thumbnailing of OpenDocument drawing templates" +msgstr "Active la création de miniatures pour modèles de dessins OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:19 +msgid "Enable thumbnailing of OpenDocument drawings" +msgstr "Active la création de miniatures pour dessins OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:20 +msgid "Enable thumbnailing of OpenDocument formulas" +msgstr "Active la création de miniatures pour formules OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:21 +msgid "Enable thumbnailing of OpenDocument images" +msgstr "Active la création de miniatures pour images OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:22 +msgid "Enable thumbnailing of OpenDocument presentation templates" +msgstr "" +"Active la création de miniatures pour modèles de présentation OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:23 +msgid "Enable thumbnailing of OpenDocument presentations" +msgstr "Active la création de miniatures pour présentations OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:24 +msgid "Enable thumbnailing of OpenDocument spreadsheet templates" +msgstr "" +"Active la création de miniatures pour modèles de feuille de calcul " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:25 +msgid "Enable thumbnailing of OpenDocument spreadsheets" +msgstr "Active la création de miniatures pour feuilles de calcul OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:26 +msgid "Enable thumbnailing of OpenDocument wordprocessing document templates" +msgstr "" +"Active la création de miniatures pour modèles de document de traitement de " +"texte OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:27 +msgid "Enable thumbnailing of OpenDocument wordprocessing documents" +msgstr "" +"Active la création de miniatures pour documents de traitement de texte " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:28 +msgid "Enable thumbnailing of OpenDocument wordprocessing master documents" +msgstr "" +"Active la création de miniatures pour documents maîtres de traitement de " +"texte OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:29 +msgid "Thumbnail command for Microsoft Excel 2007 spreadsheets" +msgstr "" +"Commande de création de miniatures pour feuilles de calcul Microsoft Excel " +"2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:30 +msgid "Thumbnail command for Microsoft Excel spreadsheets" +msgstr "" +"Commande de création de miniatures pour feuilles de calcul Microsoft Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:31 +msgid "Thumbnail command for Microsoft PowerPoint 2007 presentations" +msgstr "" +"Commande de création de miniatures pour présentations Microsoft PowerPoint " +"2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:32 +msgid "Thumbnail command for Microsoft PowerPoint presentations" +msgstr "" +"Commande de création de miniatures pour présentations Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:33 +msgid "Thumbnail command for Microsoft Word 2007 documents" +msgstr "Commande de création de miniatures pour documents Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:34 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "Commande de création de miniatures pour documents Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:35 +msgid "Thumbnail command for OpenDocument charts" +msgstr "Commande de création de miniatures pour graphiques OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:36 +msgid "Thumbnail command for OpenDocument drawing templates" +msgstr "Commande de création de miniatures pour modèles de dessin OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:37 +msgid "Thumbnail command for OpenDocument drawings" +msgstr "Commande de création de miniatures pour dessins OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:38 +msgid "Thumbnail command for OpenDocument formulas" +msgstr "Commande de création de miniatures pour formules OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:39 +msgid "Thumbnail command for OpenDocument images" +msgstr "Commande de création de miniatures pour images OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:40 +msgid "Thumbnail command for OpenDocument presentation templates" +msgstr "" +"Commande de création de miniatures pour modèles de présentation OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:41 +msgid "Thumbnail command for OpenDocument presentations" +msgstr "Commande de création de miniatures pour présentations OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:42 +msgid "Thumbnail command for OpenDocument spreadsheet templates" +msgstr "" +"Commande de création de miniatures pour modèles de feuille de calcul " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:43 +msgid "Thumbnail command for OpenDocument spreadsheets" +msgstr "" +"Commande de création de miniatures pour feuilles de calcul OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:44 +msgid "Thumbnail command for OpenDocument wordprocessing document templates" +msgstr "" +"Commande de création de miniatures pour modèles de documents de traitement " +"de texte OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:45 +msgid "Thumbnail command for OpenDocument wordprocessing documents" +msgstr "" +"Commande de création de miniatures pour documents de traitement de texte " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:46 +msgid "Thumbnail command for OpenDocument wordprocessing master documents" +msgstr "" +"Commande de création de miniatures pour documents maîtres de traitement de " +"texte OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:47 +msgid "Thumbnail command for OpenOffice 1.x Calc spreadsheets" +msgstr "" +"Commande de création de miniatures pour feuilles de calcul OpenOffice 1.x " +"Calc" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:48 +msgid "Thumbnail command for OpenOffice 1.x Drawing templates" +msgstr "Commande de création de miniatures pour modèles OpenOffice 1.x Drawing" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:49 +msgid "Thumbnail command for OpenOffice 1.x Impress Presentation templates" +msgstr "" +"Commande de création de miniatures pour modèles OpenOffice 1.x Impress " +"Presentation" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:50 +msgid "Thumbnail command for OpenOffice 1.x Impress presentations" +msgstr "" +"Commande de création de miniatures pour présentations OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:51 +msgid "Thumbnail command for OpenOffice 1.x Math documents" +msgstr "Commande de création de miniatures pour documents OpenOffice 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:52 +msgid "Thumbnail command for OpenOffice 1.x Spreadsheet templates" +msgstr "" +"Commande de création de miniatures pour modèles OpenOffice 1.x Spreadsheet" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:53 +msgid "Thumbnail command for OpenOffice 1.x Writer documents" +msgstr "" +"Commande de création de miniatures pour documents OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:54 +msgid "Thumbnail command for OpenOffice 1.x Writer global templates" +msgstr "" +"Commande de création de miniatures pour modèles globaux OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:55 +msgid "Thumbnail command for OpenOffice 1.x Writer templates" +msgstr "Commande de création de miniatures pour modèles OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:56 +msgid "Valid command plus arguments for the Microsoft Excel 2007 spreadsheets." +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"feuilles de calcul Microsoft Excel 2007." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:57 +msgid "Valid command plus arguments for the Microsoft Excel spreadsheets." +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"feuilles de calcul Microsoft Excel." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:58 +msgid "" +"Valid command plus arguments for the Microsoft PowerPoint 2007 thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:59 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:60 +msgid "Valid command plus arguments for the Microsoft Word 2007 thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:61 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:62 +msgid "Valid command plus arguments for the OpenDocument chart thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"graphique OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:63 +msgid "" +"Valid command plus arguments for the OpenDocument drawing template " +"thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"modèles de dessin OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:64 +msgid "Valid command plus arguments for the OpenDocument drawing thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"dessins OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:65 +msgid "Valid command plus arguments for the OpenDocument formula thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"formules OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:66 +msgid "Valid command plus arguments for the OpenDocument image thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"images OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:67 +msgid "" +"Valid command plus arguments for the OpenDocument presentation template " +"thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"modèles de présentation OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:68 +msgid "" +"Valid command plus arguments for the OpenDocument presentation thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"présentations OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:69 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet template " +"thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"modèles de feuilles de calcul OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:70 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"feuilles de calcul OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:71 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"template thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"modèles de document de traitement de texte OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:72 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"document de traitement de texte OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:73 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing master " +"document thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"document maître de traitement de texte OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:74 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Drawing template " +"thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"modèles OpenOffice 1.x Drawing" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:75 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"OpenOffice 1.x Drawing" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:76 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"template thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"modèles de présentation OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:77 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"présentations OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:78 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"document OpenOffice 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:79 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer document " +"thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"document OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:80 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer global template " +"thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"modèle global OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:81 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer template " +"thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"modèles OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:82 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" +msgstr "" +"Commande valide avec ses paramètres pour la création de miniatures pour " +"feuilles de calcul OpenOffice 1.x" diff --git a/po/gl.po b/po/gl.po new file mode 100644 index 0000000..95b5061 --- /dev/null +++ b/po/gl.po @@ -0,0 +1,618 @@ +# Galician translation for libgsf +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the libgsf package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: libgsf\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-05-12 12:40+0200\n" +"PO-Revision-Date: 2011-04-13 06:35+0000\n" +"Last-Translator: Miguel Anxo Bouzada \n" +"Language-Team: Galician \n" +"Language: gl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../gsf/gsf-blob.c:111 +#, c-format +msgid "Not enough memory to copy %s bytes of data" +msgstr "Non hai memoria abondo para copiar %s bytes de datos" + +#: ../gsf/gsf-clip-data.c:153 +#, c-format +msgid "The clip_data is in %s, but it is smaller than at least %s bytes" +msgstr "O clip_data está en %s, mais é máis pequeno que, polo menos, %s bytes" + +#: ../gsf/gsf-clip-data.c:247 +#, c-format +msgid "" +"The clip_data is in Windows clipboard format, but it is smaller than the " +"required 4 bytes." +msgstr "" +"o clip_data está no formato de Windows, mais é máis pequenos dos 4 bytes " +"requiridos." + +#: ../gsf/gsf-clip-data.c:258 +msgid "Windows Metafile format" +msgstr "Formato de meta ficheiro de Windows" + +#. CF_BITMAP +#: ../gsf/gsf-clip-data.c:264 +msgid "Windows DIB or BITMAP format" +msgstr "Formato DIB ou BITMAP de Windows" + +#: ../gsf/gsf-clip-data.c:269 +msgid "Windows Enhanced Metafile format" +msgstr "Formato de meta ficheiro mellorado de Windows" + +#: ../gsf/gsf-msole-utils.c:315 +#, c-format +msgid "" +"Missing data when reading the %s property; got %s bytes, but %s bytes at " +"least are needed." +msgstr "" +"Faltan datos ao ler a propiedade %s; obtivéronse %s bytes mais necesítanse " +"polo menos %s bytes." + +#: ../gsf/gsf-msole-utils.c:366 +#, c-format +msgid "" +"Corrupt data in the VT_CF property; clipboard data length must be at least 4 " +"bytes, but the data says it only has %s bytes available." +msgstr "" +"Datos estragados na propiedade VT_CF; a lonxitude do portapapeis debe ser de " +"polo menos 4 bytes, mais os datos din que só ten %s bytes dispoñíbeis." + +#: ../gsf/gsf-open-pkg-utils.c:351 +#, c-format +msgid "Unable to find part id='%s' for '%s'" +msgstr "Non foi posíbel atopar a parte co ID=«%s» para «%s»" + +#: ../gsf/gsf-open-pkg-utils.c:379 +#, c-format +msgid "Unable to find part with type='%s' for '%s'" +msgstr "Non foi posíbel atopar a parte a co tipo=«%s» para «%s»" + +#: ../gsf/gsf-open-pkg-utils.c:409 +#, c-format +msgid "Missing id for part in '%s'" +msgstr "Falta un ID para unha parte en «%s»" + +#: ../gsf/gsf-open-pkg-utils.c:418 +#, c-format +msgid "Part '%s' in '%s' from '%s' is corrupt!" +msgstr "A parte «%s» en «%s» de «%s» está estragada." + +#: ../tools/gsf.c:22 +msgid "Display program version" +msgstr "Mostrar a versión do aplicativo" + +#: ../tools/gsf.c:44 +#, c-format +msgid "%s: Failed to open %s: %s\n" +msgstr "%s: non foi posíbel abrir %s: %s\n" + +#: ../tools/gsf.c:65 +#, c-format +msgid "%s: Failed to recognize %s as an archive\n" +msgstr "%s: non foi posíbel recoñecer %s como un arquivo\n" + +#: ../tools/gsf.c:102 +#, c-format +msgid "Available subcommands are...\n" +msgstr "As sub ordes dispoñíbeis son...\n" + +#: ../tools/gsf.c:103 +#, c-format +msgid "* cat output one or more files in archive\n" +msgstr "* cat mostra a saída dun ou máis ficheiros no arquivo\n" + +#: ../tools/gsf.c:104 +#, c-format +msgid "* dump dump one or more files in archive as hex\n" +msgstr "" +"* dump envorca un ou máis ficheiros nun arquivo como datos " +"hexadecimais\n" + +#: ../tools/gsf.c:105 +#, c-format +msgid "* help list subcommands\n" +msgstr "* help lista as sub ordes\n" + +#: ../tools/gsf.c:106 +#, c-format +msgid "* list list files in archive\n" +msgstr "* list lista os ficheiros no arquivo\n" + +#: ../tools/gsf.c:107 +#, c-format +msgid "* listprops list document properties in archive\n" +msgstr "* listprops lista as propiedades dos documentos no arquivo\n" + +#: ../tools/gsf.c:108 +#, c-format +msgid "* props print specified document properties\n" +msgstr "* props imprime as propiedades do documento especificado\n" + +#: ../tools/gsf.c:291 +#, c-format +msgid "No property named %s\n" +msgstr "Non existe a propiedade nomeada %s\n" + +#: ../tools/gsf.c:364 +msgid "SUBCOMMAND ARCHIVE..." +msgstr "SUB ORDE ARQUIVO..." + +#: ../tools/gsf.c:371 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"Execute «%s --help» para ver unha lista completa das opcións de liña de " +"ordes dispoñíbeis.\n" + +#: ../tools/gsf.c:378 +#, c-format +msgid "gsf version %d.%d.%d\n" +msgstr "Versión de gsf %d.%d.%d\n" + +#: ../tools/gsf.c:384 +#, c-format +msgid "Usage: %s %s\n" +msgstr "Uso: %s %s\n" + +#: ../tools/gsf.c:405 +#, c-format +msgid "Run '%s help' to see a list subcommands.\n" +msgstr "Execute «%s help» para ver unha lista das sub ordes\n" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "" +"Boolean options available, true enables thumbnailing and false disables the " +"creation of new thumbnails" +msgstr "" +"Opcións booleanas dispoñíbeis: «true» activa as miniaturas e «false» " +"desactiva a creación de novas miniaturas" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing for OpenOffice 1.x Calc spreadsheets" +msgstr "Activar miniaturas para follas de cálculo de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing for OpenOffice 1.x Drawing templates" +msgstr "Activar miniaturas para modelos de debuxos de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing for OpenOffice 1.x Impress Presentation templates" +msgstr "" +"Activar miniaturas para modelos de presentacións Impress de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Enable thumbnailing for OpenOffice 1.x Impress presentations" +msgstr "Activar miniaturas para presentacións Impress de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Enable thumbnailing for OpenOffice 1.x Math documents" +msgstr "" +"Activar miniaturas para documentos de matemáticas de Math de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Enable thumbnailing for OpenOffice 1.x Spreadsheet templates" +msgstr "Activar miniaturas para modelos de follas de cálculo de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Enable thumbnailing for OpenOffice 1.x Writer documents" +msgstr "" +"Activar miniaturas para documentos do procesador de textos de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Enable thumbnailing for OpenOffice 1.x Writer global templates" +msgstr "" +"Activar miniaturas para modelos globais do procesador de textos OpenOffice 1." +"x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Enable thumbnailing for OpenOffice 1.x Writer templates" +msgstr "" +"Activar miniaturas para modelos do procesador de textos de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:11 +msgid "Enable thumbnailing of Microsoft Excel 2007 spreadsheets" +msgstr "Activar miniaturas para follas de cálculo de Microsoft Excel 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:12 +msgid "Enable thumbnailing of Microsoft Excel spreadsheets" +msgstr "Activar miniaturas para follas de cálculo de Microsoft Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:13 +msgid "Enable thumbnailing of Microsoft PowerPoint 2007 presentations" +msgstr "Activar miniaturas para presentacións de Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:14 +msgid "Enable thumbnailing of Microsoft PowerPoint presentations" +msgstr "Activar miniaturas para presentacións de Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:15 +msgid "Enable thumbnailing of Microsoft Word 2007 documents" +msgstr "Activar miniaturas para documentos de Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:16 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "Activar miniaturas para documentos de Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:17 +msgid "Enable thumbnailing of OpenDocument charts" +msgstr "Activar miniaturas para gráficas de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:18 +msgid "Enable thumbnailing of OpenDocument drawing templates" +msgstr "Activar miniaturas para modelos de debuxo de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:19 +msgid "Enable thumbnailing of OpenDocument drawings" +msgstr "Activar miniaturas para debuxos de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:20 +msgid "Enable thumbnailing of OpenDocument formulas" +msgstr "Activar miniaturas para fórmulas de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:21 +msgid "Enable thumbnailing of OpenDocument images" +msgstr "Activar miniaturas para axes OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:22 +msgid "Enable thumbnailing of OpenDocument presentation templates" +msgstr "Activar miniaturas para modelos de presentacións de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:23 +msgid "Enable thumbnailing of OpenDocument presentations" +msgstr "Activar miniaturas para presentacións de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:24 +msgid "Enable thumbnailing of OpenDocument spreadsheet templates" +msgstr "Activar miniaturas para modelos de folla de cálculo de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:25 +msgid "Enable thumbnailing of OpenDocument spreadsheets" +msgstr "Activar miniaturas para follas de cálculo OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:26 +msgid "Enable thumbnailing of OpenDocument wordprocessing document templates" +msgstr "" +"Activar miniaturas para modelos de documentos do procesador de textos de " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:27 +msgid "Enable thumbnailing of OpenDocument wordprocessing documents" +msgstr "" +"Activar miniaturas para documentos do procesador de textos de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:28 +msgid "Enable thumbnailing of OpenDocument wordprocessing master documents" +msgstr "" +"Activar miniaturas para documentos mestre do procesador de textos de " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:29 +msgid "Thumbnail command for Microsoft Excel 2007 spreadsheets" +msgstr "" +"Orde para xerar miniaturas para documentos de follas de cálculo de Microsoft " +"Excel 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:30 +msgid "Thumbnail command for Microsoft Excel spreadsheets" +msgstr "" +"Orde para xerar miniaturas para documentos de follas de cálculo de Microsoft " +"Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:31 +msgid "Thumbnail command for Microsoft PowerPoint 2007 presentations" +msgstr "" +"Orde para xerar miniaturas para presentacións de Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:32 +msgid "Thumbnail command for Microsoft PowerPoint presentations" +msgstr "Orde para xerar miniaturas para presentacións de Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:33 +msgid "Thumbnail command for Microsoft Word 2007 documents" +msgstr "Orde para xerar miniaturas para documentos de Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:34 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "Orde para xerar miniaturas para documentos de Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:35 +msgid "Thumbnail command for OpenDocument charts" +msgstr "Orde para xerar miniaturas para gráficas de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:36 +msgid "Thumbnail command for OpenDocument drawing templates" +msgstr "Orde para xerar miniaturas para modelos de debuxo de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:37 +msgid "Thumbnail command for OpenDocument drawings" +msgstr "Orde para xerar miniaturas para debuxos de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:38 +msgid "Thumbnail command for OpenDocument formulas" +msgstr "Orde para xerar miniaturas para fórmulas de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:39 +msgid "Thumbnail command for OpenDocument images" +msgstr "Orde para xerar miniaturas para imaxes de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:40 +msgid "Thumbnail command for OpenDocument presentation templates" +msgstr "" +"Orde para xerar miniaturas para modelos de presentacións de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:41 +msgid "Thumbnail command for OpenDocument presentations" +msgstr "Orde para xerar miniaturas para presentacións de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:42 +msgid "Thumbnail command for OpenDocument spreadsheet templates" +msgstr "" +"Orde para xerar miniaturas para modelos de follas de cálculo de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:43 +msgid "Thumbnail command for OpenDocument spreadsheets" +msgstr "Orde para xerar miniaturas para follas de cálculo de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:44 +msgid "Thumbnail command for OpenDocument wordprocessing document templates" +msgstr "" +"Orde para xerar miniaturas para modelos de documentos de procesadores de " +"texto de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:45 +msgid "Thumbnail command for OpenDocument wordprocessing documents" +msgstr "" +"Orde para xerar miniaturas para documentos de procesadores de texto de " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:46 +msgid "Thumbnail command for OpenDocument wordprocessing master documents" +msgstr "" +"Orde para xerar miniaturas para documentos mestre de procesadores de texto " +"de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:47 +msgid "Thumbnail command for OpenOffice 1.x Calc spreadsheets" +msgstr "" +"Orde para xerar miniaturas para follas de cálculo de OpenOffice 1.x Calc" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:48 +msgid "Thumbnail command for OpenOffice 1.x Drawing templates" +msgstr "" +"Orde para xerar miniaturas para modelos de debuxos de Draw de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:49 +msgid "Thumbnail command for OpenOffice 1.x Impress Presentation templates" +msgstr "" +"Orde para xerar miniaturas para modelos de presentacións de Impress de " +"OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:50 +msgid "Thumbnail command for OpenOffice 1.x Impress presentations" +msgstr "" +"Orde para xerar miniaturas para presentacións de Impress de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:51 +msgid "Thumbnail command for OpenOffice 1.x Math documents" +msgstr "Orde para xerar miniaturas para documentos de Math de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:52 +msgid "Thumbnail command for OpenOffice 1.x Spreadsheet templates" +msgstr "" +"Orde para xerar miniaturas para modelos de follas de cálculo de OpenOffice 1." +"x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:53 +msgid "Thumbnail command for OpenOffice 1.x Writer documents" +msgstr "" +"Orde para xerar miniaturas para documentos do procesador de texto de " +"OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:54 +msgid "Thumbnail command for OpenOffice 1.x Writer global templates" +msgstr "" +"Orde para xerar miniaturas para modelos globais do procesador de texto de " +"OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:55 +msgid "Thumbnail command for OpenOffice 1.x Writer templates" +msgstr "" +"Orde para xerar miniaturas para modelos do procesador de texto de OpenOffice " +"1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:56 +msgid "Valid command plus arguments for the Microsoft Excel 2007 spreadsheets." +msgstr "" +"Orde válida e argumentos para follas de cálculo de Microsoft Excel 2007." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:57 +msgid "Valid command plus arguments for the Microsoft Excel spreadsheets." +msgstr "Orde válida e argumentos para follas de cálculo de Microsoft Excel." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:58 +msgid "" +"Valid command plus arguments for the Microsoft PowerPoint 2007 thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de Microsoft " +"PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:59 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de Microsoft PowerPo" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:60 +msgid "Valid command plus arguments for the Microsoft Word 2007 thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:61 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:62 +msgid "Valid command plus arguments for the OpenDocument chart thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de gráficos de " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:63 +msgid "" +"Valid command plus arguments for the OpenDocument drawing template " +"thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de modelos de debuxo " +"de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:64 +msgid "Valid command plus arguments for the OpenDocument drawing thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de debuxos de " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:65 +msgid "Valid command plus arguments for the OpenDocument formula thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de modelos de fórmulas " +"de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:66 +msgid "Valid command plus arguments for the OpenDocument image thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de imaxes de " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:67 +msgid "" +"Valid command plus arguments for the OpenDocument presentation template " +"thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de modelos de " +"presentacións de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:68 +msgid "" +"Valid command plus arguments for the OpenDocument presentation thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de presentacións de " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:69 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet template " +"thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de modelos de follas " +"de cálculo de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:70 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de follas de cálculo " +"de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:71 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"template thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de modelos de " +"documentos do procesador de textos de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:72 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de documentos do " +"procesador de textos de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:73 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing master " +"document thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de modelos de " +"documentos mestre do procesador de textos de OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:74 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Drawing template " +"thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de modelos de debuxos " +"de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:75 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de debuxos de " +"OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:76 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"template thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de modelos de " +"presentacións de Impress de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:77 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de presentacións de " +"Impress de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:78 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de modelos de " +"documentos de Math de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:79 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer document " +"thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de modelos de " +"documentos do procesador de textos de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:80 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer global template " +"thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de modelos globais do " +"procesador de textos de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:81 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer template " +"thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de modelos do " +"procesador de textos de OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:82 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" +msgstr "" +"Orde válida e argumentos para o xerador de miniaturas de follas de cálculo " +"de OpenOffice 1.x" diff --git a/po/it.po b/po/it.po new file mode 100644 index 0000000..3ab3078 --- /dev/null +++ b/po/it.po @@ -0,0 +1,570 @@ +# Italian translation for libgsf +# Copyright (c) (c) 2006 Canonical Ltd, and Rosetta Contributors 2006 +# Copyright (c) 2011 the libgsf package copyright holder +# This file is distributed under the same license as the libgsf package. +# Milo Casagrande , 2011. +msgid "" +msgstr "" +"Project-Id-Version: libgsf\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-05-17 14:22+0200\n" +"PO-Revision-Date: 2011-05-17 14:21+0200\n" +"Last-Translator: Milo Casagrande \n" +"Language-Team: Italian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-05-17 11:52+0000\n" +"X-Generator: Launchpad (build 13053)\n" + +#: ../gsf/gsf-blob.c:111 +#, c-format +msgid "Not enough memory to copy %s bytes of data" +msgstr "Memoria insufficiente per copiare %s byte di dati" + +#: ../gsf/gsf-clip-data.c:153 +#, c-format +msgid "The clip_data is in %s, but it is smaller than at least %s bytes" +msgstr "Il campo clip_data è in %s, ma è più piccolo di almeno %s byte" + +#: ../gsf/gsf-clip-data.c:247 +#, c-format +msgid "" +"The clip_data is in Windows clipboard format, but it is smaller than the " +"required 4 bytes." +msgstr "" +"Il campo clip_data è in formato clipboard di Windows, ma è più piccolo dei 4 " +"byte richiesti." + +#: ../gsf/gsf-clip-data.c:258 +msgid "Windows Metafile format" +msgstr "Formato Windows Metafile" + +#. CF_BITMAP +#: ../gsf/gsf-clip-data.c:264 +msgid "Windows DIB or BITMAP format" +msgstr "Formato Windows DIB o BITMAP" + +#: ../gsf/gsf-clip-data.c:269 +msgid "Windows Enhanced Metafile format" +msgstr "Formato Windows Enhanced Metafile" + +#: ../gsf/gsf-msole-utils.c:315 +#, c-format +msgid "" +"Missing data when reading the %s property; got %s bytes, but %s bytes at " +"least are needed." +msgstr "" +"Dati mancanti durante la lettura della proprietà %s; recuperati %s byte, ma " +"ne sono necessari almeno %s." + +#: ../gsf/gsf-msole-utils.c:366 +#, c-format +msgid "" +"Corrupt data in the VT_CF property; clipboard data length must be at least 4 " +"bytes, but the data says it only has %s bytes available." +msgstr "" +"Dati danneggiati nella proprietà VT_CF. La lunghezza dei dati negli appunti " +"deve essere almeno di 4 byte, ma sembra ci siano solo %s byte disponibili." + +#: ../gsf/gsf-open-pkg-utils.c:351 +#, c-format +msgid "Unable to find part id='%s' for '%s'" +msgstr "Impossibile trovare la parte con id=\"%s\" per \"%s\"" + +#: ../gsf/gsf-open-pkg-utils.c:379 +#, c-format +msgid "Unable to find part with type='%s' for '%s'" +msgstr "Impossibile trovare la parte con type=\"%s\" per \"%s\"" + +#: ../gsf/gsf-open-pkg-utils.c:409 +#, c-format +msgid "Missing id for part in '%s'" +msgstr "ID mancante per la parte \"%s\"" + +#: ../gsf/gsf-open-pkg-utils.c:418 +#, c-format +msgid "Part '%s' in '%s' from '%s' is corrupt!" +msgstr "La parte \"%s\" in \"%s\" da \"%s\" è danneggiata." + +#: ../tools/gsf.c:22 +msgid "Display program version" +msgstr "Visualizza la versione del programma" + +#: ../tools/gsf.c:44 +#, c-format +msgid "%s: Failed to open %s: %s\n" +msgstr "%s: apertura di %s non riuscita: %s\n" + +#: ../tools/gsf.c:65 +#, c-format +msgid "%s: Failed to recognize %s as an archive\n" +msgstr "%s: riconoscimento di %s come archivio non riuscito\n" + +#: ../tools/gsf.c:102 +#, c-format +msgid "Available subcommands are...\n" +msgstr "Sottocomandi disponibili...\n" + +#: ../tools/gsf.c:103 +#, c-format +msgid "* cat output one or more files in archive\n" +msgstr "* cat Stampa uno o più file nell'archivio\n" + +#: ../tools/gsf.c:104 +#, c-format +msgid "* dump dump one or more files in archive as hex\n" +msgstr "" +"* dump Esegue un dump esadecimale di uno o più file nell'archivio\n" + +#: ../tools/gsf.c:105 +#, c-format +msgid "* help list subcommands\n" +msgstr "* help Elenca i sottocomandi\n" + +#: ../tools/gsf.c:106 +#, c-format +msgid "* list list files in archive\n" +msgstr "* list Elenca i file nell'archivio\n" + +#: ../tools/gsf.c:107 +#, c-format +msgid "* listprops list document properties in archive\n" +msgstr "* listprops Elenca le proprietà del documento nell'archivio\n" + +#: ../tools/gsf.c:108 +#, c-format +msgid "* props print specified document properties\n" +msgstr "* props Stampa le proprietà specificate del documento\n" + +#: ../tools/gsf.c:291 +#, c-format +msgid "No property named %s\n" +msgstr "Nessuna proprietà chiamata %s\n" + +#: ../tools/gsf.c:364 +msgid "SUBCOMMAND ARCHIVE..." +msgstr "SOTTOCOMANDO ARCHIVIO..." + +#: ../tools/gsf.c:371 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"Eseguire \"%s --help\" per l'elenco completo delle opzioni a riga di " +"comando.\n" + +#: ../tools/gsf.c:378 +#, c-format +msgid "gsf version %d.%d.%d\n" +msgstr "gsf versione %d.%d.%d\n" + +#: ../tools/gsf.c:384 +#, c-format +msgid "Usage: %s %s\n" +msgstr "Uso: %s %s\n" + +#: ../tools/gsf.c:405 +#, c-format +msgid "Run '%s help' to see a list subcommands.\n" +msgstr "Eseguire \"%s help\" per l'elenco dei sottocomandi.\n" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "" +"Boolean options available, true enables thumbnailing and false disables the " +"creation of new thumbnails" +msgstr "" +"Opzioni booleane disponibili, \"true\" abilita la creazione delle miniature " +"e \"false\" disabilita la creazione di nuove miniature" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing for OpenOffice 1.x Calc spreadsheets" +msgstr "Abilita le miniature dei fogli di calcolo di OpenOffice 1.x Calc" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing for OpenOffice 1.x Drawing templates" +msgstr "Abilita le miniature dei modelli di OpenOffice 1.x Draw" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing for OpenOffice 1.x Impress Presentation templates" +msgstr "" +"Abilita le miniature dei modelli di presentazioni di OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Enable thumbnailing for OpenOffice 1.x Impress presentations" +msgstr "Abilita le miniature delle presentazioni di OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Enable thumbnailing for OpenOffice 1.x Math documents" +msgstr "Abilita le miniature dei documenti OpenOffice 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Enable thumbnailing for OpenOffice 1.x Spreadsheet templates" +msgstr "Abilita le miniature dei modelli di fogli di calcolo di OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Enable thumbnailing for OpenOffice 1.x Writer documents" +msgstr "Abilita le miniature dei documenti di OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Enable thumbnailing for OpenOffice 1.x Writer global templates" +msgstr "Abilita le miniature dei modelli globali di OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Enable thumbnailing for OpenOffice 1.x Writer templates" +msgstr "Abilita le miniature dei modelli di OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:11 +msgid "Enable thumbnailing of Microsoft Excel 2007 spreadsheets" +msgstr "Abilita le miniature dei fogli di calcolo di Microsoft Excel 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:12 +msgid "Enable thumbnailing of Microsoft Excel spreadsheets" +msgstr "Abilita le miniature dei fogli di calcolo di Microsoft Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:13 +msgid "Enable thumbnailing of Microsoft PowerPoint 2007 presentations" +msgstr "Abilita le miniature delle presentazioni di Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:14 +msgid "Enable thumbnailing of Microsoft PowerPoint presentations" +msgstr "Abilita le miniature delle presentazioni di Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:15 +msgid "Enable thumbnailing of Microsoft Word 2007 documents" +msgstr "Abilita le miniature dei documenti di Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:16 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "Abilita le miniature dei documenti di Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:17 +msgid "Enable thumbnailing of OpenDocument charts" +msgstr "Abilita le miniature dei grafici OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:18 +msgid "Enable thumbnailing of OpenDocument drawing templates" +msgstr "Abilita le miniature dei modelli di disegno OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:19 +msgid "Enable thumbnailing of OpenDocument drawings" +msgstr "Abilita le miniature dei disegni OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:20 +msgid "Enable thumbnailing of OpenDocument formulas" +msgstr "Abilita le miniature delle formule OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:21 +msgid "Enable thumbnailing of OpenDocument images" +msgstr "Abilita le miniature delle immagini OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:22 +msgid "Enable thumbnailing of OpenDocument presentation templates" +msgstr "Abilita le miniature dei modelli di presentazione OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:23 +msgid "Enable thumbnailing of OpenDocument presentations" +msgstr "Abilita le miniature delle presentazioni OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:24 +msgid "Enable thumbnailing of OpenDocument spreadsheet templates" +msgstr "Abilita le miniature dei modelli di fogli di calcolo OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:25 +msgid "Enable thumbnailing of OpenDocument spreadsheets" +msgstr "Abilita le miniature dei fogli di calcolo OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:26 +msgid "Enable thumbnailing of OpenDocument wordprocessing document templates" +msgstr "Abilita le miniature dei modelli di documenti di testo OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:27 +msgid "Enable thumbnailing of OpenDocument wordprocessing documents" +msgstr "Abilita le miniature dei documenti di testo OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:28 +msgid "Enable thumbnailing of OpenDocument wordprocessing master documents" +msgstr "Abilita le miniature dei documenti di testo mastro OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:29 +msgid "Thumbnail command for Microsoft Excel 2007 spreadsheets" +msgstr "Comando per le miniature dei fogli di calcolo Mircrosoft Excel 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:30 +msgid "Thumbnail command for Microsoft Excel spreadsheets" +msgstr "Comando per le miniature dei fogli di calcolo Microsoft Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:31 +msgid "Thumbnail command for Microsoft PowerPoint 2007 presentations" +msgstr "Comando per le miniature delle presentazioni Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:32 +msgid "Thumbnail command for Microsoft PowerPoint presentations" +msgstr "Comando per le miniature delle presentazione Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:33 +msgid "Thumbnail command for Microsoft Word 2007 documents" +msgstr "Comando per le miniature dei documenti Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:34 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "Comando per le miniature dei documenti Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:35 +msgid "Thumbnail command for OpenDocument charts" +msgstr "Comando per le miniature dei grafici OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:36 +msgid "Thumbnail command for OpenDocument drawing templates" +msgstr "Comando per le miniature dei modelli di disegno OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:37 +msgid "Thumbnail command for OpenDocument drawings" +msgstr "Comando per le miniature dei disegni OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:38 +msgid "Thumbnail command for OpenDocument formulas" +msgstr "Comando per le miniature delle formule OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:39 +msgid "Thumbnail command for OpenDocument images" +msgstr "Comando per le miniature delle immagini OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:40 +msgid "Thumbnail command for OpenDocument presentation templates" +msgstr "Comando per le miniature dei modelli di presentazioni OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:41 +msgid "Thumbnail command for OpenDocument presentations" +msgstr "Comando per le miniature delle presentazioni OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:42 +msgid "Thumbnail command for OpenDocument spreadsheet templates" +msgstr "Comando per le miniature dei modelli di fogli di calcolo OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:43 +msgid "Thumbnail command for OpenDocument spreadsheets" +msgstr "Comando per le miniature dei fogli di calcolo OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:44 +msgid "Thumbnail command for OpenDocument wordprocessing document templates" +msgstr "" +"Comando per le miniature dei modelli di documenti di testo OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:45 +msgid "Thumbnail command for OpenDocument wordprocessing documents" +msgstr "Comando per le miniature dei documenti di testo OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:46 +msgid "Thumbnail command for OpenDocument wordprocessing master documents" +msgstr "Comando per le miniature dei documenti di testo mastro OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:47 +msgid "Thumbnail command for OpenOffice 1.x Calc spreadsheets" +msgstr "Comando per le miniature dei fogli di calcolo di OpenOffice 1.x Calc" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:48 +msgid "Thumbnail command for OpenOffice 1.x Drawing templates" +msgstr "Comando per le miniature dei modelli di OpenOffice 1.x Draw" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:49 +msgid "Thumbnail command for OpenOffice 1.x Impress Presentation templates" +msgstr "" +"Comando per le miniature dei modelli delle presentazioni di OpenOffice 1.x " +"Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:50 +msgid "Thumbnail command for OpenOffice 1.x Impress presentations" +msgstr "Comando per le miniature delle presentazioni di OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:51 +msgid "Thumbnail command for OpenOffice 1.x Math documents" +msgstr "Comando per le miniature dei documenti OpenOffice 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:52 +msgid "Thumbnail command for OpenOffice 1.x Spreadsheet templates" +msgstr "" +"Comando per le miniature dei modelli di foglio di calcolo di OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:53 +msgid "Thumbnail command for OpenOffice 1.x Writer documents" +msgstr "Comando per le miniature dei documenti di OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:54 +msgid "Thumbnail command for OpenOffice 1.x Writer global templates" +msgstr "Comando per le miniature dei modelli globali di OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:55 +msgid "Thumbnail command for OpenOffice 1.x Writer templates" +msgstr "Comando per le miniature dei modelli di OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:56 +msgid "Valid command plus arguments for the Microsoft Excel 2007 spreadsheets." +msgstr "" +"Comando e argomenti validi per i fogli di calcolo di Microsoft Excel 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:57 +msgid "Valid command plus arguments for the Microsoft Excel spreadsheets." +msgstr "Comando e argomenti validi per i fogli di calcolo di Microsoft Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:58 +msgid "" +"Valid command plus arguments for the Microsoft PowerPoint 2007 thumbnailer" +msgstr "" +"Comando e argomenti validi per le miniature di Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:59 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" +msgstr "Comando e argomenti validi per le miniature di Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:60 +msgid "Valid command plus arguments for the Microsoft Word 2007 thumbnailer" +msgstr "Comando e argomenti validi per le miniature di Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:61 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer" +msgstr "Comando e argomenti validi per le miniature di Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:62 +msgid "Valid command plus arguments for the OpenDocument chart thumbnailer" +msgstr "Comando e argomenti validi per le miniature di grafici OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:63 +msgid "" +"Valid command plus arguments for the OpenDocument drawing template " +"thumbnailer" +msgstr "" +"Comando e argomenti validi per le miniature di modelli di disegno " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:64 +msgid "Valid command plus arguments for the OpenDocument drawing thumbnailer" +msgstr "Comando e argomenti validi per le miniature di disegni OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:65 +msgid "Valid command plus arguments for the OpenDocument formula thumbnailer" +msgstr "Comando e argomenti validi per le miniature di formule OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:66 +msgid "Valid command plus arguments for the OpenDocument image thumbnailer" +msgstr "Comando e argomenti validi per le miniature di immagini OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:67 +msgid "" +"Valid command plus arguments for the OpenDocument presentation template " +"thumbnailer" +msgstr "" +"Comando e argomenti validi per le miniature di modelli delle presentazioni " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:68 +msgid "" +"Valid command plus arguments for the OpenDocument presentation thumbnailer" +msgstr "" +"Comando e argomenti validi per le miniature di presentazioni OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:69 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet template " +"thumbnailer" +msgstr "" +"Comando e argomenti validi per le miniature di modelli dei fogli di calcolo " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:70 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" +msgstr "" +"Comando e argomenti validi per le miniature di fogli di calcolo OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:71 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"template thumbnailer" +msgstr "" +"Comando e argomenti validi per le miniature dei modelli di documenti di " +"testo OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:72 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"thumbnailer" +msgstr "" +"Comando e argomenti validi per le miniature di documenti di testo " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:73 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing master " +"document thumbnailer" +msgstr "" +"Comando e argomenti validi per le miniature di documenti di testo mastro " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:74 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Drawing template " +"thumbnailer" +msgstr "" +"Comando e argomenti validi per le miniature dei modelli di OpenOffice 1.x " +"Draw" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:75 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" +msgstr "Comando e argomenti validi per le miniature di OpenOffice 1.x Draw" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:76 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"template thumbnailer" +msgstr "" +"Comando e argomenti validi per le miniature di modelli delle presentazioni " +"di OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:77 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"thumbnailer" +msgstr "" +"Comando e argomenti validi per le miniature delle presentazioni di " +"OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:78 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" +msgstr "" +"Comando e argomenti validi per le miniature dei documenti di OpenOffice 1.x " +"Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:79 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer document " +"thumbnailer" +msgstr "" +"Comando e argomenti validi per le miniature dei documenti di OpenOffice 1.x " +"Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:80 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer global template " +"thumbnailer" +msgstr "" +"Comando e argomenti validi per le miniature dei modelli globali di " +"OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:81 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer template " +"thumbnailer" +msgstr "" +"Comando e argomenti validi per le miniature dei modelli di OpenOffice 1.x " +"Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:82 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" +msgstr "" +"Comando e argomenti validi per le miniature dei fogli di calcolo di " +"OpenOffice 1.x" diff --git a/po/nb.po b/po/nb.po new file mode 100644 index 0000000..a2b8488 --- /dev/null +++ b/po/nb.po @@ -0,0 +1,476 @@ +# Norwegian bokmål translation of libgsf. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Kjartan Maraas , 2008-2009. +# +msgid "" +msgstr "" +"Project-Id-Version: libgsf 2.23.x\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2008-06-08 20:00+0200\n" +"PO-Revision-Date: 2009-08-07 15:01+0200\n" +"Last-Translator: Kjartan Maraas \n" +"Language-Team: Norsk bokmål \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../gsf/gsf-blob.c:108 +msgid "Not enough memory to copy %" +msgstr "Ikke nok minne til å kopiere %" + +#: ../gsf/gsf-clip-data.c:150 +msgid "The clip_data is in %s, but it is smaller than at least %" +msgstr "" + +#: ../gsf/gsf-clip-data.c:237 +#, c-format +msgid "" +"The clip_data is in Windows clipboard format, but it is smaller than the " +"required 4 bytes." +msgstr "" + +#: ../gsf/gsf-clip-data.c:248 +msgid "Windows Metafile format" +msgstr "Windows Metafile-format" + +#. CF_BITMAP +#: ../gsf/gsf-clip-data.c:254 +msgid "Windows DIB or BITMAP format" +msgstr "Windows DIB- eller BITMAP-format" + +#: ../gsf/gsf-clip-data.c:259 +msgid "Windows Enhanced Metafile format" +msgstr "Windows Enhanced Metafile-format" + +#: ../gsf/gsf-msole-utils.c:311 +msgid "Missing data when reading the %s property; got %" +msgstr "Mangler data ved lesing av egenskap %s; fikk %" + +#: ../gsf/gsf-msole-utils.c:357 +msgid "" +"Corrupt data in the VT_CF property; clipboard data length must be at least 4 " +"bytes, but the data says it only has %" +msgstr "" + +#: ../gsf/gsf-open-pkg-utils.c:312 +#, c-format +msgid "Unable to find part id='%s' for '%s'" +msgstr "" + +#: ../gsf/gsf-open-pkg-utils.c:342 +#, c-format +msgid "Unable to find part with type='%s' for '%s'" +msgstr "" + +#: ../gsf/gsf-open-pkg-utils.c:372 +#, c-format +msgid "Missing id for part in '%s'" +msgstr "Mangler id for del i «%s»" + +#: ../gsf/gsf-open-pkg-utils.c:381 +#, c-format +msgid "Part '%s' in '%s' from '%s' is corrupt!" +msgstr "" + +#: ../tools/gsf.c:21 +msgid "Display program version" +msgstr "Vis versjon av programmet" + +#: ../tools/gsf.c:43 +#, c-format +msgid "%s: Failed to open %s: %s\n" +msgstr "%s: Klarte ikke å åpne %s: %s\n" + +#: ../tools/gsf.c:60 +#, c-format +msgid "%s: Failed to recognize %s as an archive\n" +msgstr "" + +#: ../tools/gsf.c:97 +#, c-format +msgid "Available subcommands are...\n" +msgstr "Tilgjengelige underkommandoer er...\n" + +#: ../tools/gsf.c:98 +#, c-format +msgid "* cat output one or more files in archive\n" +msgstr "" + +#: ../tools/gsf.c:99 +#, c-format +msgid "* dump dump one or more files in archive as hex\n" +msgstr "" + +#: ../tools/gsf.c:100 +#, c-format +msgid "* help list subcommands\n" +msgstr "" + +#: ../tools/gsf.c:101 +#, c-format +msgid "* list list files in archive\n" +msgstr "" + +#: ../tools/gsf.c:102 +#, c-format +msgid "* listprops list document properties in archive\n" +msgstr "" + +#: ../tools/gsf.c:103 +#, c-format +msgid "* props print specified document properties\n" +msgstr "" + +#: ../tools/gsf.c:283 +#, c-format +msgid "No property named %s\n" +msgstr "Ingen egenskap med navn %s\n" + +#: ../tools/gsf.c:356 +msgid "SUBCOMMAND ARCHIVE..." +msgstr "" + +#: ../tools/gsf.c:363 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" + +#: ../tools/gsf.c:370 +#, c-format +msgid "gsf version %d.%d.%d\n" +msgstr "" + +#: ../tools/gsf.c:376 +#, c-format +msgid "Usage: %s %s\n" +msgstr "Bruk: %s %s\n" + +#: ../tools/gsf.c:397 +#, c-format +msgid "Run '%s help' to see a list subcommands.\n" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "" +"Boolean options available, true enables thumbnailing and false disables the " +"creation of new thumbnails" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing for OpenOffice 1.x Calc spreadsheets" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing for OpenOffice 1.x Drawing templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing for OpenOffice 1.x Impress Presentation templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Enable thumbnailing for OpenOffice 1.x Impress presentations" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Enable thumbnailing for OpenOffice 1.x Math documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Enable thumbnailing for OpenOffice 1.x Spreadsheet templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Enable thumbnailing for OpenOffice 1.x Writer documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Enable thumbnailing for OpenOffice 1.x Writer global templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Enable thumbnailing for OpenOffice 1.x Writer templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:11 +msgid "Enable thumbnailing of Microsoft Excel spreadsheets" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:12 +msgid "Enable thumbnailing of Microsoft PowerPoint presentations" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:13 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:14 +msgid "Enable thumbnailing of OpenDocument charts" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:15 +msgid "Enable thumbnailing of OpenDocument drawing templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:16 +msgid "Enable thumbnailing of OpenDocument drawings" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:17 +msgid "Enable thumbnailing of OpenDocument formulas" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:18 +msgid "Enable thumbnailing of OpenDocument images" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:19 +msgid "Enable thumbnailing of OpenDocument presentation templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:20 +msgid "Enable thumbnailing of OpenDocument presentations" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:21 +msgid "Enable thumbnailing of OpenDocument spreadsheet templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:22 +msgid "Enable thumbnailing of OpenDocument spreadsheets" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:23 +msgid "Enable thumbnailing of OpenDocument wordprocessing document templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:24 +msgid "Enable thumbnailing of OpenDocument wordprocessing documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:25 +msgid "Enable thumbnailing of OpenDocument wordprocessing master documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:26 +msgid "Thumbnail command for Microsoft Excel spreadsheets" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:27 +msgid "Thumbnail command for Microsoft PowerPoint presentations" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:28 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:29 +msgid "Thumbnail command for OpenDocument charts" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:30 +msgid "Thumbnail command for OpenDocument drawing templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:31 +msgid "Thumbnail command for OpenDocument drawings" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:32 +msgid "Thumbnail command for OpenDocument formulas" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:33 +msgid "Thumbnail command for OpenDocument images" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:34 +msgid "Thumbnail command for OpenDocument presentation templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:35 +msgid "Thumbnail command for OpenDocument presentations" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:36 +msgid "Thumbnail command for OpenDocument spreadsheet templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:37 +msgid "Thumbnail command for OpenDocument spreadsheets" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:38 +msgid "Thumbnail command for OpenDocument wordprocessing document templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:39 +msgid "Thumbnail command for OpenDocument wordprocessing documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:40 +msgid "Thumbnail command for OpenDocument wordprocessing master documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:41 +msgid "Thumbnail command for OpenOffice 1.x Calc spreadsheets" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:42 +msgid "Thumbnail command for OpenOffice 1.x Drawing templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:43 +msgid "Thumbnail command for OpenOffice 1.x Impress Presentation templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:44 +msgid "Thumbnail command for OpenOffice 1.x Impress presentations" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:45 +msgid "Thumbnail command for OpenOffice 1.x Math documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:46 +msgid "Thumbnail command for OpenOffice 1.x Spreadsheet templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:47 +msgid "Thumbnail command for OpenOffice 1.x Writer documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:48 +msgid "Thumbnail command for OpenOffice 1.x Writer global templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:49 +msgid "Thumbnail command for OpenOffice 1.x Writer templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:50 +msgid "Valid command plus arguments for the Microsoft Excel spreadsheets." +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:51 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:52 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:53 +msgid "Valid command plus arguments for the OpenDocument chart thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:54 +msgid "" +"Valid command plus arguments for the OpenDocument drawing template " +"thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:55 +msgid "Valid command plus arguments for the OpenDocument drawing thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:56 +msgid "Valid command plus arguments for the OpenDocument formula thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:57 +msgid "Valid command plus arguments for the OpenDocument image thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:58 +msgid "" +"Valid command plus arguments for the OpenDocument presentation template " +"thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:59 +msgid "" +"Valid command plus arguments for the OpenDocument presentation thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:60 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet template " +"thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:61 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:62 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"template thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:63 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:64 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing master " +"document thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:65 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Drawing template " +"thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:66 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:67 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"template thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:68 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:69 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:70 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer document " +"thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:71 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer global template " +"thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:72 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer template " +"thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:73 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" +msgstr "" diff --git a/po/oc.po b/po/oc.po new file mode 100644 index 0000000..8dd8b10 --- /dev/null +++ b/po/oc.po @@ -0,0 +1,61 @@ +# Occitan translation of libgsf. +# Copyright (C) 2007 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Yannig MARCHEGAY (yannig@marchegay.org) - 2006-2007 +# +msgid "" +msgstr "" +"Project-Id-Version: libgsf\n" +"Report-Msgid-Bugs-To: federico@novell.com\n" +"POT-Creation-Date: 2005-07-19 12:55-0500\n" +"PO-Revision-Date: 2007-07-29 14:34+0200\n" +"Last-Translator: Yannig MARCHEGAY (Kokoyaya) \n" +"Language-Team: Occitan (post 1500) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "" +"Boolean options available, true enables thumbnailing and false disables the " +"creation of new thumbnails" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing of Microsoft Excel documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing of Microsoft PowerPoint documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Thumbnail command for Microsoft Excel documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Thumbnail command for Microsoft PowerPoint documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Valid command plus arguments for the Microsoft Excel thumbnailer." +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer." +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer." +msgstr "" + diff --git a/po/pa.po b/po/pa.po new file mode 100644 index 0000000..5a591df --- /dev/null +++ b/po/pa.po @@ -0,0 +1,525 @@ +# Punjabi translation for libgsf. +# Copyright (C) 2010 libgsf's COPYRIGHT HOLDER +# This file is distributed under the same license as the libgsf package. +# +# A S Alam , 2010. +msgid "" +msgstr "" +"Project-Id-Version: libgsf master\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug." +"cgi?product=libgsf&component=General\n" +"POT-Creation-Date: 2010-01-01 09:34+0000\n" +"PO-Revision-Date: 2010-01-24 08:58+0530\n" +"Last-Translator: A S Alam \n" +"Language-Team: ਪੰਜਾਬੀ \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.0\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#: ../gsf/gsf-blob.c:111 +#, c-format +msgid "Not enough memory to copy %s bytes of data" +msgstr "" + +#: ../gsf/gsf-clip-data.c:153 +#, c-format +msgid "The clip_data is in %s, but it is smaller than at least %s bytes" +msgstr "" + +#: ../gsf/gsf-clip-data.c:247 +#, c-format +msgid "" +"The clip_data is in Windows clipboard format, but it is smaller than the " +"required 4 bytes." +msgstr "" + +#: ../gsf/gsf-clip-data.c:258 +msgid "Windows Metafile format" +msgstr "ਵਿੰਡੋਜ਼ ਮੇਟਾਫਾਇਲ ਫਾਰਮੈਟ" + +#. CF_BITMAP +#: ../gsf/gsf-clip-data.c:264 +msgid "Windows DIB or BITMAP format" +msgstr "" + +#: ../gsf/gsf-clip-data.c:269 +msgid "Windows Enhanced Metafile format" +msgstr "" + +#: ../gsf/gsf-msole-utils.c:315 +#, c-format +msgid "" +"Missing data when reading the %s property; got %s bytes, but %s bytes at " +"least are needed." +msgstr "" + +#: ../gsf/gsf-msole-utils.c:366 +#, c-format +msgid "" +"Corrupt data in the VT_CF property; clipboard data length must be at least 4 " +"bytes, but the data says it only has %s bytes available." +msgstr "" + +#: ../gsf/gsf-open-pkg-utils.c:351 +#, c-format +msgid "Unable to find part id='%s' for '%s'" +msgstr "" + +#: ../gsf/gsf-open-pkg-utils.c:379 +#, c-format +msgid "Unable to find part with type='%s' for '%s'" +msgstr "" + +#: ../gsf/gsf-open-pkg-utils.c:409 +#, c-format +msgid "Missing id for part in '%s'" +msgstr "" + +#: ../gsf/gsf-open-pkg-utils.c:418 +#, c-format +msgid "Part '%s' in '%s' from '%s' is corrupt!" +msgstr "" + +#: ../tools/gsf.c:22 +msgid "Display program version" +msgstr "" + +#: ../tools/gsf.c:44 +#, c-format +msgid "%s: Failed to open %s: %s\n" +msgstr "" + +#: ../tools/gsf.c:65 +#, c-format +msgid "%s: Failed to recognize %s as an archive\n" +msgstr "" + +#: ../tools/gsf.c:102 +#, c-format +msgid "Available subcommands are...\n" +msgstr "ਉਪਲੱਬਧ ਸਬ-ਕਮਾਂਡਾਂ ਹਨ...\n" + +#: ../tools/gsf.c:103 +#, c-format +msgid "* cat output one or more files in archive\n" +msgstr "* cat output one or more files in archive\n" + +#: ../tools/gsf.c:104 +#, c-format +msgid "* dump dump one or more files in archive as hex\n" +msgstr "* dump dump one or more files in archive as hex\n" + +#: ../tools/gsf.c:105 +#, c-format +msgid "* help list subcommands\n" +msgstr "* help list subcommands\n" + +#: ../tools/gsf.c:106 +#, c-format +msgid "* list list files in archive\n" +msgstr "* list list files in archive\n" + +#: ../tools/gsf.c:107 +#, c-format +msgid "* listprops list document properties in archive\n" +msgstr "* listprops list document properties in archive\n" + +#: ../tools/gsf.c:108 +#, c-format +msgid "* props print specified document properties\n" +msgstr "* props print specified document properties\n" + +#: ../tools/gsf.c:291 +#, c-format +msgid "No property named %s\n" +msgstr "ਕੋਈ ਵਿਸ਼ੇਸ਼ਤਾ ਨਾਂ %s ਨਹੀਂ\n" + +#: ../tools/gsf.c:364 +msgid "SUBCOMMAND ARCHIVE..." +msgstr "SUBCOMMAND ARCHIVE..." + +#: ../tools/gsf.c:371 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" + +#: ../tools/gsf.c:378 +#, c-format +msgid "gsf version %d.%d.%d\n" +msgstr "gsf version %d.%d.%d\n" + +#: ../tools/gsf.c:384 +#, c-format +msgid "Usage: %s %s\n" +msgstr "ਵਰਤੋਂ: %s %s\n" + +#: ../tools/gsf.c:405 +#, c-format +msgid "Run '%s help' to see a list subcommands.\n" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "" +"Boolean options available, true enables thumbnailing and false disables the " +"creation of new thumbnails" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing for OpenOffice 1.x Calc spreadsheets" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing for OpenOffice 1.x Drawing templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing for OpenOffice 1.x Impress Presentation templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Enable thumbnailing for OpenOffice 1.x Impress presentations" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Enable thumbnailing for OpenOffice 1.x Math documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Enable thumbnailing for OpenOffice 1.x Spreadsheet templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Enable thumbnailing for OpenOffice 1.x Writer documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Enable thumbnailing for OpenOffice 1.x Writer global templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Enable thumbnailing for OpenOffice 1.x Writer templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:11 +msgid "Enable thumbnailing of Microsoft Excel 2007 spreadsheets" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:12 +msgid "Enable thumbnailing of Microsoft Excel spreadsheets" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:13 +msgid "Enable thumbnailing of Microsoft PowerPoint 2007 presentations" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:14 +msgid "Enable thumbnailing of Microsoft PowerPoint presentations" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:15 +msgid "Enable thumbnailing of Microsoft Word 2007 documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:16 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:17 +msgid "Enable thumbnailing of OpenDocument charts" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:18 +msgid "Enable thumbnailing of OpenDocument drawing templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:19 +msgid "Enable thumbnailing of OpenDocument drawings" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:20 +msgid "Enable thumbnailing of OpenDocument formulas" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:21 +msgid "Enable thumbnailing of OpenDocument images" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:22 +msgid "Enable thumbnailing of OpenDocument presentation templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:23 +msgid "Enable thumbnailing of OpenDocument presentations" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:24 +msgid "Enable thumbnailing of OpenDocument spreadsheet templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:25 +msgid "Enable thumbnailing of OpenDocument spreadsheets" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:26 +msgid "Enable thumbnailing of OpenDocument wordprocessing document templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:27 +msgid "Enable thumbnailing of OpenDocument wordprocessing documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:28 +msgid "Enable thumbnailing of OpenDocument wordprocessing master documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:29 +msgid "Thumbnail command for Microsoft Excel 2007 spreadsheets" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:30 +msgid "Thumbnail command for Microsoft Excel spreadsheets" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:31 +msgid "Thumbnail command for Microsoft PowerPoint 2007 presentations" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:32 +msgid "Thumbnail command for Microsoft PowerPoint presentations" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:33 +msgid "Thumbnail command for Microsoft Word 2007 documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:34 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:35 +msgid "Thumbnail command for OpenDocument charts" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:36 +msgid "Thumbnail command for OpenDocument drawing templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:37 +msgid "Thumbnail command for OpenDocument drawings" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:38 +msgid "Thumbnail command for OpenDocument formulas" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:39 +msgid "Thumbnail command for OpenDocument images" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:40 +msgid "Thumbnail command for OpenDocument presentation templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:41 +msgid "Thumbnail command for OpenDocument presentations" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:42 +msgid "Thumbnail command for OpenDocument spreadsheet templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:43 +msgid "Thumbnail command for OpenDocument spreadsheets" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:44 +msgid "Thumbnail command for OpenDocument wordprocessing document templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:45 +msgid "Thumbnail command for OpenDocument wordprocessing documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:46 +msgid "Thumbnail command for OpenDocument wordprocessing master documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:47 +msgid "Thumbnail command for OpenOffice 1.x Calc spreadsheets" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:48 +msgid "Thumbnail command for OpenOffice 1.x Drawing templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:49 +msgid "Thumbnail command for OpenOffice 1.x Impress Presentation templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:50 +msgid "Thumbnail command for OpenOffice 1.x Impress presentations" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:51 +msgid "Thumbnail command for OpenOffice 1.x Math documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:52 +msgid "Thumbnail command for OpenOffice 1.x Spreadsheet templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:53 +msgid "Thumbnail command for OpenOffice 1.x Writer documents" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:54 +msgid "Thumbnail command for OpenOffice 1.x Writer global templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:55 +msgid "Thumbnail command for OpenOffice 1.x Writer templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:56 +msgid "Valid command plus arguments for the Microsoft Excel 2007 spreadsheets." +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:57 +msgid "Valid command plus arguments for the Microsoft Excel spreadsheets." +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:58 +msgid "" +"Valid command plus arguments for the Microsoft PowerPoint 2007 thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:59 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:60 +msgid "Valid command plus arguments for the Microsoft Word 2007 thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:61 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:62 +msgid "Valid command plus arguments for the OpenDocument chart thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:63 +msgid "" +"Valid command plus arguments for the OpenDocument drawing template " +"thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:64 +msgid "Valid command plus arguments for the OpenDocument drawing thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:65 +msgid "Valid command plus arguments for the OpenDocument formula thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:66 +msgid "Valid command plus arguments for the OpenDocument image thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:67 +msgid "" +"Valid command plus arguments for the OpenDocument presentation template " +"thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:68 +msgid "" +"Valid command plus arguments for the OpenDocument presentation thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:69 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet template " +"thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:70 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:71 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"template thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:72 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:73 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing master " +"document thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:74 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Drawing template " +"thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:75 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:76 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"template thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:77 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:78 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:79 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer document " +"thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:80 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer global template " +"thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:81 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer template " +"thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:82 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" +msgstr "" + diff --git a/po/pl.po b/po/pl.po new file mode 100644 index 0000000..10d15d0 --- /dev/null +++ b/po/pl.po @@ -0,0 +1,648 @@ +# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +# Aviary.pl +# Jeśli masz jakiekolwiek uwagi odnoszące się do tłumaczenia lub chcesz +# pomóc w jego rozwijaniu i pielęgnowaniu, napisz do nas: +# gnomepl@aviary.pl +# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +msgid "" +msgstr "" +"Project-Id-Version: libgsf\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-03-09 11:50+0100\n" +"PO-Revision-Date: 2010-03-07 14:17+0100\n" +"Last-Translator: Piotr Drąg \n" +"Language-Team: Polish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" +"X-Poedit-Language: Polish\n" +"X-Poedit-Country: Poland\n" + +#: ../gsf/gsf-blob.c:111 +#, c-format +msgid "Not enough memory to copy %s bytes of data" +msgstr "Brak wystarczającej ilości pamięci do skopiowania %s bajtów danych" + +#: ../gsf/gsf-clip-data.c:153 +#, c-format +msgid "The clip_data is in %s, but it is smaller than at least %s bytes" +msgstr "" +"clip_data znajduje się w %s, ale jest mniejsze niż co najmniej %s bajtów" + +#: ../gsf/gsf-clip-data.c:247 +#, c-format +msgid "" +"The clip_data is in Windows clipboard format, but it is smaller than the " +"required 4 bytes." +msgstr "" +"clip_data jest w formacie schowka systemu Windows, ale jest mniejsze niż " +"wymagane 4 bajty." + +#: ../gsf/gsf-clip-data.c:258 +msgid "Windows Metafile format" +msgstr "Format metapliku systemu Windows" + +#. CF_BITMAP +#: ../gsf/gsf-clip-data.c:264 +msgid "Windows DIB or BITMAP format" +msgstr "Format DIB lub BITMAP systemu Windows" + +#: ../gsf/gsf-clip-data.c:269 +msgid "Windows Enhanced Metafile format" +msgstr "Ulepszony format metapliku systemu Windows" + +#: ../gsf/gsf-msole-utils.c:315 +#, c-format +msgid "" +"Missing data when reading the %s property; got %s bytes, but %s bytes at " +"least are needed." +msgstr "" +"Brakujące dane podczas odczytywania własności %s. Otrzymano %s bajtów, ale " +"wymagane jest co najmniej %s bajtów." + +#: ../gsf/gsf-msole-utils.c:366 +#, c-format +msgid "" +"Corrupt data in the VT_CF property; clipboard data length must be at least 4 " +"bytes, but the data says it only has %s bytes available." +msgstr "" +"Uszkodzone dane we właściwości VT_CF. Długość danych schowka musi wynosić co " +"najmniej 4 bajty, ale dane mają dostępne tylko %s bajty." + +#: ../gsf/gsf-open-pkg-utils.c:351 +#, c-format +msgid "Unable to find part id='%s' for '%s'" +msgstr "Nie można odnaleźć części id=\"%s\" dla \"%s\"" + +#: ../gsf/gsf-open-pkg-utils.c:379 +#, c-format +msgid "Unable to find part with type='%s' for '%s'" +msgstr "Nie można odnaleźć części z type=\"%s\" for \"%s\"" + +#: ../gsf/gsf-open-pkg-utils.c:409 +#, c-format +msgid "Missing id for part in '%s'" +msgstr "Brakująca wartość id dla części w \"%s\"" + +#: ../gsf/gsf-open-pkg-utils.c:418 +#, c-format +msgid "Part '%s' in '%s' from '%s' is corrupt!" +msgstr "Część \"%s\" w \"%s\" z \"%s\" jest uszkodzona." + +#: ../tools/gsf.c:22 +msgid "Display program version" +msgstr "Wyświetla wersję programu" + +#: ../tools/gsf.c:44 +#, c-format +msgid "%s: Failed to open %s: %s\n" +msgstr "%s: otwarcie %s się nie powiodło: %s\n" + +#: ../tools/gsf.c:65 +#, c-format +msgid "%s: Failed to recognize %s as an archive\n" +msgstr "%s rozpoznanie %s jako archiwum się nie powiodło\n" + +#: ../tools/gsf.c:102 +#, c-format +msgid "Available subcommands are...\n" +msgstr "Dostępne podpolecenia to...\n" + +#: ../tools/gsf.c:103 +#, c-format +msgid "* cat output one or more files in archive\n" +msgstr "* cat wyświetla jeden lub więcej plików w archiwum\n" + +#: ../tools/gsf.c:104 +#, c-format +msgid "* dump dump one or more files in archive as hex\n" +msgstr "" +"* dump zrzuca jeden lub więcej plików w archiwum w postaci " +"szesnastkowej\n" + +#: ../tools/gsf.c:105 +#, c-format +msgid "* help list subcommands\n" +msgstr "* help wyświetla listę podpoleceń\n" + +#: ../tools/gsf.c:106 +#, c-format +msgid "* list list files in archive\n" +msgstr "* list wyświetla listę plików w archiwum\n" + +#: ../tools/gsf.c:107 +#, c-format +msgid "* listprops list document properties in archive\n" +msgstr "* listprops wyświetla listę właściwości dokumentu w archiwum\n" + +#: ../tools/gsf.c:108 +#, c-format +msgid "* props print specified document properties\n" +msgstr "* props wyświetla podane właściwości dokumentu\n" + +#: ../tools/gsf.c:291 +#, c-format +msgid "No property named %s\n" +msgstr "Brak właściwości o nazwie %s\n" + +#: ../tools/gsf.c:364 +msgid "SUBCOMMAND ARCHIVE..." +msgstr "PODPOLECENIE ARCHIWUM..." + +#: ../tools/gsf.c:371 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"Polecenie \"%s --help\" wyświetli listę wszystkich dostępnych opcji wiersza " +"poleceń.\n" + +#: ../tools/gsf.c:378 +#, c-format +msgid "gsf version %d.%d.%d\n" +msgstr "gsf wersja %d.%d.%d\n" + +#: ../tools/gsf.c:384 +#, c-format +msgid "Usage: %s %s\n" +msgstr "Użycie: %s %s\n" + +#: ../tools/gsf.c:405 +#, c-format +msgid "Run '%s help' to see a list subcommands.\n" +msgstr "Polecenie \"%s help\" wyświetli listę podpoleceń.\n" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "" +"Boolean options available, true enables thumbnailing and false disables the " +"creation of new thumbnails" +msgstr "" +"Opcje logiczne są dostępne, \"true\" włącza tworzenie miniatur, a \"false\" " +"wyłącza" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing for OpenOffice 1.x Calc spreadsheets" +msgstr "" +"Włączenie tworzenia miniatur dla arkuszy kalkulacyjnych programu OpenOffice." +"org 1.x Calc" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing for OpenOffice 1.x Drawing templates" +msgstr "" +"Włączenie tworzenia miniatur dla szablonów rysunków programu OpenOffice.org " +"1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing for OpenOffice 1.x Impress Presentation templates" +msgstr "" +"Włączenie tworzenia miniatur dla szablonów prezentacji programu OpenOffice." +"org 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Enable thumbnailing for OpenOffice 1.x Impress presentations" +msgstr "" +"Włączenie tworzenia miniatur dla prezentacji programu OpenOffice.org 1.x " +"Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Enable thumbnailing for OpenOffice 1.x Math documents" +msgstr "" +"Włączenie tworzenia miniatur dla dokumentów programu OpenOffice.org 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Enable thumbnailing for OpenOffice 1.x Spreadsheet templates" +msgstr "" +"Włączenie tworzenia miniatur dla szablonów arkuszy kalkulacyjnych programu " +"OpenOffice.org 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Enable thumbnailing for OpenOffice 1.x Writer documents" +msgstr "" +"Włączenie tworzenia miniatur dla dokumentów programu OpenOffice.org 1.x " +"Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Enable thumbnailing for OpenOffice 1.x Writer global templates" +msgstr "" +"Włączenie tworzenia miniatur dla globalnych szablonów programu OpenOffice." +"org 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Enable thumbnailing for OpenOffice 1.x Writer templates" +msgstr "" +"Włączenie tworzenia miniatur dla szablonów programu OpenOffice.org 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:11 +msgid "Enable thumbnailing of Microsoft Excel 2007 spreadsheets" +msgstr "" +"Włączenie tworzenia miniatur dla arkuszy kalkulacyjnych programu Microsoft " +"Excel 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:12 +msgid "Enable thumbnailing of Microsoft Excel spreadsheets" +msgstr "" +"Włączenie tworzenia miniatur dla arkuszy kalkulacyjnych programu Microsoft " +"Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:13 +msgid "Enable thumbnailing of Microsoft PowerPoint 2007 presentations" +msgstr "" +"Włączenie tworzenia miniatur dla prezentacji programu Microsoft PowerPoint " +"2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:14 +msgid "Enable thumbnailing of Microsoft PowerPoint presentations" +msgstr "" +"Włączenie tworzenia miniatur dla prezentacji programu Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:15 +msgid "Enable thumbnailing of Microsoft Word 2007 documents" +msgstr "" +"Włączenie tworzenia miniatur dla dokumentów programu Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:16 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "Włączenie tworzenia miniatur dla dokumentów programu Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:17 +msgid "Enable thumbnailing of OpenDocument charts" +msgstr "Włączenie tworzenia miniatur dla wykresów OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:18 +msgid "Enable thumbnailing of OpenDocument drawing templates" +msgstr "Włączenie tworzenia miniatur dla szablonów rysunków OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:19 +msgid "Enable thumbnailing of OpenDocument drawings" +msgstr "Włączenie tworzenia miniatur dla rysunków OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:20 +msgid "Enable thumbnailing of OpenDocument formulas" +msgstr "Włączenie tworzenia miniatur dla formuł OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:21 +msgid "Enable thumbnailing of OpenDocument images" +msgstr "Włączenie tworzenia miniatur dla obrazów OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:22 +msgid "Enable thumbnailing of OpenDocument presentation templates" +msgstr "Włączenie tworzenia miniatur dla szablonów prezentacji OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:23 +msgid "Enable thumbnailing of OpenDocument presentations" +msgstr "Włączenie tworzenia miniatur dla prezentacji OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:24 +msgid "Enable thumbnailing of OpenDocument spreadsheet templates" +msgstr "" +"Włączenie tworzenia miniatur dla szablonów arkuszy kalkulacyjnych " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:25 +msgid "Enable thumbnailing of OpenDocument spreadsheets" +msgstr "Włączenie tworzenia miniatur dla arkuszy kalkulacyjnych OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:26 +msgid "Enable thumbnailing of OpenDocument wordprocessing document templates" +msgstr "" +"Włączenie tworzenia miniatur dla szablonów dokumentów tekstowych OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:27 +msgid "Enable thumbnailing of OpenDocument wordprocessing documents" +msgstr "Włączenie tworzenia miniatur dla dokumentów tekstowych OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:28 +msgid "Enable thumbnailing of OpenDocument wordprocessing master documents" +msgstr "" +"Włączenie tworzenia miniatur dla głównych dokumentów tekstowych OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:29 +msgid "Thumbnail command for Microsoft Excel 2007 spreadsheets" +msgstr "" +"Polecenie tworzenia miniatur dla arkuszy kalkulacyjnych programu Microsoft " +"Excel 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:30 +msgid "Thumbnail command for Microsoft Excel spreadsheets" +msgstr "" +"Polecenie tworzenia miniatur dla arkuszy kalkulacyjnych programu Microsoft " +"Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:31 +msgid "Thumbnail command for Microsoft PowerPoint 2007 presentations" +msgstr "" +"Polecenie tworzenia miniatur dla prezentacji programu Microsoft PowerPoint " +"2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:32 +msgid "Thumbnail command for Microsoft PowerPoint presentations" +msgstr "" +"Polecenie tworzenia miniatur dla prezentacji programu Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:33 +msgid "Thumbnail command for Microsoft Word 2007 documents" +msgstr "" +"Polecenie tworzenia miniatur dla dokumentów programu Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:34 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "Polecenie tworzenia miniatur dla dokumentów programu Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:35 +msgid "Thumbnail command for OpenDocument charts" +msgstr "Polecenie tworzenia miniatur dla wykresów OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:36 +msgid "Thumbnail command for OpenDocument drawing templates" +msgstr "Polecenie tworzenia miniatur dla szablonów rysunków OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:37 +msgid "Thumbnail command for OpenDocument drawings" +msgstr "Polecenie tworzenia miniatur dla rysunków OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:38 +msgid "Thumbnail command for OpenDocument formulas" +msgstr "Polecenie tworzenia miniatur dla formuł OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:39 +msgid "Thumbnail command for OpenDocument images" +msgstr "Polecenie tworzenia miniatur dla obrazów OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:40 +msgid "Thumbnail command for OpenDocument presentation templates" +msgstr "Polecenie tworzenia miniatur dla szablonów prezentacji OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:41 +msgid "Thumbnail command for OpenDocument presentations" +msgstr "Polecenie tworzenia miniatur dla prezentacji OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:42 +msgid "Thumbnail command for OpenDocument spreadsheet templates" +msgstr "" +"Polecenie tworzenia miniatur dla szablonów arkuszy kalkulacyjnych " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:43 +msgid "Thumbnail command for OpenDocument spreadsheets" +msgstr "Polecenie tworzenia miniatur dla arkuszy kalkulacyjnych OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:44 +msgid "Thumbnail command for OpenDocument wordprocessing document templates" +msgstr "" +"Polecenie tworzenia miniatur dla szablonów dokumentów tekstowych OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:45 +msgid "Thumbnail command for OpenDocument wordprocessing documents" +msgstr "Polecenie tworzenia miniatur dla dokumentów tekstowych OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:46 +msgid "Thumbnail command for OpenDocument wordprocessing master documents" +msgstr "" +"Polecenie tworzenia miniatur dla głównych dokumentów tekstowych OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:47 +msgid "Thumbnail command for OpenOffice 1.x Calc spreadsheets" +msgstr "" +"Polecenie tworzenia miniatur dla arkuszy kalkulacyjnych programu OpenOffice." +"org 1.x Calc" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:48 +msgid "Thumbnail command for OpenOffice 1.x Drawing templates" +msgstr "" +"Polecenie tworzenia miniatur dla szablonów rysunków programu OpenOffice.org " +"1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:49 +msgid "Thumbnail command for OpenOffice 1.x Impress Presentation templates" +msgstr "" +"Polecenie tworzenia miniatur dla szablonów prezentacji programu OpenOffice." +"org 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:50 +msgid "Thumbnail command for OpenOffice 1.x Impress presentations" +msgstr "" +"Polecenie tworzenia miniatur dla prezentacji programu OpenOffice.org 1.x " +"Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:51 +msgid "Thumbnail command for OpenOffice 1.x Math documents" +msgstr "" +"Polecenie tworzenia miniatur dla dokumentów programu OpenOffice.org 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:52 +msgid "Thumbnail command for OpenOffice 1.x Spreadsheet templates" +msgstr "" +"Polecenie tworzenia miniatur dla szablonów arkuszy kalkulacyjnych programu " +"OpenOffice.org 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:53 +msgid "Thumbnail command for OpenOffice 1.x Writer documents" +msgstr "" +"Polecenie tworzenia miniatur dla dokumentów programu OpenOffice.org 1.x " +"Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:54 +msgid "Thumbnail command for OpenOffice 1.x Writer global templates" +msgstr "" +"Polecenie tworzenia miniatur dla globalnych szablonów programu OpenOffice." +"org 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:55 +msgid "Thumbnail command for OpenOffice 1.x Writer templates" +msgstr "" +"Polecenie tworzenia miniatur dla szablonów programu OpenOffice.org 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:56 +msgid "Valid command plus arguments for the Microsoft Excel 2007 spreadsheets." +msgstr "" +"Prawidłowe polecenie plus parametry dla arkuszy kalkulacyjnych programu " +"Microsoft Excel 2007." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:57 +msgid "Valid command plus arguments for the Microsoft Excel spreadsheets." +msgstr "" +"Prawidłowe polecenie plus parametry dla arkuszy kalkulacyjnych programu " +"Microsoft Excel." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:58 +msgid "" +"Valid command plus arguments for the Microsoft PowerPoint 2007 thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur programu " +"Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:59 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur programu " +"Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:60 +msgid "Valid command plus arguments for the Microsoft Word 2007 thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur programu " +"Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:61 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur programu " +"Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:62 +msgid "Valid command plus arguments for the OpenDocument chart thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur wykresów " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:63 +msgid "" +"Valid command plus arguments for the OpenDocument drawing template " +"thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur szablonów " +"rysunków OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:64 +msgid "Valid command plus arguments for the OpenDocument drawing thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur rysunków " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:65 +msgid "Valid command plus arguments for the OpenDocument formula thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur formuł " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:66 +msgid "Valid command plus arguments for the OpenDocument image thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur obrazów " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:67 +msgid "" +"Valid command plus arguments for the OpenDocument presentation template " +"thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur szablonów " +"prezentacji OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:68 +msgid "" +"Valid command plus arguments for the OpenDocument presentation thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur prezentacji " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:69 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet template " +"thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur szablonów arkuszy " +"kalkulacyjnych OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:70 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur arkuszy " +"kalkulacyjnych OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:71 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"template thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur szablonów " +"dokumentów tekstowych OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:72 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur dokumentów " +"tekstowych OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:73 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing master " +"document thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur głównych " +"dokumentów tekstowych OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:74 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Drawing template " +"thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur szablonów " +"rysunków programu OpenOffice.org 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:75 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur rysunków programu " +"OpenOffice.org 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:76 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"template thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur szablonów " +"prezentacji programu OpenOffice.org 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:77 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur prezentacji " +"programu OpenOffice.org 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:78 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur dokumentów " +"programu OpenOffice.org 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:79 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer document " +"thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur dokumentów " +"programu OpenOffice.org 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:80 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer global template " +"thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur globalnych " +"szablonów dokumentów programu OpenOffice.org 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:81 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer template " +"thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur szablonów " +"programu OpenOffice.org 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:82 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" +msgstr "" +"Prawidłowe polecenie plus parametry dla tworzenia miniatur arkuszy " +"kalkulacyjnych programu OpenOffice.org 1.x" diff --git a/po/pt.po b/po/pt.po new file mode 100644 index 0000000..a44bef7 --- /dev/null +++ b/po/pt.po @@ -0,0 +1,630 @@ +# Portuguese translation for libgsf. +# Copyright © 2009 libgsf +# This file is distributed under the same license as the libgsf package. +# António Lima , 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: libgsf master\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-10-05 16:31+0100\n" +"PO-Revision-Date: 2009-10-03 20:55+0000\n" +"Last-Translator: António Lima \n" +"Language-Team: Portuguese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../gsf/gsf-blob.c:111 +#, c-format +msgid "Not enough memory to copy %s bytes of data" +msgstr "Memória insuficiente para copiar %s bytes de dados" + +#: ../gsf/gsf-clip-data.c:153 +#, c-format +msgid "The clip_data is in %s, but it is smaller than at least %s bytes" +msgstr "clip_data está em %s, mas é mais pequeno do que pelo menos %s bytes" + +#: ../gsf/gsf-clip-data.c:247 +#, c-format +msgid "" +"The clip_data is in Windows clipboard format, but it is smaller than the " +"required 4 bytes." +msgstr "" +"clip_data encontra-se no formato de área de transferência do Windows, mas é " +"mais pequeno do que os 4 bytes requeridos." + +#: ../gsf/gsf-clip-data.c:258 +msgid "Windows Metafile format" +msgstr "Formato de Windows Metafile" + +#. CF_BITMAP +#: ../gsf/gsf-clip-data.c:264 +msgid "Windows DIB or BITMAP format" +msgstr "Formato Windows DIB ou BITMAP" + +#: ../gsf/gsf-clip-data.c:269 +msgid "Windows Enhanced Metafile format" +msgstr "Formato Windows Enhanced Metafile" + +#: ../gsf/gsf-msole-utils.c:315 +#, c-format +msgid "" +"Missing data when reading the %s property; got %s bytes, but %s bytes at " +"least are needed." +msgstr "" +"Dados em falta ao ler a propriedade %s; obteve %s bytes, mas pelo menos %s " +"são necessários." + +#: ../gsf/gsf-msole-utils.c:366 +#, c-format +msgid "" +"Corrupt data in the VT_CF property; clipboard data length must be at least 4 " +"bytes, but the data says it only has %s bytes available." +msgstr "" +"Dados corrompidos na propriedade VT_CF; dados da área de transferência têm " +"de ter pelo menos 4 bytes, mas os dados dizem que tem apenas %s" + +#: ../gsf/gsf-open-pkg-utils.c:351 +#, c-format +msgid "Unable to find part id='%s' for '%s'" +msgstr "Incapaz de encontrar a parte id='%s' para '%s'" + +#: ../gsf/gsf-open-pkg-utils.c:379 +#, c-format +msgid "Unable to find part with type='%s' for '%s'" +msgstr "Incapaz de encontrar parte com tipo='%s' para '%s'" + +#: ../gsf/gsf-open-pkg-utils.c:409 +#, c-format +msgid "Missing id for part in '%s'" +msgstr "Id em falta para a parte em '%s'" + +#: ../gsf/gsf-open-pkg-utils.c:418 +#, c-format +msgid "Part '%s' in '%s' from '%s' is corrupt!" +msgstr "Parte '%s' em '%s' de '%s' está corrompida!" + +#: ../tools/gsf.c:22 +msgid "Display program version" +msgstr "Apresentar a versão da aplicação" + +#: ../tools/gsf.c:44 +#, c-format +msgid "%s: Failed to open %s: %s\n" +msgstr "%s: Falhou a abrir %s: %s\n" + +#: ../tools/gsf.c:65 +#, c-format +msgid "%s: Failed to recognize %s as an archive\n" +msgstr "%s: Não reconheceu %s como um arquivo\n" + +#: ../tools/gsf.c:102 +#, c-format +msgid "Available subcommands are...\n" +msgstr "Os subcomandos disponíveis são...\n" + +#: ../tools/gsf.c:103 +#, c-format +msgid "* cat output one or more files in archive\n" +msgstr "* cat saída de um ou mais ficheiros em arquivo\n" + +#: ../tools/gsf.c:104 +#, c-format +msgid "* dump dump one or more files in archive as hex\n" +msgstr "* dump despejar um ou mais ficheiros no arquivo como hex\n" + +#: ../tools/gsf.c:105 +#, c-format +msgid "* help list subcommands\n" +msgstr "* help listar subcomandos\n" + +#: ../tools/gsf.c:106 +#, c-format +msgid "* list list files in archive\n" +msgstr "* list listar ficheiros no arquivo\n" + +#: ../tools/gsf.c:107 +#, c-format +msgid "* listprops list document properties in archive\n" +msgstr "* listprops listar propriedades de documento no arquivo\n" + +#: ../tools/gsf.c:108 +#, c-format +msgid "* props print specified document properties\n" +msgstr "* props imprimir propriedades especificadas do documento\n" + +#: ../tools/gsf.c:291 +#, c-format +msgid "No property named %s\n" +msgstr "Nenhuma propriedade chamada %s\n" + +#: ../tools/gsf.c:364 +msgid "SUBCOMMAND ARCHIVE..." +msgstr "ARQUIVO DE SUBCOMANDO..." + +#: ../tools/gsf.c:371 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"Execute '%s --help' para ver uma lista completa das opções de linha de " +"comando disponíveis.\n" + +#: ../tools/gsf.c:378 +#, c-format +msgid "gsf version %d.%d.%d\n" +msgstr "versão gsf %d.%d.%d\n" + +#: ../tools/gsf.c:384 +#, c-format +msgid "Usage: %s %s\n" +msgstr "Utilização: %s %s\n" + +#: ../tools/gsf.c:405 +#, c-format +msgid "Run '%s help' to see a list subcommands.\n" +msgstr "Execute '%s help' para ver uma lista de subcomandos.\n" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "" +"Boolean options available, true enables thumbnailing and false disables the " +"creation of new thumbnails" +msgstr "" +"Opções booleanas disponíveis, verdadeiro activa imagens de referência e " +"falso desactiva a criação de novas imagens de referência" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing for OpenOffice 1.x Calc spreadsheets" +msgstr "" +"Activar imagens de referência para folhas de cálculo do OpenOffice 1.x Calc" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing for OpenOffice 1.x Drawing templates" +msgstr "Activar imagens de referência para modelos do OpenOffice 1.x Drawing" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing for OpenOffice 1.x Impress Presentation templates" +msgstr "" +"Activar imagens de referência para modelos de apresentações do OpenOffice 1." +"x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Enable thumbnailing for OpenOffice 1.x Impress presentations" +msgstr "" +"Activar imagens de referência para apresentações do OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Enable thumbnailing for OpenOffice 1.x Math documents" +msgstr "Activar imagens de referência para documentos do OpenOffice 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Enable thumbnailing for OpenOffice 1.x Spreadsheet templates" +msgstr "" +"Activar imagens de referência para modelos do OpenOffice 1.x Spreadsheet" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Enable thumbnailing for OpenOffice 1.x Writer documents" +msgstr "Activar imagens de referência para documentos do OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Enable thumbnailing for OpenOffice 1.x Writer global templates" +msgstr "" +"Activar imagens de referência para modelos globais do OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Enable thumbnailing for OpenOffice 1.x Writer templates" +msgstr "Activar imagens de referência para modelos do OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:11 +msgid "Enable thumbnailing of Microsoft Excel 2007 spreadsheets" +msgstr "" +"Activar imagens de referência de folhas de cálculo do Microsoft Excel 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:12 +msgid "Enable thumbnailing of Microsoft Excel spreadsheets" +msgstr "Activar imagens de referência de folhas de cálculo do Microsoft Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:13 +msgid "Enable thumbnailing of Microsoft PowerPoint 2007 presentations" +msgstr "" +"Activar imagens de referência de apresentações do Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:14 +msgid "Enable thumbnailing of Microsoft PowerPoint presentations" +msgstr "Activar imagens de referência de apresentações do Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:15 +msgid "Enable thumbnailing of Microsoft Word 2007 documents" +msgstr "Activar imagens de referência de documentos do Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:16 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "Activar imagens de referência de documentos do Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:17 +msgid "Enable thumbnailing of OpenDocument charts" +msgstr "Activar imagens de referência de gráficos OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:18 +msgid "Enable thumbnailing of OpenDocument drawing templates" +msgstr "Activar imagens de referência de modelos de desenho OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:19 +msgid "Enable thumbnailing of OpenDocument drawings" +msgstr "Activar imagens de referência de desenhos OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:20 +msgid "Enable thumbnailing of OpenDocument formulas" +msgstr "Activar imagens de referência de fórmulas OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:21 +msgid "Enable thumbnailing of OpenDocument images" +msgstr "Activar imagens de referência de imagens OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:22 +msgid "Enable thumbnailing of OpenDocument presentation templates" +msgstr "Activar imagens de referência de modelos de apresentações OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:23 +msgid "Enable thumbnailing of OpenDocument presentations" +msgstr "Activar imagens de referência de apresentações OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:24 +msgid "Enable thumbnailing of OpenDocument spreadsheet templates" +msgstr "" +"Activar imagens de referência de modelos de folhas de cálculo OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:25 +msgid "Enable thumbnailing of OpenDocument spreadsheets" +msgstr "Activar imagens de referência de folhas de cálculo OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:26 +msgid "Enable thumbnailing of OpenDocument wordprocessing document templates" +msgstr "" +"Activar imagens de referência de modelos de documentos de processamento de " +"texto OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:27 +msgid "Enable thumbnailing of OpenDocument wordprocessing documents" +msgstr "" +"Activar imagens de referência de documentos de processamento de texto " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:28 +msgid "Enable thumbnailing of OpenDocument wordprocessing master documents" +msgstr "" +"Activar imagens de referência de documentos mestres de processamento de " +"texto OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:29 +msgid "Thumbnail command for Microsoft Excel 2007 spreadsheets" +msgstr "" +"Comando para imagens de referência para folhas de cálculo do Microsoft Excel " +"2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:30 +msgid "Thumbnail command for Microsoft Excel spreadsheets" +msgstr "" +"Comando para imagens de referência para folhas de cálculo do Microsoft Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:31 +msgid "Thumbnail command for Microsoft PowerPoint 2007 presentations" +msgstr "" +"Comando para imagens de referência para apresentações do Microsoft " +"PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:32 +msgid "Thumbnail command for Microsoft PowerPoint presentations" +msgstr "" +"Comando para imagens de referência para apresentações do Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:33 +msgid "Thumbnail command for Microsoft Word 2007 documents" +msgstr "" +"Comando para imagens de referência para documentos do Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:34 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "Comando para imagens de referência para documentos do Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:35 +msgid "Thumbnail command for OpenDocument charts" +msgstr "Comando para imagens de referência para gráficos OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:36 +msgid "Thumbnail command for OpenDocument drawing templates" +msgstr "" +"Comando para imagens de referência para modelos de desenho OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:37 +msgid "Thumbnail command for OpenDocument drawings" +msgstr "Comando para imagens de referência para desenhos OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:38 +msgid "Thumbnail command for OpenDocument formulas" +msgstr "Comando para imagens de referência para fórmulas OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:39 +msgid "Thumbnail command for OpenDocument images" +msgstr "Comando para imagens de referência para imagens OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:40 +msgid "Thumbnail command for OpenDocument presentation templates" +msgstr "" +"Comando para imagens de referência para modelos de apresentação OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:41 +msgid "Thumbnail command for OpenDocument presentations" +msgstr "Comando para imagens de referência para apresentações OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:42 +msgid "Thumbnail command for OpenDocument spreadsheet templates" +msgstr "" +"Comando para imagens de referência para modelos de folha de cálculo " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:43 +msgid "Thumbnail command for OpenDocument spreadsheets" +msgstr "Comando para imagens de referência para folhas de cálculo OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:44 +msgid "Thumbnail command for OpenDocument wordprocessing document templates" +msgstr "" +"Comando para imagens de referência para modelos de documento de " +"processamento de texto OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:45 +msgid "Thumbnail command for OpenDocument wordprocessing documents" +msgstr "" +"Comando para imagens de referência para documentos de processamento de texto " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:46 +msgid "Thumbnail command for OpenDocument wordprocessing master documents" +msgstr "" +"Comando para imagens de referência para documentos mestres de processamento " +"de texto OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:47 +msgid "Thumbnail command for OpenOffice 1.x Calc spreadsheets" +msgstr "" +"Comando para imagens de referência para folhas de cálculo do OpenOffice 1.x " +"Calc" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:48 +msgid "Thumbnail command for OpenOffice 1.x Drawing templates" +msgstr "" +"Comando para imagens de referência para modelos do OpenOffice 1.x Drawing" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:49 +msgid "Thumbnail command for OpenOffice 1.x Impress Presentation templates" +msgstr "" +"Comando para imagens de referência para modelos de apresentações do " +"OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:50 +msgid "Thumbnail command for OpenOffice 1.x Impress presentations" +msgstr "" +"Comando para imagens de referência para apresentações do OpenOffice 1.x " +"Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:51 +msgid "Thumbnail command for OpenOffice 1.x Math documents" +msgstr "" +"Comando para imagens de referência para documentos do OpenOffice 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:52 +msgid "Thumbnail command for OpenOffice 1.x Spreadsheet templates" +msgstr "" +"Comando para imagens de referência para modelos de folhas de cálculo do " +"OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:53 +msgid "Thumbnail command for OpenOffice 1.x Writer documents" +msgstr "" +"Comando para imagens de referência para documentos do OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:54 +msgid "Thumbnail command for OpenOffice 1.x Writer global templates" +msgstr "" +"Comando para imagens de referência para modelos globais do OpenOffice 1.x " +"Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:55 +msgid "Thumbnail command for OpenOffice 1.x Writer templates" +msgstr "" +"Comando para imagens de referência para modelos do OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:56 +msgid "Valid command plus arguments for the Microsoft Excel 2007 spreadsheets." +msgstr "" +"Comando válido mais argumentos para as folhas de cálculo do Microsoft Excel " +"2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:57 +msgid "Valid command plus arguments for the Microsoft Excel spreadsheets." +msgstr "" +"Comando válido mais argumentos para as folhas de cálculo do Microsoft Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:58 +msgid "" +"Valid command plus arguments for the Microsoft PowerPoint 2007 thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência do " +"Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:59 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência do " +"Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:60 +msgid "Valid command plus arguments for the Microsoft Word 2007 thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência do " +"Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:61 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência do " +"Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:62 +msgid "Valid command plus arguments for the OpenDocument chart thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência para " +"gráficos OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:63 +msgid "" +"Valid command plus arguments for the OpenDocument drawing template " +"thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência para " +"modelos de desenho OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:64 +msgid "Valid command plus arguments for the OpenDocument drawing thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência para " +"desenho OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:65 +msgid "Valid command plus arguments for the OpenDocument formula thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência de " +"fórmulas OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:66 +msgid "Valid command plus arguments for the OpenDocument image thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência para " +"imagens OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:67 +msgid "" +"Valid command plus arguments for the OpenDocument presentation template " +"thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência de " +"modelo de apresentação OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:68 +msgid "" +"Valid command plus arguments for the OpenDocument presentation thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência para " +"apresentações OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:69 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet template " +"thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência de " +"modelos de folha de cálculo OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:70 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência para " +"folhas de cálculo OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:71 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"template thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência para " +"modelos de documentos de processamento de texto OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:72 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência para " +"documentos de processamento de texto OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:73 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing master " +"document thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência para " +"documentos mestres de processamento de texto OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:74 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Drawing template " +"thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência para " +"modelos OpenOffice 1.x Drawing" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:75 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência para " +"OpenOffice 1.x Drawing" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:76 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"template thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência para " +"modelos de apresentação OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:77 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência para " +"OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:78 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência para " +"documentos OpenOffice 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:79 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer document " +"thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência para " +"documentos OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:80 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer global template " +"thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência para " +"modelos globais de OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:81 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer template " +"thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência para " +"modelos OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:82 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" +msgstr "" +"Comando válido mais argumentos para o criador de imagens de referência para " +"folhas de cálculo OpenOffice 1.x" diff --git a/po/pt_BR.po b/po/pt_BR.po new file mode 100644 index 0000000..b9cc5da --- /dev/null +++ b/po/pt_BR.po @@ -0,0 +1,587 @@ +# Brazilian Portuguese translation for libgsf. +# Copyright (C) 2009 libgsf's COPYRIGHT HOLDER +# This file is distributed under the same license as the libgsf package. +# Djavan Fagundes , 2009. +# Jader Henrique da Silva , 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: libgsf master\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-10-18 15:26-0400\n" +"PO-Revision-Date: 2009-10-01 17:01-0300\n" +"Last-Translator: Jader Henrique da Silva \n" +"Language-Team: Brazilian Portuguese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: ../gsf/gsf-blob.c:111 +#, c-format +msgid "Not enough memory to copy %s bytes of data" +msgstr "Sem memória suficiente para copiar %s bytes de dados" + +#: ../gsf/gsf-clip-data.c:153 +#, c-format +msgid "The clip_data is in %s, but it is smaller than at least %s bytes" +msgstr "O clip_data está em %s, mas é menor que o mínimo de %s bytes" + +#: ../gsf/gsf-clip-data.c:247 +#, c-format +msgid "" +"The clip_data is in Windows clipboard format, but it is smaller than the " +"required 4 bytes." +msgstr "" +"O clip_data está no formato de área de transferência do Windows, mas este é " +"menor que o necessário, que é de 4 bytes." + +#: ../gsf/gsf-clip-data.c:258 +msgid "Windows Metafile format" +msgstr "Formato de Meta-arquivo do Windows" + +#. CF_BITMAP +#: ../gsf/gsf-clip-data.c:264 +msgid "Windows DIB or BITMAP format" +msgstr "Formato Windows DIB ou BITMAP" + +#: ../gsf/gsf-clip-data.c:269 +msgid "Windows Enhanced Metafile format" +msgstr "Formato Windows Enhanced Metafile" + +#: ../gsf/gsf-msole-utils.c:315 +#, c-format +msgid "" +"Missing data when reading the %s property; got %s bytes, but %s bytes at " +"least are needed." +msgstr "" +"Faltando dados ao ler a propriedade %s; %s bytes foram obtidos, mas ao menos " +"%s bytes são necessários." + +#: ../gsf/gsf-msole-utils.c:366 +#, c-format +msgid "" +"Corrupt data in the VT_CF property; clipboard data length must be at least 4 " +"bytes, but the data says it only has %s bytes available." +msgstr "" +"Dados corrompidos na propriedade VT_CF; o comprimento da área de " +"transferência deve ser de pelo menos 4 bytes, mas os dados dizem que há " +"somente %s bytes disponíveis." + +#: ../gsf/gsf-open-pkg-utils.c:351 +#, c-format +msgid "Unable to find part id='%s' for '%s'" +msgstr "Não foi possível encontrar id=\"%s\" da parte para \"%s\"" + +#: ../gsf/gsf-open-pkg-utils.c:379 +#, c-format +msgid "Unable to find part with type='%s' for '%s'" +msgstr "Não foi possível encontrar parte com o tipo=\"%s\" para \"%s\"" + +#: ../gsf/gsf-open-pkg-utils.c:409 +#, c-format +msgid "Missing id for part in '%s'" +msgstr "Faltando id para parte em \"%s\"" + +#: ../gsf/gsf-open-pkg-utils.c:418 +#, c-format +msgid "Part '%s' in '%s' from '%s' is corrupt!" +msgstr "Parte \"%s\" em \"%s\" de \"%s\" está corrompida!" + +#: ../tools/gsf.c:22 +msgid "Display program version" +msgstr "Exibir versão do programa" + +#: ../tools/gsf.c:44 +#, c-format +msgid "%s: Failed to open %s: %s\n" +msgstr "%s: Falhou ao abrir %s: %s\n" + +#: ../tools/gsf.c:65 +#, c-format +msgid "%s: Failed to recognize %s as an archive\n" +msgstr "%s: Falhou ao reconhecer %s como um pacote\n" + +#: ../tools/gsf.c:102 +#, c-format +msgid "Available subcommands are...\n" +msgstr "Os subcomandos disponíveis são...\n" + +#: ../tools/gsf.c:103 +#, c-format +msgid "* cat output one or more files in archive\n" +msgstr "* cat exibe a saída de um ou mais arquivos em um pacote\n" + +#: ../tools/gsf.c:104 +#, c-format +msgid "* dump dump one or more files in archive as hex\n" +msgstr "* dump faz dump em um ou mais arquivos em um pacote como hexa\n" + +#: ../tools/gsf.c:105 +#, c-format +msgid "* help list subcommands\n" +msgstr "* help lista subcomandos\n" + +#: ../tools/gsf.c:106 +#, c-format +msgid "* list list files in archive\n" +msgstr "* list lista arquivos em um pacote\n" + +#: ../tools/gsf.c:107 +#, c-format +msgid "* listprops list document properties in archive\n" +msgstr "* listprops lista as propriedades do documento em um pacote\n" + +#: ../tools/gsf.c:108 +#, c-format +msgid "* props print specified document properties\n" +msgstr "* props exibe propriedades específicas do documento\n" + +#: ../tools/gsf.c:291 +#, c-format +msgid "No property named %s\n" +msgstr "Nenhuma propriedade chamada %s\n" + +#: ../tools/gsf.c:364 +msgid "SUBCOMMAND ARCHIVE..." +msgstr "PACOTE DE SUBCOMANDO...." + +#: ../tools/gsf.c:371 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"Execute \"%s --help\" para ver uma lista completa de opções para a linha de " +"comando.\n" + +#: ../tools/gsf.c:378 +#, c-format +msgid "gsf version %d.%d.%d\n" +msgstr "gsf versão %d.%d.%d\n" + +#: ../tools/gsf.c:384 +#, c-format +msgid "Usage: %s %s\n" +msgstr "Uso: %s %s\n" + +#: ../tools/gsf.c:405 +#, c-format +msgid "Run '%s help' to see a list subcommands.\n" +msgstr "Execute \"%s help\" para ver uma lista de subcomandos.\n" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "" +"Boolean options available, true enables thumbnailing and false disables the " +"creation of new thumbnails" +msgstr "" +"Opções booleanas disponíveis, verdadeiro habilita e falso desabilita a " +"criação de novas miniaturas" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing for OpenOffice 1.x Calc spreadsheets" +msgstr "Habilita miniaturas para planilhas do OpenOffice Calc 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing for OpenOffice 1.x Drawing templates" +msgstr "Habilita miniaturas para modelos de desenho do OpenOffice Drawing 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing for OpenOffice 1.x Impress Presentation templates" +msgstr "" +"Habilita miniaturas para modelos de apresentação do OpenOffice Impress 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Enable thumbnailing for OpenOffice 1.x Impress presentations" +msgstr "Habilita miniaturas para apresentações do OpenOffice Impress 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Enable thumbnailing for OpenOffice 1.x Math documents" +msgstr "Habilita miniaturas para documentos do OpenOffice Math 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Enable thumbnailing for OpenOffice 1.x Spreadsheet templates" +msgstr "Habilita miniaturas para modelos do OpenOffice Spreadsheet 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Enable thumbnailing for OpenOffice 1.x Writer documents" +msgstr "Habilita miniaturas para documentos do OpenOffice Writer 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Enable thumbnailing for OpenOffice 1.x Writer global templates" +msgstr "Habilita miniaturas para modelos globais do OpenOffice Writer 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Enable thumbnailing for OpenOffice 1.x Writer templates" +msgstr "Habilita miniaturas para modelos do OpenOffice Writer 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:11 +msgid "Enable thumbnailing of Microsoft Excel 2007 spreadsheets" +msgstr "Habilita miniaturas para planilhas do Microsoft Excel 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:12 +msgid "Enable thumbnailing of Microsoft Excel spreadsheets" +msgstr "Habilita miniaturas para planilhas do Microsoft Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:13 +msgid "Enable thumbnailing of Microsoft PowerPoint 2007 presentations" +msgstr "Habilita miniaturas para apresentações do Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:14 +msgid "Enable thumbnailing of Microsoft PowerPoint presentations" +msgstr "Habilita miniaturas para apresentações do Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:15 +msgid "Enable thumbnailing of Microsoft Word 2007 documents" +msgstr "Habilita miniaturas para documentos do Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:16 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "Habilita miniaturas para documentos do Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:17 +msgid "Enable thumbnailing of OpenDocument charts" +msgstr "Habilita miniaturas para gráficos do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:18 +msgid "Enable thumbnailing of OpenDocument drawing templates" +msgstr "Habilita miniaturas para modelos de desenhos do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:19 +msgid "Enable thumbnailing of OpenDocument drawings" +msgstr "Habilita miniaturas para desenhos do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:20 +msgid "Enable thumbnailing of OpenDocument formulas" +msgstr "Habilita miniaturas para fórmulas do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:21 +msgid "Enable thumbnailing of OpenDocument images" +msgstr "Habilita miniaturas para imagens do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:22 +msgid "Enable thumbnailing of OpenDocument presentation templates" +msgstr "Habilita miniaturas para modelos de apresentação do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:23 +msgid "Enable thumbnailing of OpenDocument presentations" +msgstr "Habilita miniaturas para apresentações do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:24 +msgid "Enable thumbnailing of OpenDocument spreadsheet templates" +msgstr "Habilita miniaturas para modelos de planilha do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:25 +msgid "Enable thumbnailing of OpenDocument spreadsheets" +msgstr "Habilita miniaturas para planilhas do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:26 +msgid "Enable thumbnailing of OpenDocument wordprocessing document templates" +msgstr "" +"Habilita miniaturas para modelos de processamento de texto do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:27 +msgid "Enable thumbnailing of OpenDocument wordprocessing documents" +msgstr "Habilita miniaturas para processamento de texto do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:28 +msgid "Enable thumbnailing of OpenDocument wordprocessing master documents" +msgstr "Habilita miniaturas para processamento de texto mestre do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:29 +msgid "Thumbnail command for Microsoft Excel 2007 spreadsheets" +msgstr "Comando de miniatura para planilhas do Microsoft Excel 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:30 +msgid "Thumbnail command for Microsoft Excel spreadsheets" +msgstr "Comando de miniatura para planilhas do Microsoft Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:31 +msgid "Thumbnail command for Microsoft PowerPoint 2007 presentations" +msgstr "Comando de miniatura para apresentações do Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:32 +msgid "Thumbnail command for Microsoft PowerPoint presentations" +msgstr "Comando de miniatura para apresentações do Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:33 +msgid "Thumbnail command for Microsoft Word 2007 documents" +msgstr "Comando de miniatura para documentos do Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:34 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "Comando de miniatura para documentos do Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:35 +msgid "Thumbnail command for OpenDocument charts" +msgstr "Comando de miniatura para gráficos do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:36 +msgid "Thumbnail command for OpenDocument drawing templates" +msgstr "Comando de miniatura para modelos de desenho do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:37 +msgid "Thumbnail command for OpenDocument drawings" +msgstr "Comando de miniatura para desenhos do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:38 +msgid "Thumbnail command for OpenDocument formulas" +msgstr "Comando de miniatura para fórmulas do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:39 +msgid "Thumbnail command for OpenDocument images" +msgstr "Comando de miniatura para imagens do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:40 +msgid "Thumbnail command for OpenDocument presentation templates" +msgstr "Comando de miniatura para modelos de apresentação do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:41 +msgid "Thumbnail command for OpenDocument presentations" +msgstr "Comando de miniatura para apresentações do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:42 +msgid "Thumbnail command for OpenDocument spreadsheet templates" +msgstr "Comando de miniatura para modelos de planilha do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:43 +msgid "Thumbnail command for OpenDocument spreadsheets" +msgstr "Comando de miniatura para planilhas do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:44 +msgid "Thumbnail command for OpenDocument wordprocessing document templates" +msgstr "" +"Comando de miniatura para modelos de processamento de texto do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:45 +msgid "Thumbnail command for OpenDocument wordprocessing documents" +msgstr "" +"Comando de miniatura para documentos de processamento de texto do " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:46 +msgid "Thumbnail command for OpenDocument wordprocessing master documents" +msgstr "" +"Comando de miniatura para documentos mestre de processamento de texto do " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:47 +msgid "Thumbnail command for OpenOffice 1.x Calc spreadsheets" +msgstr "Comando de miniatura para planilhas do OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:48 +msgid "Thumbnail command for OpenOffice 1.x Drawing templates" +msgstr "Comando de miniatura para modelos do OpenOffice Drawing 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:49 +msgid "Thumbnail command for OpenOffice 1.x Impress Presentation templates" +msgstr "" +"Comando de miniatura para modelos de apresentação do OpenOffice Impress 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:50 +msgid "Thumbnail command for OpenOffice 1.x Impress presentations" +msgstr "Comando de miniatura para apresentações do OpenOffice Impress 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:51 +msgid "Thumbnail command for OpenOffice 1.x Math documents" +msgstr "Comando de miniatura para documentos do OpenOffice Math 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:52 +msgid "Thumbnail command for OpenOffice 1.x Spreadsheet templates" +msgstr "Comando de miniatura para modelos do OpenOffice 1.x Spreadsheet" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:53 +msgid "Thumbnail command for OpenOffice 1.x Writer documents" +msgstr "Comando de miniatura para documentos do OpenOffice Writer 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:54 +msgid "Thumbnail command for OpenOffice 1.x Writer global templates" +msgstr "Comando de miniatura para modelos globais do OpenOffice Writer 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:55 +msgid "Thumbnail command for OpenOffice 1.x Writer templates" +msgstr "Comando de miniatura para modelos do OpenOffice Writer 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:56 +msgid "Valid command plus arguments for the Microsoft Excel 2007 spreadsheets." +msgstr "" +"Argumentos de comando válidos para apresentações do Microsoft Excel 2007." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:57 +msgid "Valid command plus arguments for the Microsoft Excel spreadsheets." +msgstr "Argumentos de comando válidos para planilhas do Microsoft Excel." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:58 +msgid "" +"Valid command plus arguments for the Microsoft PowerPoint 2007 thumbnailer" +msgstr "" +"Argumentos de comando válidos para miniaturas do Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:59 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" +msgstr "Argumentos de comando válidos para miniatura do Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:60 +msgid "Valid command plus arguments for the Microsoft Word 2007 thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas do Microsoft Word " +"2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:61 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas do Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:62 +msgid "Valid command plus arguments for the OpenDocument chart thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:63 +msgid "" +"Valid command plus arguments for the OpenDocument drawing template " +"thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas de modelos de " +"desenhos do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:64 +msgid "Valid command plus arguments for the OpenDocument drawing thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas de desenhos do " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:65 +msgid "Valid command plus arguments for the OpenDocument formula thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas de fórmulas do " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:66 +msgid "Valid command plus arguments for the OpenDocument image thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas de imagens do " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:67 +msgid "" +"Valid command plus arguments for the OpenDocument presentation template " +"thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas de modelos de " +"apresentação do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:68 +msgid "" +"Valid command plus arguments for the OpenDocument presentation thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas de apresentação " +"do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:69 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet template " +"thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas de modelo de " +"planilha do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:70 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas de planilha do " +"OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:71 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"template thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas de modelos de " +"processamento de texto do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:72 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas de processamento " +"de texto do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:73 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing master " +"document thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas do documento " +"mestre de processamento de texto do OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:74 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Drawing template " +"thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas de modelos do " +"OpenOffice Drawing 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:75 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas do OpenOffice " +"Drawing 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:76 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"template thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas de modelos de " +"apresentação do OpenOffice Impress 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:77 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas de apresentações " +"do OpenOffice Impress 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:78 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas de documento do " +"OpenOffice Math 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:79 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer document " +"thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas de documentos do " +"OpenOffice Writer 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:80 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer global template " +"thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas de modelos " +"globais do OpenOffice Writer 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:81 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer template " +"thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas de modelos do " +"OpenOffice Writer 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:82 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" +msgstr "" +"Argumentos de comando válidos para o gerador de miniaturas de planilhas do " +"OpenOffice 1.x" diff --git a/po/sl.po b/po/sl.po new file mode 100644 index 0000000..d37d95e --- /dev/null +++ b/po/sl.po @@ -0,0 +1,489 @@ +# Slovenian translations for libgsf. +# Copyright (C) 2009 libgsf's COPYRIGHT HOLDER +# This file is distributed under the same license as the libgsf package. +# +# Matej Urbančič , 2009 - 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: libgsf master\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=libgsf&component=General\n" +"POT-Creation-Date: 2009-10-29 14:55+0000\n" +"PO-Revision-Date: 2010-04-01 10:39+0100\n" +"Last-Translator: Matej Urbančič \n" +"Language-Team: Slovenian GNOME Translation Team \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0);\n" +"X-Poedit-Country: SLOVENIA\n" +"X-Poedit-Language: Slovenian\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: ../gsf/gsf-blob.c:111 +#, c-format +msgid "Not enough memory to copy %s bytes of data" +msgstr "Ni dovolj pomnilnika za kopiranje %s bajtov podatkov" + +#: ../gsf/gsf-clip-data.c:153 +#, c-format +msgid "The clip_data is in %s, but it is smaller than at least %s bytes" +msgstr "Clip_data je del %s, vendar je manjši kot %s bajtov" + +#: ../gsf/gsf-clip-data.c:247 +#, c-format +msgid "The clip_data is in Windows clipboard format, but it is smaller than the required 4 bytes." +msgstr "Clip_data je običajni Windows zapis odložišča, vendar je manjši od zahtevanih 4 bajtov." + +#: ../gsf/gsf-clip-data.c:258 +msgid "Windows Metafile format" +msgstr "Zapis Windows Metafile" + +#. CF_BITMAP +#: ../gsf/gsf-clip-data.c:264 +msgid "Windows DIB or BITMAP format" +msgstr "Zapis Windows DIB ali BITMAP" + +#: ../gsf/gsf-clip-data.c:269 +msgid "Windows Enhanced Metafile format" +msgstr "Zapis Windows Enhanced Metafile" + +#: ../gsf/gsf-msole-utils.c:315 +#, c-format +msgid "Missing data when reading the %s property; got %s bytes, but %s bytes at least are needed." +msgstr "Manjkajoči podatki med branjem lastnosti %s; dobljenih %s bajtov, vendar je zahtevanih vsaj %s bajtov." + +#: ../gsf/gsf-msole-utils.c:366 +#, c-format +msgid "Corrupt data in the VT_CF property; clipboard data length must be at least 4 bytes, but the data says it only has %s bytes available." +msgstr "Pokvarjeni podatki lastnosti VT_CF; velikost podatkov odložišča mora biti vsaj 4 bajte, podatki pa kažejo na le %s razpoložljive bajte." + +#: ../gsf/gsf-open-pkg-utils.c:351 +#, c-format +msgid "Unable to find part id='%s' for '%s'" +msgstr "Ni mogoče najti dela id='%s' za '%s'" + +#: ../gsf/gsf-open-pkg-utils.c:379 +#, c-format +msgid "Unable to find part with type='%s' for '%s'" +msgstr "Ni mogoče najti dela vrsta='%s' za '%s'" + +#: ../gsf/gsf-open-pkg-utils.c:409 +#, c-format +msgid "Missing id for part in '%s'" +msgstr "Manjkajoči id za del v '%s'" + +#: ../gsf/gsf-open-pkg-utils.c:418 +#, c-format +msgid "Part '%s' in '%s' from '%s' is corrupt!" +msgstr "Del '%s' v '%s' iz '%s' je pokvarjen!" + +#: ../tools/gsf.c:22 +msgid "Display program version" +msgstr "Pokaži različico programa" + +#: ../tools/gsf.c:44 +#, c-format +msgid "%s: Failed to open %s: %s\n" +msgstr "%s: napaka med odpiranjem %s: %s\n" + +#: ../tools/gsf.c:65 +#, c-format +msgid "%s: Failed to recognize %s as an archive\n" +msgstr "%s: napaka med prepoznavanjem datoteke %s kot vrste arhiva\n" + +#: ../tools/gsf.c:102 +#, c-format +msgid "Available subcommands are...\n" +msgstr "Razpoložljivi podrejeni ukazi so ...\n" + +#: ../tools/gsf.c:103 +#, c-format +msgid "* cat output one or more files in archive\n" +msgstr "* cat izpis enega ali več datotek v arhivu\n" + +#: ../tools/gsf.c:104 +#, c-format +msgid "* dump dump one or more files in archive as hex\n" +msgstr "* dump izpiši enega ali več datotek v arhivu v šestnajstiškem zapisu\n" + +#: ../tools/gsf.c:105 +#, c-format +msgid "* help list subcommands\n" +msgstr "* help izpis podrejenih ukazov\n" + +#: ../tools/gsf.c:106 +#, c-format +msgid "* list list files in archive\n" +msgstr "* list izpis datotek v arhivu\n" + +#: ../tools/gsf.c:107 +#, c-format +msgid "* listprops list document properties in archive\n" +msgstr "* listprops izpis lastnosti dokumentov v arhivu\n" + +#: ../tools/gsf.c:108 +#, c-format +msgid "* props print specified document properties\n" +msgstr "* props natisne določene lastnosti dokumenta\n" + +#: ../tools/gsf.c:291 +#, c-format +msgid "No property named %s\n" +msgstr "Ni lastnosti z imenom %s\n" + +#: ../tools/gsf.c:364 +msgid "SUBCOMMAND ARCHIVE..." +msgstr "Arhiv podrejenih ukazov ..." + +#: ../tools/gsf.c:371 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"Zaženite '%s --help' za izpis popolnega seznama ukazov na voljo.\n" + +#: ../tools/gsf.c:378 +#, c-format +msgid "gsf version %d.%d.%d\n" +msgstr "gsf različica %d.%d.%d\n" + +#: ../tools/gsf.c:384 +#, c-format +msgid "Usage: %s %s\n" +msgstr "Uporaba: %s %s\n" + +#: ../tools/gsf.c:405 +#, c-format +msgid "Run '%s help' to see a list subcommands.\n" +msgstr "Zaženite '%s help' za izpis seznama podrejenih ukazov.\n" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails" +msgstr "Na voljo so logične Boolove možnosti. Izbrana možnost omogoči ustvarjanje sličic." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing for OpenOffice 1.x Calc spreadsheets" +msgstr "Omogoči ustvarjanje sličic za razpredelnice OpenOffice 1.x Calc" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing for OpenOffice 1.x Drawing templates" +msgstr "Omogoči ustvarjanje sličic za predlogo risanja OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing for OpenOffice 1.x Impress Presentation templates" +msgstr "Omogoči ustvarjanje sličic za predlogo predstavitve OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Enable thumbnailing for OpenOffice 1.x Impress presentations" +msgstr "Omogoči ustvarjanje sličic za predstavitev OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Enable thumbnailing for OpenOffice 1.x Math documents" +msgstr "Omogoči ustvarjanje sličic za dokumente OpenOffice 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Enable thumbnailing for OpenOffice 1.x Spreadsheet templates" +msgstr "Omogoči ustvarjanje sličic za predloge razpredelnic OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Enable thumbnailing for OpenOffice 1.x Writer documents" +msgstr "Omogoči ustvarjanje sličic za dokumente OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Enable thumbnailing for OpenOffice 1.x Writer global templates" +msgstr "Omogoči ustvarjanje sličic za splošne predloge OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Enable thumbnailing for OpenOffice 1.x Writer templates" +msgstr "Omogoči ustvarjanje sličic za predloge OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:11 +msgid "Enable thumbnailing of Microsoft Excel 2007 spreadsheets" +msgstr "Omogoči ustvarjanje sličic za razpredelnice Microsoft Excel 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:12 +msgid "Enable thumbnailing of Microsoft Excel spreadsheets" +msgstr "Omogoči ustvarjanje sličic za razpredelnice Microsoft Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:13 +msgid "Enable thumbnailing of Microsoft PowerPoint 2007 presentations" +msgstr "Omogoči ustvarjanje sličic za predstavitve Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:14 +msgid "Enable thumbnailing of Microsoft PowerPoint presentations" +msgstr "Omogoči ustvarjanje sličic za predstavitve Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:15 +msgid "Enable thumbnailing of Microsoft Word 2007 documents" +msgstr "Omogoči ustvarjanje sličic za dokumente Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:16 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "Omogoči ustvarjanje sličic za dokumente Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:17 +msgid "Enable thumbnailing of OpenDocument charts" +msgstr "Omogoči ustvarjanje sličic za grafe OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:18 +msgid "Enable thumbnailing of OpenDocument drawing templates" +msgstr "Omogoči ustvarjanje sličic za predloge risanja OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:19 +msgid "Enable thumbnailing of OpenDocument drawings" +msgstr "Omogoči ustvarjanje sličic za risbe OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:20 +msgid "Enable thumbnailing of OpenDocument formulas" +msgstr "Omogoči ustvarjanje sličic za formule OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:21 +msgid "Enable thumbnailing of OpenDocument images" +msgstr "Omogoči ustvarjanje sličic za slike OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:22 +msgid "Enable thumbnailing of OpenDocument presentation templates" +msgstr "Omogoči ustvarjanje sličic za predloge predstavitev OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:23 +msgid "Enable thumbnailing of OpenDocument presentations" +msgstr "Omogoči ustvarjanje sličic za predstavitve OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:24 +msgid "Enable thumbnailing of OpenDocument spreadsheet templates" +msgstr "Omogoči ustvarjanje sličic za predloge razpredelnic OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:25 +msgid "Enable thumbnailing of OpenDocument spreadsheets" +msgstr "Omogoči ustvarjanje sličic za razpredelnice OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:26 +msgid "Enable thumbnailing of OpenDocument wordprocessing document templates" +msgstr "Omogoči ustvarjanje sličic za predloge besedilnih dokumentov OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:27 +msgid "Enable thumbnailing of OpenDocument wordprocessing documents" +msgstr "Omogoči ustvarjanje sličic za besedilne dokumente OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:28 +msgid "Enable thumbnailing of OpenDocument wordprocessing master documents" +msgstr "Omogoči ustvarjanje sličic za glavne dokumente OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:29 +msgid "Thumbnail command for Microsoft Excel 2007 spreadsheets" +msgstr "Ukaz za ustvarjanje sličic za razpredelnice Microsoft Excel 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:30 +msgid "Thumbnail command for Microsoft Excel spreadsheets" +msgstr "Ukaz za ustvarjanje sličic za razpredelnice Microsoft Excel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:31 +msgid "Thumbnail command for Microsoft PowerPoint 2007 presentations" +msgstr "Ukaz za ustvarjanje sličic za razpredelnice Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:32 +msgid "Thumbnail command for Microsoft PowerPoint presentations" +msgstr "Ukaz za ustvarjanje sličic za razpredelnice Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:33 +msgid "Thumbnail command for Microsoft Word 2007 documents" +msgstr "Ukaz za ustvarjanje sličic za dokumente Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:34 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "Ukaz za ustvarjanje sličic za dokumente Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:35 +msgid "Thumbnail command for OpenDocument charts" +msgstr "Ukaz za ustvarjanje sličic za grafe OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:36 +msgid "Thumbnail command for OpenDocument drawing templates" +msgstr "Ukaz za ustvarjanje sličic za predloge risanja OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:37 +msgid "Thumbnail command for OpenDocument drawings" +msgstr "Ukaz za ustvarjanje sličic za risbe OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:38 +msgid "Thumbnail command for OpenDocument formulas" +msgstr "Ukaz za ustvarjanje sličic za formule OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:39 +msgid "Thumbnail command for OpenDocument images" +msgstr "Ukaz za ustvarjanje sličic za slike OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:40 +msgid "Thumbnail command for OpenDocument presentation templates" +msgstr "Ukaz za ustvarjanje sličic za predloge predstavitev OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:41 +msgid "Thumbnail command for OpenDocument presentations" +msgstr "Ukaz za ustvarjanje sličic za predstavitve OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:42 +msgid "Thumbnail command for OpenDocument spreadsheet templates" +msgstr "Ukaz za ustvarjanje sličic za predloge razpredelnic OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:43 +msgid "Thumbnail command for OpenDocument spreadsheets" +msgstr "Ukaz za ustvarjanje sličic za razpredelnice OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:44 +msgid "Thumbnail command for OpenDocument wordprocessing document templates" +msgstr "Ukaz za ustvarjanje sličic za predloge besedilnih dokumentov OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:45 +msgid "Thumbnail command for OpenDocument wordprocessing documents" +msgstr "Ukaz za ustvarjanje sličic za besedilne dokumente OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:46 +msgid "Thumbnail command for OpenDocument wordprocessing master documents" +msgstr "Ukaz za ustvarjanje sličic za glavne besedilne dokumente OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:47 +msgid "Thumbnail command for OpenOffice 1.x Calc spreadsheets" +msgstr "Ukaz za ustvarjanje sličic za razpredelnice OpenOffice 1.x Calc" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:48 +msgid "Thumbnail command for OpenOffice 1.x Drawing templates" +msgstr "Ukaz za ustvarjanje sličic za predloge risanja OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:49 +msgid "Thumbnail command for OpenOffice 1.x Impress Presentation templates" +msgstr "Ukaz za ustvarjanje sličic za predloge predstavitev OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:50 +msgid "Thumbnail command for OpenOffice 1.x Impress presentations" +msgstr "Ukaz za ustvarjanje sličic za predstavitve OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:51 +msgid "Thumbnail command for OpenOffice 1.x Math documents" +msgstr "Ukaz za ustvarjanje sličic za dokumente OpenOffice 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:52 +msgid "Thumbnail command for OpenOffice 1.x Spreadsheet templates" +msgstr "Ukaz za ustvarjanje sličic za predloge razpredelnic OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:53 +msgid "Thumbnail command for OpenOffice 1.x Writer documents" +msgstr "Ukaz za ustvarjanje sličic za dokumente OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:54 +msgid "Thumbnail command for OpenOffice 1.x Writer global templates" +msgstr "Ukaz za ustvarjanje sličic za splošne predloge OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:55 +msgid "Thumbnail command for OpenOffice 1.x Writer templates" +msgstr "Ukaz za ustvarjanje sličic za predloge OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:56 +msgid "Valid command plus arguments for the Microsoft Excel 2007 spreadsheets." +msgstr "Veljaven ukaz in argumenti za razpredelnice Microsoft Excel 2007." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:57 +msgid "Valid command plus arguments for the Microsoft Excel spreadsheets." +msgstr "Veljaven ukaz in argumenti za razpredelnice Microsoft Excel." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:58 +msgid "Valid command plus arguments for the Microsoft PowerPoint 2007 thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic predstavitev Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:59 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic predstavitev Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:60 +msgid "Valid command plus arguments for the Microsoft Word 2007 thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic dokumentov Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:61 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic dokumentov Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:62 +msgid "Valid command plus arguments for the OpenDocument chart thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic grafov OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:63 +msgid "Valid command plus arguments for the OpenDocument drawing template thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic predlog risanja OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:64 +msgid "Valid command plus arguments for the OpenDocument drawing thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic risb OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:65 +msgid "Valid command plus arguments for the OpenDocument formula thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic formul OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:66 +msgid "Valid command plus arguments for the OpenDocument image thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic slik OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:67 +msgid "Valid command plus arguments for the OpenDocument presentation template thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic predlog predstavitev OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:68 +msgid "Valid command plus arguments for the OpenDocument presentation thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic predstavitev OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:69 +msgid "Valid command plus arguments for the OpenDocument spreadsheet template thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic predlog razpredelnic OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:70 +msgid "Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic razpredelnic OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:71 +msgid "Valid command plus arguments for the OpenDocument wordprocessing document template thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic predlog besedilnih dokumentov OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:72 +msgid "Valid command plus arguments for the OpenDocument wordprocessing document thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic besedilnih dokumentov OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:73 +msgid "Valid command plus arguments for the OpenDocument wordprocessing master document thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic glavnih besedilnih dokumentov OpenDocument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:74 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing template thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic predlog risanja OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:75 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic risb OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:76 +msgid "Valid command plus arguments for the OpenOffice 1.x Impress presentation template thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic predlog predstavitev OpenOffice 1.x Impress" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:77 +msgid "Valid command plus arguments for the OpenOffice 1.x Impress presentation thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic predstavitev OpenOffice 1.x" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:78 +msgid "Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic dokumentov OpenOffice 1.x Math" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:79 +msgid "Valid command plus arguments for the OpenOffice 1.x Writer document thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic dokumentov OpenOffice 1.x Writer." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:80 +msgid "Valid command plus arguments for the OpenOffice 1.x Writer global template thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic splošnih predlog OpenOffice 1.x Writer." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:81 +msgid "Valid command plus arguments for the OpenOffice 1.x Writer template thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic predlog OpenOffice 1.x Writer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:82 +msgid "Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" +msgstr "Veljaven ukaz in argumenti za ustvarjanje sličic razpredelnic OpenOffice 1.x" diff --git a/po/sv.po b/po/sv.po new file mode 100644 index 0000000..6672d7f --- /dev/null +++ b/po/sv.po @@ -0,0 +1,485 @@ +# Swedish translation of libgsf. +# Copyright (C) 2006-2009 Free Software Foundation, Inc. +# This file is distributed under the same license as the libgsf package. +# Daniel Nylander , 2006, 2007, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: libgsf\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-23 15:35+0200\n" +"PO-Revision-Date: 2009-09-23 15:37+0100\n" +"Last-Translator: Daniel Nylander \n" +"Language-Team: Swedish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../gsf/gsf-blob.c:111 +#, c-format +msgid "Not enough memory to copy %s bytes of data" +msgstr "Det finns inte tillräckligt minne för att kopiera %s byte data" + +#: ../gsf/gsf-clip-data.c:153 +#, c-format +msgid "The clip_data is in %s, but it is smaller than at least %s bytes" +msgstr "clip_data är i %s, men det är mindre än %s byte" + +#: ../gsf/gsf-clip-data.c:247 +#, c-format +msgid "The clip_data is in Windows clipboard format, but it is smaller than the required 4 bytes." +msgstr "clip_data är i Windows-urklippsformat, men det är mindre än kravet på 4 byte." + +#: ../gsf/gsf-clip-data.c:258 +msgid "Windows Metafile format" +msgstr "Windows Metafile-format" + +#. CF_BITMAP +#: ../gsf/gsf-clip-data.c:264 +msgid "Windows DIB or BITMAP format" +msgstr "Windows DIB eller BITMAP-format" + +#: ../gsf/gsf-clip-data.c:269 +msgid "Windows Enhanced Metafile format" +msgstr "Windows Enhanced Metafile-format" + +#: ../gsf/gsf-msole-utils.c:315 +#, c-format +msgid "Missing data when reading the %s property; got %s bytes, but %s bytes at least are needed." +msgstr "Data saknas vid läsning av egenskapen %s; fick %s byte men minst %s behövs. " + +#: ../gsf/gsf-msole-utils.c:366 +#, c-format +msgid "Corrupt data in the VT_CF property; clipboard data length must be at least 4 bytes, but the data says it only has %s bytes available." +msgstr "Skadat data i egenskapen VT_CF; urklippets datalängd måste vara minst 4 byte, men datat säger att det endast har %s byte" + +#: ../gsf/gsf-open-pkg-utils.c:351 +#, c-format +msgid "Unable to find part id='%s' for '%s'" +msgstr "Kunde inte hitta delen id=\"%s\" för \"%s\"" + +#: ../gsf/gsf-open-pkg-utils.c:379 +#, c-format +msgid "Unable to find part with type='%s' for '%s'" +msgstr "Kunde inte hitta delen med type=\"%s\" för \"%s\"" + +#: ../gsf/gsf-open-pkg-utils.c:409 +#, c-format +msgid "Missing id for part in '%s'" +msgstr "Saknar id för delen i \"%s\"" + +#: ../gsf/gsf-open-pkg-utils.c:418 +#, c-format +msgid "Part '%s' in '%s' from '%s' is corrupt!" +msgstr "Delen \"%s\" i \"%s\" från \"%s\" är skadad!" + +#: ../tools/gsf.c:22 +msgid "Display program version" +msgstr "Visa programversion" + +#: ../tools/gsf.c:44 +#, c-format +msgid "%s: Failed to open %s: %s\n" +msgstr "%s: Misslyckades med att öppna %s: %s\n" + +#: ../tools/gsf.c:65 +#, c-format +msgid "%s: Failed to recognize %s as an archive\n" +msgstr "%s: Misslyckades med att känna igen %s som ett arkiv\n" + +#: ../tools/gsf.c:102 +#, c-format +msgid "Available subcommands are...\n" +msgstr "Tillgängliga underkommandon är...\n" + +#: ../tools/gsf.c:103 +#, c-format +msgid "* cat output one or more files in archive\n" +msgstr "* cat skriv ut en eller flera filer i arkivet\n" + +#: ../tools/gsf.c:104 +#, c-format +msgid "* dump dump one or more files in archive as hex\n" +msgstr "* dump dumpa en eller flera filer i arkivet som hex\n" + +#: ../tools/gsf.c:105 +#, c-format +msgid "* help list subcommands\n" +msgstr "* help lista underkommandon\n" + +#: ../tools/gsf.c:106 +#, c-format +msgid "* list list files in archive\n" +msgstr "* list lista filer i arkivet\n" + +#: ../tools/gsf.c:107 +#, c-format +msgid "* listprops list document properties in archive\n" +msgstr "* listprops lista dokumentegenskaper i arkiv\n" + +#: ../tools/gsf.c:108 +#, c-format +msgid "* props print specified document properties\n" +msgstr "* props skriv ut angivna dokumentegenskaper\n" + +#: ../tools/gsf.c:291 +#, c-format +msgid "No property named %s\n" +msgstr "Ingen egenskap med namnet %s\n" + +#: ../tools/gsf.c:364 +msgid "SUBCOMMAND ARCHIVE..." +msgstr "UNDERKOMMANDO ARKIV..." + +#: ../tools/gsf.c:371 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"Kör \"%s --help\" för att se en fullständig lista över tillgängliga kommandoradsflaggor.\n" + +#: ../tools/gsf.c:378 +#, c-format +msgid "gsf version %d.%d.%d\n" +msgstr "gsf version %d.%d.%d\n" + +#: ../tools/gsf.c:384 +#, c-format +msgid "Usage: %s %s\n" +msgstr "Användning: %s %s\n" + +#: ../tools/gsf.c:405 +#, c-format +msgid "Run '%s help' to see a list subcommands.\n" +msgstr "Kör \"%s help\" för att se en lista över underkommandon.\n" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails" +msgstr "Booleska flaggor är tillgängliga, sant aktiverar miniatyrbilder och falskt inaktiverar skapandet av nya miniatyrbilder" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing for OpenOffice 1.x Calc spreadsheets" +msgstr "Aktivera skapandet av miniatyrbilder för OpenOffice 1.x Calc-kalkylblad" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing for OpenOffice 1.x Drawing templates" +msgstr "Aktivera skapandet av miniatyrbilder för OpenOffice 1.x Drawing-mallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing for OpenOffice 1.x Impress Presentation templates" +msgstr "Aktivera skapandet av miniatyrbilder för OpenOffice 1.x Impress-presentationsmallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Enable thumbnailing for OpenOffice 1.x Impress presentations" +msgstr "Aktivera skapandet av miniatyrbilder för OpenOffice 1.x Impress-presentationer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Enable thumbnailing for OpenOffice 1.x Math documents" +msgstr "Aktivera skapandet av miniatyrbilder för OpenOffice 1.x Math-dokument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Enable thumbnailing for OpenOffice 1.x Spreadsheet templates" +msgstr "Aktivera skapandet av miniatyrbilder för OpenOffice 1.x-kalkylbladsmallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Enable thumbnailing for OpenOffice 1.x Writer documents" +msgstr "Aktivera skapandet av miniatyrbilder för OpenOffice 1.x Writer-dokument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Enable thumbnailing for OpenOffice 1.x Writer global templates" +msgstr "Aktivera skapandet av miniatyrbilder för globala OpenOffice 1.x Writer-mallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Enable thumbnailing for OpenOffice 1.x Writer templates" +msgstr "Aktivera skapandet av miniatyrbilder för OpenOffice 1.x Writer-mallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:11 +msgid "Enable thumbnailing of Microsoft Excel 2007 spreadsheets" +msgstr "Aktivera skapandet av miniatyrbilder för Microsoft Excel 2007-kalkylblad" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:12 +msgid "Enable thumbnailing of Microsoft Excel spreadsheets" +msgstr "Aktivera skapandet av miniatyrbilder för Microsoft Excel-kalkylblad" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:13 +msgid "Enable thumbnailing of Microsoft PowerPoint 2007 presentations" +msgstr "Aktivera skapandet av miniatyrbilder för Microsoft PowerPoint 2007-presentationer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:14 +msgid "Enable thumbnailing of Microsoft PowerPoint presentations" +msgstr "Aktivera skapandet av miniatyrbilder för Microsoft PowerPoint-presentationer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:15 +msgid "Enable thumbnailing of Microsoft Word 2007 documents" +msgstr "Aktivera skapandet av miniatyrbilder för Microsoft Word 2007-dokument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:16 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "Aktivera skapandet av miniatyrbilder för Microsoft Word-dokument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:17 +msgid "Enable thumbnailing of OpenDocument charts" +msgstr "Aktivera skapandet av miniatyrbilder för OpenDocument-diagram" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:18 +msgid "Enable thumbnailing of OpenDocument drawing templates" +msgstr "Aktivera skapandet av miniatyrbilder för OpenDocument-ritmallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:19 +msgid "Enable thumbnailing of OpenDocument drawings" +msgstr "Aktivera skapandet av miniatyrbilder för OpenDocument-ritningar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:20 +msgid "Enable thumbnailing of OpenDocument formulas" +msgstr "Aktivera skapandet av miniatyrbilder för OpenDocument-formler" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:21 +msgid "Enable thumbnailing of OpenDocument images" +msgstr "Aktivera skapandet av miniatyrbilder för OpenDocument-bilder" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:22 +msgid "Enable thumbnailing of OpenDocument presentation templates" +msgstr "Aktivera skapandet av miniatyrbilder för OpenDocument-presentationsmallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:23 +msgid "Enable thumbnailing of OpenDocument presentations" +msgstr "Aktivera skapandet av miniatyrbilder för OpenDocument-presentationer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:24 +msgid "Enable thumbnailing of OpenDocument spreadsheet templates" +msgstr "Aktivera skapandet av miniatyrbilder för OpenDocument-kalkylbladsmallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:25 +msgid "Enable thumbnailing of OpenDocument spreadsheets" +msgstr "Aktivera skapandet av miniatyrbilder för OpenDocument-kalkylblad" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:26 +msgid "Enable thumbnailing of OpenDocument wordprocessing document templates" +msgstr "Aktivera skapandet av miniatyrbilder för OpenDocument-dokumentmallar för ordbehandling" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:27 +msgid "Enable thumbnailing of OpenDocument wordprocessing documents" +msgstr "Aktivera skapandet av miniatyrbilder för OpenDocument-dokument för ordbehandling" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:28 +msgid "Enable thumbnailing of OpenDocument wordprocessing master documents" +msgstr "Aktivera skapandet av miniatyrbilder för OpenDocument-huvuddokument för ordbehandling" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:29 +msgid "Thumbnail command for Microsoft Excel 2007 spreadsheets" +msgstr "Kommando för miniatyrbild för Microsoft Excel 2007-kalkylblad" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:30 +msgid "Thumbnail command for Microsoft Excel spreadsheets" +msgstr "Kommando för miniatyrbild för Microsoft Excel-kalkylblad" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:31 +msgid "Thumbnail command for Microsoft PowerPoint 2007 presentations" +msgstr "Kommando för miniatyrbild för Microsoft PowerPoint 2007-presentationer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:32 +msgid "Thumbnail command for Microsoft PowerPoint presentations" +msgstr "Kommando för miniatyrbild för Microsoft PowerPoint-presentationer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:33 +msgid "Thumbnail command for Microsoft Word 2007 documents" +msgstr "Kommando för miniatyrbild för Microsoft Word 2007-dokument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:34 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "Kommando för miniatyrbild för Microsoft Word-dokument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:35 +msgid "Thumbnail command for OpenDocument charts" +msgstr "Kommando för miniatyrbild för OpenDocument-diagram" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:36 +msgid "Thumbnail command for OpenDocument drawing templates" +msgstr "Kommando för miniatyrbild för OpenDocument-ritmallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:37 +msgid "Thumbnail command for OpenDocument drawings" +msgstr "Kommando för miniatyrbild för OpenDocument-ritningar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:38 +msgid "Thumbnail command for OpenDocument formulas" +msgstr "Kommando för miniatyrbild för OpenDocument-formler" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:39 +msgid "Thumbnail command for OpenDocument images" +msgstr "Kommando för miniatyrbild för OpenDocument-bilder" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:40 +msgid "Thumbnail command for OpenDocument presentation templates" +msgstr "Kommando för miniatyrbild för OpenDocument-presentationsmallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:41 +msgid "Thumbnail command for OpenDocument presentations" +msgstr "Kommando för miniatyrbild för OpenDocument-presentationer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:42 +msgid "Thumbnail command for OpenDocument spreadsheet templates" +msgstr "Kommando för miniatyrbild för OpenDocument-kalkylbladsmallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:43 +msgid "Thumbnail command for OpenDocument spreadsheets" +msgstr "Kommando för miniatyrbild för OpenDocument-kalkylblad" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:44 +msgid "Thumbnail command for OpenDocument wordprocessing document templates" +msgstr "Kommando för miniatyrbild för OpenDocument-dokumentmallar för ordbehandling" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:45 +msgid "Thumbnail command for OpenDocument wordprocessing documents" +msgstr "Kommando för miniatyrbild för OpenDocument-dokument för ordbehandling" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:46 +msgid "Thumbnail command for OpenDocument wordprocessing master documents" +msgstr "Kommando för miniatyrbild för OpenDocument-huvuddokument för ordbehandling" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:47 +msgid "Thumbnail command for OpenOffice 1.x Calc spreadsheets" +msgstr "Kommando för miniatyrbild för OpenOffice 1.x Calc-kalkylblad" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:48 +msgid "Thumbnail command for OpenOffice 1.x Drawing templates" +msgstr "Kommando för miniatyrbild för OpenOffice 1.x Drawing-mallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:49 +msgid "Thumbnail command for OpenOffice 1.x Impress Presentation templates" +msgstr "Kommando för miniatyrbild för OpenOffice 1.x Impress-presentationsmallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:50 +msgid "Thumbnail command for OpenOffice 1.x Impress presentations" +msgstr "Kommando för miniatyrbild för OpenOffice 1.x Impress-presentationer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:51 +msgid "Thumbnail command for OpenOffice 1.x Math documents" +msgstr "Kommando för miniatyrbild för OpenOffice 1.x Math-dokument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:52 +msgid "Thumbnail command for OpenOffice 1.x Spreadsheet templates" +msgstr "Kommando för miniatyrbild för OpenOffice 1.x Spreadsheet-mallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:53 +msgid "Thumbnail command for OpenOffice 1.x Writer documents" +msgstr "Kommando för miniatyrbild för OpenOffice 1.x Writer-dokument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:54 +msgid "Thumbnail command for OpenOffice 1.x Writer global templates" +msgstr "Kommando för miniatyrbild för globala OpenOffice 1.x Writer-mallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:55 +msgid "Thumbnail command for OpenOffice 1.x Writer templates" +msgstr "Kommando för miniatyrbild för OpenOffice 1.x Writer-mallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:56 +msgid "Valid command plus arguments for the Microsoft Excel 2007 spreadsheets." +msgstr "Giltigt kommando plus argument för Microsoft Excel 2007-kalkylblad." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:57 +msgid "Valid command plus arguments for the Microsoft Excel spreadsheets." +msgstr "Giltigt kommando plus argument för Microsoft Excel-kalkylblad." + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:58 +msgid "Valid command plus arguments for the Microsoft PowerPoint 2007 thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för Microsoft PowerPoint 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:59 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för Microsoft PowerPoint" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:60 +msgid "Valid command plus arguments for the Microsoft Word 2007 thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för Microsoft Word 2007" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:61 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för Microsoft Word" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:62 +msgid "Valid command plus arguments for the OpenDocument chart thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för OpenDocument-diagram" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:63 +msgid "Valid command plus arguments for the OpenDocument drawing template thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för OpenDocument-ritmallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:64 +msgid "Valid command plus arguments for the OpenDocument drawing thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för OpenDocument-ritningar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:65 +msgid "Valid command plus arguments for the OpenDocument formula thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för OpenDocument-formel" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:66 +msgid "Valid command plus arguments for the OpenDocument image thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för OpenDocument-bilder" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:67 +msgid "Valid command plus arguments for the OpenDocument presentation template thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för OpenDocument-presentationsmallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:68 +msgid "Valid command plus arguments for the OpenDocument presentation thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för OpenDocument-presentationer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:69 +msgid "Valid command plus arguments for the OpenDocument spreadsheet template thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för OpenDocument-kalkylbladsmallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:70 +msgid "Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för OpenDocument-kalkylblad" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:71 +msgid "Valid command plus arguments for the OpenDocument wordprocessing document template thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för OpenDocument-dokumentmallar för ordbehandling" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:72 +msgid "Valid command plus arguments for the OpenDocument wordprocessing document thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för OpenDocument-dokument för ordbehandling" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:73 +msgid "Valid command plus arguments for the OpenDocument wordprocessing master document thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för OpenDocument-huvuddokument för ordbehandling" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:74 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing template thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för OpenOffice 1.x Drawing-mallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:75 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för OpenOffice 1.x Drawing" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:76 +msgid "Valid command plus arguments for the OpenOffice 1.x Impress presentation template thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för OpenOffice 1.x Impress-presentationsmallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:77 +msgid "Valid command plus arguments for the OpenOffice 1.x Impress presentation thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för OpenOffice 1.x Impress-presentationer" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:78 +msgid "Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för OpenOffice 1.x Math-dokument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:79 +msgid "Valid command plus arguments for the OpenOffice 1.x Writer document thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för OpenOffice 1.x Writer-dokument" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:80 +msgid "Valid command plus arguments for the OpenOffice 1.x Writer global template thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för globala OpenOffice 1.x Writer-mallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:81 +msgid "Valid command plus arguments for the OpenOffice 1.x Writer template thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för OpenOffice 1.x Writer-mallar" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:82 +msgid "Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" +msgstr "Giltigt kommando plus argument för miniatyrbildskapare för OpenOffice 1.x-kalkylblad" + diff --git a/po/zh_CN.po b/po/zh_CN.po new file mode 100644 index 0000000..752f05b --- /dev/null +++ b/po/zh_CN.po @@ -0,0 +1,532 @@ +# Simplified Chinese translation for libgsf +# Copyright (C) 2009 Free Software Foundation, Inc. +# This file is distributed under the same license as the libgsf package. +# 苏运强 , 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: libgsf\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=libgsf&component=General\n" +"POT-Creation-Date: 2009-11-29 02:23+0000\n" +"PO-Revision-Date: 2009-12-05 00:17+0800\n" +"Last-Translator: 苏运强 \n" +"Language-Team: Simplified Chinese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../gsf/gsf-blob.c:111 +#, c-format +msgid "Not enough memory to copy %s bytes of data" +msgstr "没有足够的内存来复制 %s 字节数据" + +#: ../gsf/gsf-clip-data.c:153 +#, c-format +msgid "The clip_data is in %s, but it is smaller than at least %s bytes" +msgstr "clip_data 是 %s 格式的,但是其小于最小的 %s 字节" + +#: ../gsf/gsf-clip-data.c:247 +#, c-format +msgid "" +"The clip_data is in Windows clipboard format, but it is smaller than the " +"required 4 bytes." +msgstr "clip_data 是 Windows 剪贴板格式,但是其小于要求的 4 字节。" + +#: ../gsf/gsf-clip-data.c:258 +msgid "Windows Metafile format" +msgstr "Windows Metafile 格式" + +#. CF_BITMAP +#: ../gsf/gsf-clip-data.c:264 +msgid "Windows DIB or BITMAP format" +msgstr "Windows DIB 或者 BITMAP 格式" + +#: ../gsf/gsf-clip-data.c:269 +msgid "Windows Enhanced Metafile format" +msgstr "Windows Enhanced Metafile 格式" + +#: ../gsf/gsf-msole-utils.c:315 +#, c-format +msgid "" +"Missing data when reading the %s property; got %s bytes, but %s bytes at " +"least are needed." +msgstr "读取 %s 属性时缺少数据;得到 %s 字节,但是至少需要 %s 字节" + +#: ../gsf/gsf-msole-utils.c:366 +#, c-format +msgid "" +"Corrupt data in the VT_CF property; clipboard data length must be at least 4 " +"bytes, but the data says it only has %s bytes available." +msgstr "" +"VT_CF 属性中有损坏的数据;剪贴板数据长度必须至少为 4 字节,但是此数据声称其只" +"有 %s 字节可用" + +#: ../gsf/gsf-open-pkg-utils.c:351 +#, c-format +msgid "Unable to find part id='%s' for '%s'" +msgstr "无法从 “%2$s” 找到 id=“%1$s” 的部分" + +#: ../gsf/gsf-open-pkg-utils.c:379 +#, c-format +msgid "Unable to find part with type='%s' for '%s'" +msgstr "无法从 “%2$s” 找到 type=“%1$s” 的部分" + +#: ../gsf/gsf-open-pkg-utils.c:409 +#, c-format +msgid "Missing id for part in '%s'" +msgstr "'%s'中的部分缺少 ID" + +#: ../gsf/gsf-open-pkg-utils.c:418 +#, c-format +msgid "Part '%s' in '%s' from '%s' is corrupt!" +msgstr "从 “%3$s” 中获得的 “%2$s” 格式的 “%1$s” 部分损坏!" + +#: ../tools/gsf.c:22 +msgid "Display program version" +msgstr "显示程序版本" + +#: ../tools/gsf.c:44 +#, c-format +msgid "%s: Failed to open %s: %s\n" +msgstr "%s: 打开 %s 失败: %s\n" + +#: ../tools/gsf.c:65 +#, c-format +msgid "%s: Failed to recognize %s as an archive\n" +msgstr "%s:不能将 %s 识别为压缩包\n" + +#: ../tools/gsf.c:102 +#, c-format +msgid "Available subcommands are...\n" +msgstr "可用的子命令是...\n" + +#: ../tools/gsf.c:103 +#, c-format +msgid "* cat output one or more files in archive\n" +msgstr "* cat 输出档案中的一个或多个文件\n" + +#: ../tools/gsf.c:104 +#, c-format +msgid "* dump dump one or more files in archive as hex\n" +msgstr "* dump 以 16 进制格式转储压缩包中的一个或多个文件\n" + +#: ../tools/gsf.c:105 +#, c-format +msgid "* help list subcommands\n" +msgstr "* help 列出子命令\n" + +#: ../tools/gsf.c:106 +#, c-format +msgid "* list list files in archive\n" +msgstr "* list 列出档案中的文件\n" + +#: ../tools/gsf.c:107 +#, c-format +msgid "* listprops list document properties in archive\n" +msgstr "* listprops 列出档案中的文档属性\n" + +#: ../tools/gsf.c:108 +#, c-format +msgid "* props print specified document properties\n" +msgstr "* props 打印指定文档的属性\n" + +#: ../tools/gsf.c:291 +#, c-format +msgid "No property named %s\n" +msgstr "没有名为 %s 的属性\n" + +#: ../tools/gsf.c:364 +msgid "SUBCOMMAND ARCHIVE..." +msgstr "压缩包子命令..." + +#: ../tools/gsf.c:371 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"运行“%s --help”可查看可用的命令行选项的完整列表。\n" + +#: ../tools/gsf.c:378 +#, c-format +msgid "gsf version %d.%d.%d\n" +msgstr "gsf 版本 %d.%d.%d\n" + +#: ../tools/gsf.c:384 +#, c-format +msgid "Usage: %s %s\n" +msgstr "用法: %s %s\n" + +#: ../tools/gsf.c:405 +#, c-format +msgid "Run '%s help' to see a list subcommands.\n" +msgstr "运行 '%s help' 来查看子命令列表。\n" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "" +"Boolean options available, true enables thumbnailing and false disables the " +"creation of new thumbnails" +msgstr "布尔值选项,TRUE 代表允许缩略图,FALSE 代表禁止创建新缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing for OpenOffice 1.x Calc spreadsheets" +msgstr "启用 OpenOffice 1.x Calc 电子表格的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing for OpenOffice 1.x Drawing templates" +msgstr "启用 OpenOffice 1.x 画图模板的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing for OpenOffice 1.x Impress Presentation templates" +msgstr "启用 OpenOffice 1.x 演示模板的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Enable thumbnailing for OpenOffice 1.x Impress presentations" +msgstr "为 OpenOffice 1.x 演示启用缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Enable thumbnailing for OpenOffice 1.x Math documents" +msgstr "为 OpenOffice 1.x 数学文档启用缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Enable thumbnailing for OpenOffice 1.x Spreadsheet templates" +msgstr "启用 OpenOffice 1.x 电子表格模板的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Enable thumbnailing for OpenOffice 1.x Writer documents" +msgstr "启用 OpenOffice 1.x 文字处理文档的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Enable thumbnailing for OpenOffice 1.x Writer global templates" +msgstr "启用 OpenOffice 1.x 文字处理全局模板的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Enable thumbnailing for OpenOffice 1.x Writer templates" +msgstr "启用 OpenOffice 1.x 文字处理模板的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:11 +msgid "Enable thumbnailing of Microsoft Excel 2007 spreadsheets" +msgstr "启用微软 Excel 2007 电子表格的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:12 +msgid "Enable thumbnailing of Microsoft Excel spreadsheets" +msgstr "启用微软 Excel 电子表格的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:13 +msgid "Enable thumbnailing of Microsoft PowerPoint 2007 presentations" +msgstr "启用微软 PowerPoint 2007 演示的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:14 +msgid "Enable thumbnailing of Microsoft PowerPoint presentations" +msgstr "启用 Microsoft PowerPoint 演示的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:15 +msgid "Enable thumbnailing of Microsoft Word 2007 documents" +msgstr "启用微软 Word 2007 文档的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:16 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "启用 Microsoft Word 文档的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:17 +msgid "Enable thumbnailing of OpenDocument charts" +msgstr "启用开放文档图表(OpenDocument charts)的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:18 +msgid "Enable thumbnailing of OpenDocument drawing templates" +msgstr "启用开放文档画图(OpenDocument drawing)模板的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:19 +msgid "Enable thumbnailing of OpenDocument drawings" +msgstr "启用开放文档画图(OpenDocument drawing)的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:20 +msgid "Enable thumbnailing of OpenDocument formulas" +msgstr "启用开放文档公式(OpenDocument formulas)的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:21 +msgid "Enable thumbnailing of OpenDocument images" +msgstr "启用开放文档图像(OpenDocument image)的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:22 +msgid "Enable thumbnailing of OpenDocument presentation templates" +msgstr "启用开放文档演示(OpenDocument presentation)模板的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:23 +msgid "Enable thumbnailing of OpenDocument presentations" +msgstr "启用开放文档演示(OpenDocument presentation)的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:24 +msgid "Enable thumbnailing of OpenDocument spreadsheet templates" +msgstr "启用开放文档电子表格(OpenDocument spreadsheet)模板的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:25 +msgid "Enable thumbnailing of OpenDocument spreadsheets" +msgstr "启用开放文档电子表格(OpenDocument spreadsheet)的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:26 +msgid "Enable thumbnailing of OpenDocument wordprocessing document templates" +msgstr "启用开放文档电子字处理(OpenDocument wordprocessing)文档模板的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:27 +msgid "Enable thumbnailing of OpenDocument wordprocessing documents" +msgstr "启用开放文档电子字处理(OpenDocument wordprocessing)文档的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:28 +msgid "Enable thumbnailing of OpenDocument wordprocessing master documents" +msgstr "启用开放文档电子字处理(OpenDocument wordprocessing)主文档的缩略图" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:29 +msgid "Thumbnail command for Microsoft Excel 2007 spreadsheets" +msgstr "微软 Excel 2007 电子表格的缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:30 +msgid "Thumbnail command for Microsoft Excel spreadsheets" +msgstr "微软 Excel 电子表格的缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:31 +msgid "Thumbnail command for Microsoft PowerPoint 2007 presentations" +msgstr "微软 PowerPoint 2007 演示的缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:32 +msgid "Thumbnail command for Microsoft PowerPoint presentations" +msgstr "微软 PowerPoint 演示的缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:33 +msgid "Thumbnail command for Microsoft Word 2007 documents" +msgstr "微软 Word 2007 文档的缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:34 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "微软 Word 文档的缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:35 +msgid "Thumbnail command for OpenDocument charts" +msgstr "开放文档图表(OpenDocument charts) 缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:36 +msgid "Thumbnail command for OpenDocument drawing templates" +msgstr "开放文档画图(OpenDocument drawing) 模板缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:37 +msgid "Thumbnail command for OpenDocument drawings" +msgstr "开放文档画图(OpenDocument drawing) 缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:38 +msgid "Thumbnail command for OpenDocument formulas" +msgstr "开放文档公式(OpenDocument formulas) 缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:39 +msgid "Thumbnail command for OpenDocument images" +msgstr "开放文档图像(OpenDocument image) 缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:40 +msgid "Thumbnail command for OpenDocument presentation templates" +msgstr "开放文档演示(OpenDocument presentation) 模板缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:41 +msgid "Thumbnail command for OpenDocument presentations" +msgstr "开放文档演示(OpenDocument presentation) 模板缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:42 +msgid "Thumbnail command for OpenDocument spreadsheet templates" +msgstr "开放文档电子表格(OpenDocument spreadsheet) 模板缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:43 +msgid "Thumbnail command for OpenDocument spreadsheets" +msgstr "开放文档电子表格(OpenDocument spreadsheet) 缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:44 +msgid "Thumbnail command for OpenDocument wordprocessing document templates" +msgstr "开放文档字处理(OpenDocument wordprocessing) 文档模板缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:45 +msgid "Thumbnail command for OpenDocument wordprocessing documents" +msgstr "开放文档字处理(OpenDocument wordprocessing) 文档缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:46 +msgid "Thumbnail command for OpenDocument wordprocessing master documents" +msgstr "开放文档字处理(OpenDocument wordprocessing) 主文档缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:47 +msgid "Thumbnail command for OpenOffice 1.x Calc spreadsheets" +msgstr "OpenOffice 1.x 电子表格缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:48 +msgid "Thumbnail command for OpenOffice 1.x Drawing templates" +msgstr "OpenOffice 1.x 画图模板缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:49 +msgid "Thumbnail command for OpenOffice 1.x Impress Presentation templates" +msgstr "OpenOffice 1.x 演示模板缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:50 +msgid "Thumbnail command for OpenOffice 1.x Impress presentations" +msgstr "OpenOffice 1.x 演示缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:51 +msgid "Thumbnail command for OpenOffice 1.x Math documents" +msgstr "OpenOffice 1.x 公式文档缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:52 +msgid "Thumbnail command for OpenOffice 1.x Spreadsheet templates" +msgstr "OpenOffice 1.x 电子表格模板缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:53 +msgid "Thumbnail command for OpenOffice 1.x Writer documents" +msgstr "OpenOffice 1.x 字处理文档缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:54 +msgid "Thumbnail command for OpenOffice 1.x Writer global templates" +msgstr "OpenOffice 1.x 字处理全局模板缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:55 +msgid "Thumbnail command for OpenOffice 1.x Writer templates" +msgstr "OpenOffice 1.x 字处理模板缩略图命令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:56 +msgid "Valid command plus arguments for the Microsoft Excel 2007 spreadsheets." +msgstr "对微软 Excel 2007 电子表格可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:57 +msgid "Valid command plus arguments for the Microsoft Excel spreadsheets." +msgstr "对微软 Excel 电子表格可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:58 +msgid "" +"Valid command plus arguments for the Microsoft PowerPoint 2007 thumbnailer" +msgstr "对微软 PowerPoint 2007 缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:59 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" +msgstr "对微软 PowerPoint 缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:60 +msgid "Valid command plus arguments for the Microsoft Word 2007 thumbnailer" +msgstr "对微软 Word 2007 缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:61 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer" +msgstr "对微软 Word 缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:62 +msgid "Valid command plus arguments for the OpenDocument chart thumbnailer" +msgstr "对开放文档图表(OpenDocument chart) 缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:63 +msgid "" +"Valid command plus arguments for the OpenDocument drawing template " +"thumbnailer" +msgstr "对开放文档画图(OpenDocument drawing) 模板缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:64 +msgid "Valid command plus arguments for the OpenDocument drawing thumbnailer" +msgstr "对开放文档画图(OpenDocument drawing) 缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:65 +msgid "Valid command plus arguments for the OpenDocument formula thumbnailer" +msgstr "对开放文档公式(OpenDocument formula) 缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:66 +msgid "Valid command plus arguments for the OpenDocument image thumbnailer" +msgstr "对开放文档图像(OpenDocument chart) 缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:67 +msgid "" +"Valid command plus arguments for the OpenDocument presentation template " +"thumbnailer" +msgstr "" +"对开放文档演示(OpenDocument presentation) 模板缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:68 +msgid "" +"Valid command plus arguments for the OpenDocument presentation thumbnailer" +msgstr "对开放文档演示(OpenDocument presentation) 缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:69 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet template " +"thumbnailer" +msgstr "" +"对开放文档电子表格(OpenDocument spreadsheet) 模板缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:70 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" +msgstr "" +"对开放文档电子表格(OpenDocument spreadsheet) 缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:71 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"template thumbnailer" +msgstr "" +"对开放文档字处理OpenDocument wordprocessing)文档模板缩略图可用的命令和参数组" +"合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:72 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"thumbnailer" +msgstr "" +"对开放文档字处理(OpenDocument wordprocessing) 文档缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:73 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing master " +"document thumbnailer" +msgstr "" +"对开放文档字处理(OpenDocument wordprocessing) 主文档缩略图可用的命令和参数组" +"合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:74 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Drawing template " +"thumbnailer" +msgstr "对 OpenOffice 1.x 画图模板缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:75 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" +msgstr "对 OpenOffice 1.x 画图缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:76 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"template thumbnailer" +msgstr "对 OpenOffice 1.x 演示模板缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:77 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"thumbnailer" +msgstr "对 OpenOffice 1.x 演示缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:78 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" +msgstr "对 OpenOffice 1.x 公式文档缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:79 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer document " +"thumbnailer" +msgstr "对 OpenOffice 1.x 字处理文档缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:80 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer global template " +"thumbnailer" +msgstr "对 OpenOffice 1.x 字处理全局模板模板缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:81 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer template " +"thumbnailer" +msgstr "对 OpenOffice 1.x 字处理模板模板缩略图可用的命令和参数组合" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:82 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" +msgstr "对 OpenOffice 1.x 电子表格缩略图可用的命令和参数组合" diff --git a/po/zh_HK.po b/po/zh_HK.po new file mode 100644 index 0000000..d5e5cb0 --- /dev/null +++ b/po/zh_HK.po @@ -0,0 +1,443 @@ +# Chinese (Hong Kong) translation of libgsf. +# Copyright (C) 2007 Free Software Foundation, Inc. +# Abel Cheung , 2007. +# +msgid "" +msgstr "" +"Project-Id-Version: libgsf 1.14.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2007-03-19 06:05+0800\n" +"PO-Revision-Date: 2007-03-19 09:57+0800\n" +"Last-Translator: Abel Cheung \n" +"Language-Team: Chinese (Hong Kong) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../gsf/gsf-blob.c:108 +msgid "Not enough memory to copy %" +msgstr "記憶體不足以複製 %" + +#: ../gsf/gsf-clip-data.c:149 +msgid "The clip_data is in %s, but it is smaller than at least %" +msgstr "" + +#: ../gsf/gsf-clip-data.c:234 +msgid "" +"The clip_data is in Windows clipboard format, but it is smaller than the " +"required 4 bytes." +msgstr "" +"clip_data 的格式為微軟的剪貼簿格式,但小於最低限度的 4 位元組" + +#: ../gsf/gsf-clip-data.c:245 +msgid "Windows Metafile format" +msgstr "微軟 Metafile 格式" + +#. CF_BITMAP +#: ../gsf/gsf-clip-data.c:251 +msgid "Windows DIB or BITMAP format" +msgstr "微軟 DIB 或 BITMAP 格式" + +#: ../gsf/gsf-clip-data.c:256 +msgid "Windows Enhanced Metafile format" +msgstr "微軟 EMF 格式" + +#: ../gsf/gsf-msole-utils.c:284 +msgid "Missing data when reading the %s property; got %" +msgstr "" + +#: ../gsf/gsf-msole-utils.c:330 +msgid "" +"Corrupt data in the VT_CF property; clipboard data length must be at least 4 " +"bytes, but the data says it only has %" +msgstr "" +"VT_CF 屬性含有損壞的資料;剪貼簿長度必須至少有 4 位元組,但資料只有 %" + +#: ../tools/gsf.c:21 +msgid "Display program version" +msgstr "顯示程式版本" + +#: ../tools/gsf.c:43 +#, c-format +msgid "%s: Failed to open %s: %s\n" +msgstr "%s:無法開啟 %s:%s\n" + +#: ../tools/gsf.c:60 +#, c-format +msgid "%s: Failed to recognize %s as an archive\n" +msgstr "%s:無法辨別 %s 為壓縮檔\n" + +#: ../tools/gsf.c:97 +msgid "Available subcommands are...\n" +msgstr "可使用的副指令為...\n" + +#: ../tools/gsf.c:98 +msgid "* cat output one or more files in archive\n" +msgstr "* cat 輸出壓縮檔中的一個或多個檔案\n" + +#: ../tools/gsf.c:99 +msgid "* dump dump one or more files in archive as hex\n" +msgstr "* dump 以 16 進位形式輸出壓縮檔中一個或多個檔案的內容\n" + +#: ../tools/gsf.c:100 +msgid "* help list subcommands\n" +msgstr "* help 列出副指令\n" + +#: ../tools/gsf.c:101 +msgid "* list list files in archive\n" +msgstr "* list 列出壓縮檔中的檔案\n" + +#: ../tools/gsf.c:102 +msgid "* props archive list of property names\n" +msgstr "" + +#: ../tools/gsf.c:295 +msgid "SUBCOMMAND ARCHIVE..." +msgstr "副指令 壓縮檔..." + +# (Abel) 太長氣 +#: ../tools/gsf.c:302 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"請執行 ‘%s --help’ 列出所有選項。\n" + +#: ../tools/gsf.c:309 +#, c-format +msgid "gsf version %d.%d.%d\n" +msgstr "gsf %d.%d.%d 版本\n" + +#: ../tools/gsf.c:315 +#, c-format +msgid "Usage: %s %s\n" +msgstr "用法: %s %s\n" + +#: ../tools/gsf.c:334 +#, c-format +msgid "Run '%s help' to see a list subcommands.\n" +msgstr "請執行 ‘%s help’ 列出可使用的副指令。\n" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "" +"Boolean options available, true enables thumbnailing and false disables the " +"creation of new thumbnails" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing for OpenOffice 1.x Calc spreadsheets" +msgstr "啟用產生 OpenOffice 1.x 試算表的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing for OpenOffice 1.x Drawing templates" +msgstr "啟用產生 OpenOffice 1.x 繪圖樣式的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing for OpenOffice 1.x Impress Presentation templates" +msgstr "啟用產生 OpenOffice 1.x 簡報樣式的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Enable thumbnailing for OpenOffice 1.x Impress presentations" +msgstr "啟用產生 OpenOffice 1.x 簡報的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Enable thumbnailing for OpenOffice 1.x Math documents" +msgstr "啟用產生 OpenOffice 1.x 數式檔的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Enable thumbnailing for OpenOffice 1.x Spreadsheet templates" +msgstr "啟用產生 OpenOffice 1.x 試算表樣式的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Enable thumbnailing for OpenOffice 1.x Writer documents" +msgstr "啟用產生 OpenOffice 1.x 文書的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Enable thumbnailing for OpenOffice 1.x Writer global templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Enable thumbnailing for OpenOffice 1.x Writer templates" +msgstr "啟用產生 OpenOffice 1.x 文書樣式的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:11 +msgid "Enable thumbnailing of Microsoft Excel spreadsheets" +msgstr "啟用產生微軟 Excel 試算表的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:12 +msgid "Enable thumbnailing of Microsoft PowerPoint presentations" +msgstr "啟用產生微軟 PowerPoint 簡報的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:13 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "啟用產生微軟 Word 文件的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:14 +msgid "Enable thumbnailing of OpenDocument charts" +msgstr "啟用產生 OpenDocument 圖表的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:15 +msgid "Enable thumbnailing of OpenDocument drawing templates" +msgstr "啟用產生 OpenDocument 繪圖檔的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:16 +msgid "Enable thumbnailing of OpenDocument drawings" +msgstr "啟用產生 OpenDocument 繪圖樣式的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:17 +msgid "Enable thumbnailing of OpenDocument formulas" +msgstr "啟用產生 OpenDocument 數式的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:18 +msgid "Enable thumbnailing of OpenDocument images" +msgstr "啟用產生 OpenDocument 圖片的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:19 +msgid "Enable thumbnailing of OpenDocument presentation templates" +msgstr "啟用產生 OpenDocument 簡報樣式的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:20 +msgid "Enable thumbnailing of OpenDocument presentations" +msgstr "啟用產生 OpenDocument 簡報的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:21 +msgid "Enable thumbnailing of OpenDocument spreadsheet templates" +msgstr "啟用產生 OpenDocument 試算表樣式的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:22 +msgid "Enable thumbnailing of OpenDocument spreadsheets" +msgstr "啟用產生 OpenDocument 試算表的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:23 +msgid "Enable thumbnailing of OpenDocument wordprocessing document templates" +msgstr "啟用產生 OpenDocument 文書樣式的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:24 +msgid "Enable thumbnailing of OpenDocument wordprocessing documents" +msgstr "啟用產生 OpenDocument 文書的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:25 +msgid "Enable thumbnailing of OpenDocument wordprocessing master documents" +msgstr "啟用產生 OpenDocument 主控文件的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:26 +msgid "Thumbnail command for Microsoft Excel spreadsheets" +msgstr "用作產生微軟 Excel 試算表縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:27 +msgid "Thumbnail command for Microsoft PowerPoint presentations" +msgstr "用作產生微軟 PowerPoint 簡報縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:28 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "用作產生微軟 Word 文件縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:29 +msgid "Thumbnail command for OpenDocument charts" +msgstr "用作產生 OpenDocument 圖表縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:30 +msgid "Thumbnail command for OpenDocument drawing templates" +msgstr "用作產生 OpenDocument 繪圖樣式縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:31 +msgid "Thumbnail command for OpenDocument drawings" +msgstr "用作產生 OpenDocument 繪圖縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:32 +msgid "Thumbnail command for OpenDocument formulas" +msgstr "用作產生 OpenDocument 數式縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:33 +msgid "Thumbnail command for OpenDocument images" +msgstr "用作產生 OpenDocument 圖片縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:34 +msgid "Thumbnail command for OpenDocument presentation templates" +msgstr "用作產生 OpenDocument 簡報樣式縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:35 +msgid "Thumbnail command for OpenDocument presentations" +msgstr "用作產生 OpenDocument 簡報縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:36 +msgid "Thumbnail command for OpenDocument spreadsheet templates" +msgstr "用作產生 OpenDocument 試算表樣式縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:37 +msgid "Thumbnail command for OpenDocument spreadsheets" +msgstr "用作產生 OpenDocument 試算表縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:38 +msgid "Thumbnail command for OpenDocument wordprocessing document templates" +msgstr "用作產生 OpenDocument 文書樣式縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:39 +msgid "Thumbnail command for OpenDocument wordprocessing documents" +msgstr "用作產生 OpenDocument 文書縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:40 +msgid "Thumbnail command for OpenDocument wordprocessing master documents" +msgstr "用作產生 OpenDocument 主控文件縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:41 +msgid "Thumbnail command for OpenOffice 1.x Calc spreadsheets" +msgstr "用作產生 OpenOffice 1.x 試算表縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:42 +msgid "Thumbnail command for OpenOffice 1.x Drawing templates" +msgstr "用作產生 OpenOffice 1.x 繪圖縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:43 +msgid "Thumbnail command for OpenOffice 1.x Impress Presentation templates" +msgstr "用作產生 OpenOffice 1.x 簡報樣式縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:44 +msgid "Thumbnail command for OpenOffice 1.x Impress presentations" +msgstr "用作產生 OpenOffice 1.x 簡報縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:45 +msgid "Thumbnail command for OpenOffice 1.x Math documents" +msgstr "用作產生 OpenOffice 1.x 數式縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:46 +msgid "Thumbnail command for OpenOffice 1.x Spreadsheet templates" +msgstr "用作產生 OpenOffice 1.x 試算表縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:47 +msgid "Thumbnail command for OpenOffice 1.x Writer documents" +msgstr "用作產生 OpenOffice 1.x 文書縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:48 +msgid "Thumbnail command for OpenOffice 1.x Writer global templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:49 +msgid "Thumbnail command for OpenOffice 1.x Writer templates" +msgstr "用作產生 OpenOffice 1.x 文書樣式縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:50 +msgid "Valid command plus arguments for the Microsoft Excel spreadsheets." +msgstr "產生微軟 Excel 試算表縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:51 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" +msgstr "產生微軟 PowerPoint 簡報縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:52 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer" +msgstr "產生微軟 Word 文書縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:53 +msgid "Valid command plus arguments for the OpenDocument chart thumbnailer" +msgstr "產生 OpenDocument 圖表縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:54 +msgid "" +"Valid command plus arguments for the OpenDocument drawing template " +"thumbnailer" +msgstr "產生 OpenDocument 繪圖樣式縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:55 +msgid "Valid command plus arguments for the OpenDocument drawing thumbnailer" +msgstr "產生 OpenDocument 繪圖縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:56 +msgid "Valid command plus arguments for the OpenDocument formula thumbnailer" +msgstr "產生 OpenDocument 數式縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:57 +msgid "Valid command plus arguments for the OpenDocument image thumbnailer" +msgstr "產生 OpenDocument 圖片縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:58 +msgid "" +"Valid command plus arguments for the OpenDocument presentation template " +"thumbnailer" +msgstr "產生 OpenDocument 簡報樣式縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:59 +msgid "" +"Valid command plus arguments for the OpenDocument presentation thumbnailer" +msgstr "產生 OpenDocument 簡報縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:60 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet template " +"thumbnailer" +msgstr "產生 OpenDocument 試算表樣式縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:61 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" +msgstr "產生 OpenDocument 試算表縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:62 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"template thumbnailer" +msgstr "產生 OpenDocument 文書樣式縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:63 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"thumbnailer" +msgstr "產生 OpenDocument 文書縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:64 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing master " +"document thumbnailer" +msgstr "產生 OpenDocument 主控文件縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:65 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Drawing template " +"thumbnailer" +msgstr "產生 OpenOffice 1.x 繪圖樣式縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:66 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" +msgstr "產生 OpenOffice 1.x 繪圖縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:67 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"template thumbnailer" +msgstr "產生 OpenOffice 1.x 簡報樣式縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:68 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"thumbnailer" +msgstr "產生 OpenOffice 1.x 簡報縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:69 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" +msgstr "產生 OpenOffice 1.x 數式縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:70 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer document " +"thumbnailer" +msgstr "產生 OpenOffice 1.x 文書縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:71 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer global template " +"thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:72 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer template " +"thumbnailer" +msgstr "產生 OpenOffice 1.x 文書樣式縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:73 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" +msgstr "產生 OpenOffice 1.x 試算表縮圖所用的指令加上參數。" diff --git a/po/zh_TW.po b/po/zh_TW.po new file mode 100644 index 0000000..bfe4e43 --- /dev/null +++ b/po/zh_TW.po @@ -0,0 +1,441 @@ +# Chinese (Taiwan) translation of libgsf. +# Copyright (C) 2007 Free Software Foundation, Inc. +# Abel Cheung , 2007. +# +msgid "" +msgstr "" +"Project-Id-Version: libgsf 1.14.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2007-03-19 06:05+0800\n" +"PO-Revision-Date: 2007-03-19 09:57+0800\n" +"Last-Translator: Abel Cheung \n" +"Language-Team: Chinese (Taiwan) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../gsf/gsf-blob.c:108 +msgid "Not enough memory to copy %" +msgstr "記憶體不足以複製 %" + +#: ../gsf/gsf-clip-data.c:149 +msgid "The clip_data is in %s, but it is smaller than at least %" +msgstr "" + +#: ../gsf/gsf-clip-data.c:234 +msgid "" +"The clip_data is in Windows clipboard format, but it is smaller than the " +"required 4 bytes." +msgstr "clip_data 的格式為微軟的剪貼簿格式,但小於最低限度的 4 位元組" + +#: ../gsf/gsf-clip-data.c:245 +msgid "Windows Metafile format" +msgstr "微軟 Metafile 格式" + +#. CF_BITMAP +#: ../gsf/gsf-clip-data.c:251 +msgid "Windows DIB or BITMAP format" +msgstr "微軟 DIB 或 BITMAP 格式" + +#: ../gsf/gsf-clip-data.c:256 +msgid "Windows Enhanced Metafile format" +msgstr "微軟 EMF 格式" + +#: ../gsf/gsf-msole-utils.c:284 +msgid "Missing data when reading the %s property; got %" +msgstr "" + +#: ../gsf/gsf-msole-utils.c:330 +msgid "" +"Corrupt data in the VT_CF property; clipboard data length must be at least 4 " +"bytes, but the data says it only has %" +msgstr "VT_CF 屬性含有損壞的資料;剪貼簿長度必須至少有 4 位元組,但資料只有 %" + +#: ../tools/gsf.c:21 +msgid "Display program version" +msgstr "顯示程式版本" + +#: ../tools/gsf.c:43 +#, c-format +msgid "%s: Failed to open %s: %s\n" +msgstr "%s:無法開啟 %s:%s\n" + +#: ../tools/gsf.c:60 +#, c-format +msgid "%s: Failed to recognize %s as an archive\n" +msgstr "%s:無法辨別 %s 為壓縮檔\n" + +#: ../tools/gsf.c:97 +msgid "Available subcommands are...\n" +msgstr "可使用的副指令為...\n" + +#: ../tools/gsf.c:98 +msgid "* cat output one or more files in archive\n" +msgstr "* cat 輸出壓縮檔中的一個或多個檔案\n" + +#: ../tools/gsf.c:99 +msgid "* dump dump one or more files in archive as hex\n" +msgstr "* dump 以 16 進位形式輸出壓縮檔中一個或多個檔案的內容\n" + +#: ../tools/gsf.c:100 +msgid "* help list subcommands\n" +msgstr "* help 列出副指令\n" + +#: ../tools/gsf.c:101 +msgid "* list list files in archive\n" +msgstr "* list 列出壓縮檔中的檔案\n" + +#: ../tools/gsf.c:102 +msgid "* props archive list of property names\n" +msgstr "" + +#: ../tools/gsf.c:295 +msgid "SUBCOMMAND ARCHIVE..." +msgstr "副指令 壓縮檔..." + +# (Abel) 太長氣 +#: ../tools/gsf.c:302 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"請執行 ‘%s --help’ 列出所有選項。\n" + +#: ../tools/gsf.c:309 +#, c-format +msgid "gsf version %d.%d.%d\n" +msgstr "gsf %d.%d.%d 版本\n" + +#: ../tools/gsf.c:315 +#, c-format +msgid "Usage: %s %s\n" +msgstr "用法: %s %s\n" + +#: ../tools/gsf.c:334 +#, c-format +msgid "Run '%s help' to see a list subcommands.\n" +msgstr "請執行 ‘%s help’ 列出可使用的副指令。\n" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:1 +msgid "" +"Boolean options available, true enables thumbnailing and false disables the " +"creation of new thumbnails" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:2 +msgid "Enable thumbnailing for OpenOffice 1.x Calc spreadsheets" +msgstr "啟用產生 OpenOffice 1.x 試算表的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:3 +msgid "Enable thumbnailing for OpenOffice 1.x Drawing templates" +msgstr "啟用產生 OpenOffice 1.x 繪圖樣式的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:4 +msgid "Enable thumbnailing for OpenOffice 1.x Impress Presentation templates" +msgstr "啟用產生 OpenOffice 1.x 簡報樣式的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:5 +msgid "Enable thumbnailing for OpenOffice 1.x Impress presentations" +msgstr "啟用產生 OpenOffice 1.x 簡報的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:6 +msgid "Enable thumbnailing for OpenOffice 1.x Math documents" +msgstr "啟用產生 OpenOffice 1.x 算式檔的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:7 +msgid "Enable thumbnailing for OpenOffice 1.x Spreadsheet templates" +msgstr "啟用產生 OpenOffice 1.x 試算表樣式的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:8 +msgid "Enable thumbnailing for OpenOffice 1.x Writer documents" +msgstr "啟用產生 OpenOffice 1.x 文書的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:9 +msgid "Enable thumbnailing for OpenOffice 1.x Writer global templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:10 +msgid "Enable thumbnailing for OpenOffice 1.x Writer templates" +msgstr "啟用產生 OpenOffice 1.x 文書樣式的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:11 +msgid "Enable thumbnailing of Microsoft Excel spreadsheets" +msgstr "啟用產生微軟 Excel 試算表的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:12 +msgid "Enable thumbnailing of Microsoft PowerPoint presentations" +msgstr "啟用產生微軟 PowerPoint 簡報的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:13 +msgid "Enable thumbnailing of Microsoft Word documents" +msgstr "啟用產生微軟 Word 文件的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:14 +msgid "Enable thumbnailing of OpenDocument charts" +msgstr "啟用產生 OpenDocument 圖表的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:15 +msgid "Enable thumbnailing of OpenDocument drawing templates" +msgstr "啟用產生 OpenDocument 繪圖檔的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:16 +msgid "Enable thumbnailing of OpenDocument drawings" +msgstr "啟用產生 OpenDocument 繪圖樣式的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:17 +msgid "Enable thumbnailing of OpenDocument formulas" +msgstr "啟用產生 OpenDocument 算式的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:18 +msgid "Enable thumbnailing of OpenDocument images" +msgstr "啟用產生 OpenDocument 圖片的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:19 +msgid "Enable thumbnailing of OpenDocument presentation templates" +msgstr "啟用產生 OpenDocument 簡報樣式的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:20 +msgid "Enable thumbnailing of OpenDocument presentations" +msgstr "啟用產生 OpenDocument 簡報的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:21 +msgid "Enable thumbnailing of OpenDocument spreadsheet templates" +msgstr "啟用產生 OpenDocument 試算表樣式的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:22 +msgid "Enable thumbnailing of OpenDocument spreadsheets" +msgstr "啟用產生 OpenDocument 試算表的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:23 +msgid "Enable thumbnailing of OpenDocument wordprocessing document templates" +msgstr "啟用產生 OpenDocument 文書樣式的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:24 +msgid "Enable thumbnailing of OpenDocument wordprocessing documents" +msgstr "啟用產生 OpenDocument 文書的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:25 +msgid "Enable thumbnailing of OpenDocument wordprocessing master documents" +msgstr "啟用產生 OpenDocument 主控文件的縮圖的功能" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:26 +msgid "Thumbnail command for Microsoft Excel spreadsheets" +msgstr "用作產生微軟 Excel 試算表縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:27 +msgid "Thumbnail command for Microsoft PowerPoint presentations" +msgstr "用作產生微軟 PowerPoint 簡報縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:28 +msgid "Thumbnail command for Microsoft Word documents" +msgstr "用作產生微軟 Word 文件縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:29 +msgid "Thumbnail command for OpenDocument charts" +msgstr "用作產生 OpenDocument 圖表縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:30 +msgid "Thumbnail command for OpenDocument drawing templates" +msgstr "用作產生 OpenDocument 繪圖樣式縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:31 +msgid "Thumbnail command for OpenDocument drawings" +msgstr "用作產生 OpenDocument 繪圖縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:32 +msgid "Thumbnail command for OpenDocument formulas" +msgstr "用作產生 OpenDocument 算式縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:33 +msgid "Thumbnail command for OpenDocument images" +msgstr "用作產生 OpenDocument 圖片縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:34 +msgid "Thumbnail command for OpenDocument presentation templates" +msgstr "用作產生 OpenDocument 簡報樣式縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:35 +msgid "Thumbnail command for OpenDocument presentations" +msgstr "用作產生 OpenDocument 簡報縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:36 +msgid "Thumbnail command for OpenDocument spreadsheet templates" +msgstr "用作產生 OpenDocument 試算表樣式縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:37 +msgid "Thumbnail command for OpenDocument spreadsheets" +msgstr "用作產生 OpenDocument 試算表縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:38 +msgid "Thumbnail command for OpenDocument wordprocessing document templates" +msgstr "用作產生 OpenDocument 文書樣式縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:39 +msgid "Thumbnail command for OpenDocument wordprocessing documents" +msgstr "用作產生 OpenDocument 文書縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:40 +msgid "Thumbnail command for OpenDocument wordprocessing master documents" +msgstr "用作產生 OpenDocument 主控文件縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:41 +msgid "Thumbnail command for OpenOffice 1.x Calc spreadsheets" +msgstr "用作產生 OpenOffice 1.x 試算表縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:42 +msgid "Thumbnail command for OpenOffice 1.x Drawing templates" +msgstr "用作產生 OpenOffice 1.x 繪圖縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:43 +msgid "Thumbnail command for OpenOffice 1.x Impress Presentation templates" +msgstr "用作產生 OpenOffice 1.x 簡報樣式縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:44 +msgid "Thumbnail command for OpenOffice 1.x Impress presentations" +msgstr "用作產生 OpenOffice 1.x 簡報縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:45 +msgid "Thumbnail command for OpenOffice 1.x Math documents" +msgstr "用作產生 OpenOffice 1.x 算式縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:46 +msgid "Thumbnail command for OpenOffice 1.x Spreadsheet templates" +msgstr "用作產生 OpenOffice 1.x 試算表縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:47 +msgid "Thumbnail command for OpenOffice 1.x Writer documents" +msgstr "用作產生 OpenOffice 1.x 文書縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:48 +msgid "Thumbnail command for OpenOffice 1.x Writer global templates" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:49 +msgid "Thumbnail command for OpenOffice 1.x Writer templates" +msgstr "用作產生 OpenOffice 1.x 文書樣式縮圖的指令" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:50 +msgid "Valid command plus arguments for the Microsoft Excel spreadsheets." +msgstr "產生微軟 Excel 試算表縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:51 +msgid "Valid command plus arguments for the Microsoft PowerPoint thumbnailer" +msgstr "產生微軟 PowerPoint 簡報縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:52 +msgid "Valid command plus arguments for the Microsoft Word thumbnailer" +msgstr "產生微軟 Word 文書縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:53 +msgid "Valid command plus arguments for the OpenDocument chart thumbnailer" +msgstr "產生 OpenDocument 圖表縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:54 +msgid "" +"Valid command plus arguments for the OpenDocument drawing template " +"thumbnailer" +msgstr "產生 OpenDocument 繪圖樣式縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:55 +msgid "Valid command plus arguments for the OpenDocument drawing thumbnailer" +msgstr "產生 OpenDocument 繪圖縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:56 +msgid "Valid command plus arguments for the OpenDocument formula thumbnailer" +msgstr "產生 OpenDocument 算式縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:57 +msgid "Valid command plus arguments for the OpenDocument image thumbnailer" +msgstr "產生 OpenDocument 圖片縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:58 +msgid "" +"Valid command plus arguments for the OpenDocument presentation template " +"thumbnailer" +msgstr "產生 OpenDocument 簡報樣式縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:59 +msgid "" +"Valid command plus arguments for the OpenDocument presentation thumbnailer" +msgstr "產生 OpenDocument 簡報縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:60 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet template " +"thumbnailer" +msgstr "產生 OpenDocument 試算表樣式縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:61 +msgid "" +"Valid command plus arguments for the OpenDocument spreadsheet thumbnailer" +msgstr "產生 OpenDocument 試算表縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:62 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"template thumbnailer" +msgstr "產生 OpenDocument 文書樣式縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:63 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing document " +"thumbnailer" +msgstr "產生 OpenDocument 文書縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:64 +msgid "" +"Valid command plus arguments for the OpenDocument wordprocessing master " +"document thumbnailer" +msgstr "產生 OpenDocument 主控文件縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:65 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Drawing template " +"thumbnailer" +msgstr "產生 OpenOffice 1.x 繪圖樣式縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:66 +msgid "Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer" +msgstr "產生 OpenOffice 1.x 繪圖縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:67 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"template thumbnailer" +msgstr "產生 OpenOffice 1.x 簡報樣式縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:68 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Impress presentation " +"thumbnailer" +msgstr "產生 OpenOffice 1.x 簡報縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:69 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer" +msgstr "產生 OpenOffice 1.x 算式縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:70 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer document " +"thumbnailer" +msgstr "產生 OpenOffice 1.x 文書縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:71 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer global template " +"thumbnailer" +msgstr "" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:72 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x Writer template " +"thumbnailer" +msgstr "產生 OpenOffice 1.x 文書樣式縮圖所用的指令加上參數。" + +#: ../thumbnailer/gsf-office-thumbnailer.schemas.in.h:73 +msgid "" +"Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer" +msgstr "產生 OpenOffice 1.x 試算表縮圖所用的指令加上參數。" diff --git a/py-compile b/py-compile new file mode 100755 index 0000000..3f9d05b --- /dev/null +++ b/py-compile @@ -0,0 +1,146 @@ +#!/bin/sh +# py-compile - Compile a Python program + +scriptversion=2009-04-28.21; # UTC + +# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009 Free Software +# Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +if [ -z "$PYTHON" ]; then + PYTHON=python +fi + +basedir= +destdir= +files= +while test $# -ne 0; do + case "$1" in + --basedir) + basedir=$2 + if test -z "$basedir"; then + echo "$0: Missing argument to --basedir." 1>&2 + exit 1 + fi + shift + ;; + --destdir) + destdir=$2 + if test -z "$destdir"; then + echo "$0: Missing argument to --destdir." 1>&2 + exit 1 + fi + shift + ;; + -h|--h*) + cat <<\EOF +Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..." + +Byte compile some python scripts FILES. Use --destdir to specify any +leading directory path to the FILES that you don't want to include in the +byte compiled file. Specify --basedir for any additional path information you +do want to be shown in the byte compiled file. + +Example: + py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py + +Report bugs to . +EOF + exit $? + ;; + -v|--v*) + echo "py-compile $scriptversion" + exit $? + ;; + *) + files="$files $1" + ;; + esac + shift +done + +if test -z "$files"; then + echo "$0: No files given. Try \`$0 --help' for more information." 1>&2 + exit 1 +fi + +# if basedir was given, then it should be prepended to filenames before +# byte compilation. +if [ -z "$basedir" ]; then + pathtrans="path = file" +else + pathtrans="path = os.path.join('$basedir', file)" +fi + +# if destdir was given, then it needs to be prepended to the filename to +# byte compile but not go into the compiled file. +if [ -z "$destdir" ]; then + filetrans="filepath = path" +else + filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)" +fi + +$PYTHON -c " +import sys, os, py_compile + +files = '''$files''' + +sys.stdout.write('Byte-compiling python modules...\n') +for file in files.split(): + $pathtrans + $filetrans + if not os.path.exists(filepath) or not (len(filepath) >= 3 + and filepath[-3:] == '.py'): + continue + sys.stdout.write(file) + sys.stdout.flush() + py_compile.compile(filepath, filepath + 'c', path) +sys.stdout.write('\n')" || exit $? + +# this will fail for python < 1.5, but that doesn't matter ... +$PYTHON -O -c " +import sys, os, py_compile + +files = '''$files''' +sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n') +for file in files.split(): + $pathtrans + $filetrans + if not os.path.exists(filepath) or not (len(filepath) >= 3 + and filepath[-3:] == '.py'): + continue + sys.stdout.write(file) + sys.stdout.flush() + py_compile.compile(filepath, filepath + 'o', path) +sys.stdout.write('\n')" 2>/dev/null || : + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/python/ChangeLog b/python/ChangeLog new file mode 100644 index 0000000..0c13525 --- /dev/null +++ b/python/ChangeLog @@ -0,0 +1,375 @@ +2011-05-20 Morten Welinder + + * Release 1.14.21 + +2011-03-28 Morten Welinder + + * gsfgnomemodule.c: declare pygsfgnome_register_classes. Fixes + #645778. + +2011-03-24 Morten Welinder + + * Release 1.14.20 + +2010-09-25 Morten Welinder + + * Release 1.14.19 + +2010-04-07 Morten Welinder + + * Release 1.14.18 + +2010-02-13 Morten Welinder + + * Release 1.14.17 + +2010-01-27 Morten Welinder + + * gsfgnome.override: Don't call gnome_vfs_init is we're using gio. + #599973. + +2009-10-11 Morten Welinder + + * Release 1.14.16 + +2009-06-20 Morten Welinder + + * Release 1.14.15 + +2009-05-23 Morten Welinder + + * Release 1.14.14 + +2009-05-06 Morten Welinder + + * Release 1.14.13 + +2009-04-25 Morten Welinder + + * Release 1.14.12 + +2009-01-06 Jody Goldberg + + * Release 1.14.11 + +2008-10-19 Jody Goldberg + + * Release 1.14.10 + +2008-08-29 Jody Goldberg + + * Release 1.14.9 + +2008-03-05 Morten Welinder + + * Release 1.14.8 + +2007-09-07 Jody Goldberg + + * Release 1.14.7 + +2007-09-03 Jody Goldberg + + * Release 1.14.6 + +2007-07-10 Jody Goldberg + + * Release 1.14.5 + +2007-06-18 Jody Goldberg + + * Release 1.14.4 + +2007-01-23 Morten Welinder + + * gsf.override (_wrap_gsf_output_memory_get_bytes): Constify. Fix + argument type for gsf_output_size. + + * gsfgnome.override (_wrap_gsf_input_bonobo_new, + _wrap_gsf_output_bonobo_new): Lobotomize, see #382254. + + * gsf.defs (gsf_infile_msvba_new): Fix type of source. + +2006-11-05 Jody Goldberg + + * Release 1.14.3 + +2006-09-26 Jody Goldberg + + * Release 1.14.2 + +2006-08-19 Jody Goldberg + + * Makefile.am : Fix exported init symbol + * gsf.override (_wrap_gsf_output_memory_get_bytes) : fix + +2006-08-15 Jody Goldberg + + * gsf.defs : remove IOContext bindings + * gsf.override : ditto. + +2006-05-08 Jody Goldberg + + * Release 1.14.1 + +2006-03-02 Jody Goldberg + + * Release 1.14.0 / 1.13.99 (for Novell) + +2006-02-24 Jon K Hellan + + * README-python: Added "abandonware" notice to Python bindings. + +2005-11-06 Jody Goldberg + + * Release 1.13.3 + +2005-10-10 Jody Goldberg + + * Release 1.13.2 + +2005-10-10 Jody Goldberg + + * Release 1.13.1 + +2005-10-04 Jody Goldberg + + * Release 1.13.0 + +2005-09-06 Jody Goldberg + + * Release 1.12.3 + +2005-08-13 Morten Welinder + + * Release 1.12.2 + +2005-08-02 Stepan Kasal + + * README-python: Partial cleanup; in particular, don't speak as if + Automake 1.5 were something new. + + * Makefile.am15: s/INCLUDES/AM_CPPFLAGS/ + * Makefile.am: A tine change. + + The two Makefile.am's should be merged. Who is able to do it? + +2005-06-12 Jody Goldberg + + * Release 1.12.1 + +2005-05-09 Jody Goldberg + + * Release 1.12.0 + +2004-12-06 Jody Goldberg + + * Release 1.11.1 + +2004-11-28 Jody Goldberg + + * Release 1.11.0 + +2004-08-20 Jody Goldberg + + * Release 1.10.1 + +2004-07-03 Jody Goldberg + + * Release 1.10.0 + +2004-05-15 Jody Goldberg + + * Release 1.9.1 + +2004-05-04 Jody Goldberg + + * Release 1.9.0 + +2003-09-12 Jody Goldberg + + * Release 1.8.2 + +2003-06-15 Jon K Hellan + + * python/__init__.py: Update to recent conventions. + + * gsfgnome.override: Remove orbit-python.h + +2003-06-07 Jody Goldberg + + * Release 1.8.1 + +2003-05-11 Jody Goldberg + + * Release 1.8.0 + +2003-01-28 Jody Goldberg + + * Release 1.7.2 + +2002-12-11 Jody Goldberg + + * Release 1.6.0 + +2002-10-26 Jody Goldberg + + * Release 1.5.0 + +2002-09-30 Jody Goldberg + + * Release 1.4.0 + +2002-09-19 Jon K Hellan + + * gsf.defs (GsfIOContext.error_occurred, + GsfIOContext.error_message, GsfIOContext.push_error, + GsfIOContext.pop_error): Remove. + (GsfOutfileZip.set_compression_method): Add. + + * gsf-arg-types.py: Handle GsfZipCompressionMethod. + +2002-09-13 Jon K Hellan + + * gsf.override (GSF_TYPE_OUTFILE_ZIP): Define. + (_wrap_gsf_xml_parser_context): Add. + + * gsf.defs (gsf_outfile_msole_new): Fix typo. + (gsf.OutfileZip, gsf_outfile_zip_new): Add. + (gsf_xml_parser_context): Add. + + * ex-out-zip.py: Add. + +2002-08-25 Jody Goldberg + + * Release 1.3.0 + +2002-08-21 Jon K Hellan + + * Makefile.am15: Use gsf-arg-types when generating code. + + * gsf-arg-types.py: Added char* variants to gnome-python - remove + from here. + +2002-08-20 Jon K Hellan + + * gsf-arg-types.py: Handle declaration variations not handled in + gnome-python. + + * gsfgnome.override (_wrap_gsf_input_bonobo_new): Initialize Gnome + VFS. + + * gsfgnome.defs (gsf_input_gnomevfs_new, gsf_output_gnomevfs_new): + Fix typo. + +2002-08-20 Jon K Hellan + + * Makefile.am15 (_gsfmodule_la_LIBADD): -lgsf-gnome-1 should not + be included here. + +2002-08-19 Jon K Hellan + + * gsf.defs (GsfInput.seek, GsfOutput.seek): + s/GsfSeekType/GSeekType/. + + * gsf.override (_wrap_gsf_input_seek, _wrap_gsf_output_seek): Ditto. + +2002-08-19 Jon K Hellan + + * Makefile.am15: Different CFLAGS and LIBADD for gsf and gsf.gnome + modules. + + * gsfgnome.override: Change include path for gsf-gnome headers. + +2002-08-18 Jon K Hellan + + * README-python: Update build procedure description. With todays + changes, it's simpler and should actually work. + + * Makefile.am15: Add, so that people who have Automake 1.5 can + actually build the thing. See README-python. + + * .cvsignore: Add gsfgnome.c + +2002-08-18 Jon K Hellan + + * gfs.defs: Split out bonobo and gnome-vfs dependency into + gsf.gnome module. + + * gsfmodule.c: Ditto. + + * gfs.override: Ditto. + + * __init__.py: Added to split into gsf and gsf.gnome modules. + + * gfsgnome.defs: Ditto. + + * gsfgnomemodule.c: Ditto. + + * gfsgnome.override: Ditto. + +2002-08-15 Jon K Hellan + + * gsf.defs (GsfInput.size, GsfInput.remaining, GsfInput.tell, + GsfOutput.size, GsfOutput.tell): Change return type to gsf_off_t. + (GsfInput.seek, GsfOutput.seek): Change type of offset parameter + to gsf_off_t, of 'whence' to GsfSeeType. + (GsfInput.set_size): Change type of size parameter to gsf_off_t. + (gsf_input_memory_new): Change type of length parameter to + gsf_off_t. + (GsfInfileZip.get_ooname): Remove. + (GsfMetaDataBag): Was commented out. Now remove. Original is still + in CVS. + (GsfOutputBonobo, GsfOutputMemory): Not built in C library, so + remove. + + * gsf.override: Include orbit-python.h. Don't ignore io-context. + (_wrap_gsf_input_size, _wrap_gsf_input_remaining, + _wrap_gsf_input_tell, _wrap_gsf_output_size, + _wrap_gsf_output_tell): Check for overflow from gsf_input_size. + (wrap_gsf_input_seek, _wrap_gsf_output_seek): Copy offset to a + gsf_off_t before calling gsf_input_seek + (_wrap_gsf_input_memory_new): Cast to suppress warning. + (_wrap_gsf_infile_zip_get_ooname): Remove. + (_wrap_gsf_output_tell): Add. + + * gsfmodule.c (initgsf): Suppress warnings. + +2002-08-05 Jon K Hellan + + * gsf.override: (GsfInputBonobo, GsfInputGnomeVFS, GsfIOContext, + GsfOutfile, GsfOutfileMSOle, GsfOutputBonobo, GsfOutputGnomeVFS, + GsfOutputMemory, GsfOuputStdio): Add. + (_wrap_gsf_input_read): Use correct type of gsf_input_size. + (_wrap_gsf_input_seek, _wrap_gsf_input_tell, + _wrap_gsf_input_memory_new): Kill warning. + (_wrap_gsf_input_stdio_new, _wrap_gsf_input_mmap_new, + _wrap_gsf_input_textline_utf8_gets, + _wrap_gsf_infile_name_by_index, _wrap_gsf_infile_child_by_name): + Remove. Improved pygtk-codegen? + (_wrap_gsf_input_bonobo_new, _wrap_gsf_output_size) + (_wrap_gsf_output_seek, _wrap_gsf_output_seek) + (_wrap_gsf_output_write, _wrap_gsf_output_bonobo_new): Add. + + * gsf.defs (GsfInput.uncompress, GsfInfileZip.get_ooname, + GsfInputBonobo, GsfInputGnomeVFS, GsfIOContext, GsfOutfile, + GsfOutfileMSOle, GsfOutputBonobo, GsfOutputGnomeVFS, + GsfOutputMemory, GsfOuputStdio): Add. + (GsfInput.name): Correct type. + +2002-08-12 Jody Goldberg + + * Release 1.2.0 + +2002-07-21 Jody Goldberg + + * Release 1.1.0 + +2002-06-23 Jon K Hellan + + * README-python: Update build instructions. + +2002-06-20 Jon K Hellan + + * README-python: Explain how to build. + diff --git a/python/Makefile.am b/python/Makefile.am new file mode 100644 index 0000000..55bef23 --- /dev/null +++ b/python/Makefile.am @@ -0,0 +1,50 @@ +AM_CPPFLAGS = $(LIBGSF_CFLAGS) $(PYTHON_INCLUDES) $(PYGTK_CFLAGS) + +pygsfdir = $(pythondir)/gsf +pygsf_PYTHON = __init__.py + +pygsfexecdir = $(pyexecdir)/gsf + +CLEANFILES = +EXTRA_DIST = gsf-arg-types.py +pygsfexec_LTLIBRARIES = + +if WITH_LIBGSF_GNOME + pygsfexec_LTLIBRARIES += gnomemodule.la +endif + +pygsfexec_LTLIBRARIES += _gsfmodule.la + +gnomemodule_la_CFLAGS = \ + -I$(top_srcdir) \ + $(LIBGSF_CFLAGS) $(LIBGSF_GNOME_CFLAGS) $(ORBIT_PYTHON_CFLAGS) +gnomemodule_la_LDFLAGS = -module -avoid-version -export-symbols-regex initgnome +gnomemodule_la_LIBADD = \ + $(top_builddir)/gsf-gnome/libgsf-gnome-1.la \ + $(top_builddir)/gsf/libgsf-1.la \ + $(LIBGSF_LIBS) $(LIBGSF_GNOME_LIBS) +gnomemodule_la_SOURCES = gsfgnomemodule.c +nodist_gnomemodule_la_SOURCES = gsfgnome.c +CLEANFILES += gsfgnome.c +EXTRA_DIST += gsfgnome.defs gsfgnome.override +gsfgnome.c: gsfgnome.defs gsfgnome.override gsf-arg-types.py + +_gsfmodule_la_CFLAGS = \ + -I$(top_srcdir) \ + $(LIBGSF_CFLAGS) +_gsfmodule_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_gsf +_gsfmodule_la_LIBADD = $(top_builddir)/gsf/libgsf-1.la $(LIBGSF_LIBS) +_gsfmodule_la_SOURCES = gsfmodule.c +nodist__gsfmodule_la_SOURCES = gsf.c +CLEANFILES += gsf.c +EXTRA_DIST += gsf.defs gsf.override +gsf.c: gsf.defs gsf.override gsf-arg-types.py + +.defs.c: + (cd $(srcdir) \ + && $(PYGTK_CODEGEN) \ + --load-types gsf-arg-types.py \ + --override $*.override \ + --prefix py$* $*.defs) > gen-$*.c \ + && cp gen-$*.c $*.c \ + && rm -f gen-$*.c diff --git a/python/Makefile.in b/python/Makefile.in new file mode 100644 index 0000000..78dc9bf --- /dev/null +++ b/python/Makefile.in @@ -0,0 +1,748 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@WITH_LIBGSF_GNOME_TRUE@am__append_1 = gnomemodule.la +subdir = python +DIST_COMMON = $(pygsf_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/gsf-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pygsfexecdir)" "$(DESTDIR)$(pygsfdir)" +LTLIBRARIES = $(pygsfexec_LTLIBRARIES) +am__DEPENDENCIES_1 = +_gsfmodule_la_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +am__gsfmodule_la_OBJECTS = _gsfmodule_la-gsfmodule.lo +nodist__gsfmodule_la_OBJECTS = _gsfmodule_la-gsf.lo +_gsfmodule_la_OBJECTS = $(am__gsfmodule_la_OBJECTS) \ + $(nodist__gsfmodule_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +_gsfmodule_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(_gsfmodule_la_CFLAGS) \ + $(CFLAGS) $(_gsfmodule_la_LDFLAGS) $(LDFLAGS) -o $@ +gnomemodule_la_DEPENDENCIES = \ + $(top_builddir)/gsf-gnome/libgsf-gnome-1.la \ + $(top_builddir)/gsf/libgsf-1.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +am_gnomemodule_la_OBJECTS = gnomemodule_la-gsfgnomemodule.lo +nodist_gnomemodule_la_OBJECTS = gnomemodule_la-gsfgnome.lo +gnomemodule_la_OBJECTS = $(am_gnomemodule_la_OBJECTS) \ + $(nodist_gnomemodule_la_OBJECTS) +gnomemodule_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(gnomemodule_la_CFLAGS) $(CFLAGS) $(gnomemodule_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@WITH_LIBGSF_GNOME_TRUE@am_gnomemodule_la_rpath = -rpath \ +@WITH_LIBGSF_GNOME_TRUE@ $(pygsfexecdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(_gsfmodule_la_SOURCES) $(nodist__gsfmodule_la_SOURCES) \ + $(gnomemodule_la_SOURCES) $(nodist_gnomemodule_la_SOURCES) +DIST_SOURCES = $(_gsfmodule_la_SOURCES) $(gnomemodule_la_SOURCES) +py_compile = $(top_srcdir)/py-compile +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BONOBO_REQ = @BONOBO_REQ@ +BZ2_LIBS = @BZ2_LIBS@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURRENT_MINUS_AGE = @CURRENT_MINUS_AGE@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ +GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GNOMEVFS_REQ = @GNOMEVFS_REQ@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEXE = @LIBEXE@ +LIBGSF_BONOBO_CFLAGS = @LIBGSF_BONOBO_CFLAGS@ +LIBGSF_BONOBO_LIBS = @LIBGSF_BONOBO_LIBS@ +LIBGSF_CFLAGS = @LIBGSF_CFLAGS@ +LIBGSF_GIO_CFLAGS = @LIBGSF_GIO_CFLAGS@ +LIBGSF_GIO_LIBS = @LIBGSF_GIO_LIBS@ +LIBGSF_GNOME_CFLAGS = @LIBGSF_GNOME_CFLAGS@ +LIBGSF_GNOME_LIBS = @LIBGSF_GNOME_LIBS@ +LIBGSF_LIBS = @LIBGSF_LIBS@ +LIBGSF_MAJOR_VERSION = @LIBGSF_MAJOR_VERSION@ +LIBGSF_MICRO_VERSION = @LIBGSF_MICRO_VERSION@ +LIBGSF_MINOR_VERSION = @LIBGSF_MINOR_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +PYGTK_CFLAGS = @PYGTK_CFLAGS@ +PYGTK_CODEGEN = @PYGTK_CODEGEN@ +PYGTK_LIBS = @PYGTK_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +WARN_CFLAGS = @WARN_CFLAGS@ +WINDRES = @WINDRES@ +XGETTEXT = @XGETTEXT@ +Z_CPPFLAGS = @Z_CPPFLAGS@ +Z_LIBS = @Z_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CPPFLAGS = $(LIBGSF_CFLAGS) $(PYTHON_INCLUDES) $(PYGTK_CFLAGS) +pygsfdir = $(pythondir)/gsf +pygsf_PYTHON = __init__.py +pygsfexecdir = $(pyexecdir)/gsf +CLEANFILES = gsfgnome.c gsf.c +EXTRA_DIST = gsf-arg-types.py gsfgnome.defs gsfgnome.override gsf.defs \ + gsf.override +pygsfexec_LTLIBRARIES = $(am__append_1) _gsfmodule.la +gnomemodule_la_CFLAGS = \ + -I$(top_srcdir) \ + $(LIBGSF_CFLAGS) $(LIBGSF_GNOME_CFLAGS) $(ORBIT_PYTHON_CFLAGS) + +gnomemodule_la_LDFLAGS = -module -avoid-version -export-symbols-regex initgnome +gnomemodule_la_LIBADD = \ + $(top_builddir)/gsf-gnome/libgsf-gnome-1.la \ + $(top_builddir)/gsf/libgsf-1.la \ + $(LIBGSF_LIBS) $(LIBGSF_GNOME_LIBS) + +gnomemodule_la_SOURCES = gsfgnomemodule.c +nodist_gnomemodule_la_SOURCES = gsfgnome.c +_gsfmodule_la_CFLAGS = \ + -I$(top_srcdir) \ + $(LIBGSF_CFLAGS) + +_gsfmodule_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_gsf +_gsfmodule_la_LIBADD = $(top_builddir)/gsf/libgsf-1.la $(LIBGSF_LIBS) +_gsfmodule_la_SOURCES = gsfmodule.c +nodist__gsfmodule_la_SOURCES = gsf.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .defs .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu python/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu python/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pygsfexecLTLIBRARIES: $(pygsfexec_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pygsfexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pygsfexecdir)" + @list='$(pygsfexec_LTLIBRARIES)'; test -n "$(pygsfexecdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pygsfexecdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pygsfexecdir)"; \ + } + +uninstall-pygsfexecLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pygsfexec_LTLIBRARIES)'; test -n "$(pygsfexecdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pygsfexecdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pygsfexecdir)/$$f"; \ + done + +clean-pygsfexecLTLIBRARIES: + -test -z "$(pygsfexec_LTLIBRARIES)" || rm -f $(pygsfexec_LTLIBRARIES) + @list='$(pygsfexec_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 +_gsfmodule.la: $(_gsfmodule_la_OBJECTS) $(_gsfmodule_la_DEPENDENCIES) + $(AM_V_CCLD)$(_gsfmodule_la_LINK) -rpath $(pygsfexecdir) $(_gsfmodule_la_OBJECTS) $(_gsfmodule_la_LIBADD) $(LIBS) +gnomemodule.la: $(gnomemodule_la_OBJECTS) $(gnomemodule_la_DEPENDENCIES) + $(AM_V_CCLD)$(gnomemodule_la_LINK) $(am_gnomemodule_la_rpath) $(gnomemodule_la_OBJECTS) $(gnomemodule_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gsfmodule_la-gsf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gsfmodule_la-gsfmodule.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnomemodule_la-gsfgnome.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnomemodule_la-gsfgnomemodule.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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 $@ $< + +_gsfmodule_la-gsfmodule.lo: gsfmodule.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gsfmodule_la_CFLAGS) $(CFLAGS) -MT _gsfmodule_la-gsfmodule.lo -MD -MP -MF $(DEPDIR)/_gsfmodule_la-gsfmodule.Tpo -c -o _gsfmodule_la-gsfmodule.lo `test -f 'gsfmodule.c' || echo '$(srcdir)/'`gsfmodule.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/_gsfmodule_la-gsfmodule.Tpo $(DEPDIR)/_gsfmodule_la-gsfmodule.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gsfmodule.c' object='_gsfmodule_la-gsfmodule.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gsfmodule_la_CFLAGS) $(CFLAGS) -c -o _gsfmodule_la-gsfmodule.lo `test -f 'gsfmodule.c' || echo '$(srcdir)/'`gsfmodule.c + +_gsfmodule_la-gsf.lo: gsf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gsfmodule_la_CFLAGS) $(CFLAGS) -MT _gsfmodule_la-gsf.lo -MD -MP -MF $(DEPDIR)/_gsfmodule_la-gsf.Tpo -c -o _gsfmodule_la-gsf.lo `test -f 'gsf.c' || echo '$(srcdir)/'`gsf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/_gsfmodule_la-gsf.Tpo $(DEPDIR)/_gsfmodule_la-gsf.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gsf.c' object='_gsfmodule_la-gsf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gsfmodule_la_CFLAGS) $(CFLAGS) -c -o _gsfmodule_la-gsf.lo `test -f 'gsf.c' || echo '$(srcdir)/'`gsf.c + +gnomemodule_la-gsfgnomemodule.lo: gsfgnomemodule.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnomemodule_la_CFLAGS) $(CFLAGS) -MT gnomemodule_la-gsfgnomemodule.lo -MD -MP -MF $(DEPDIR)/gnomemodule_la-gsfgnomemodule.Tpo -c -o gnomemodule_la-gsfgnomemodule.lo `test -f 'gsfgnomemodule.c' || echo '$(srcdir)/'`gsfgnomemodule.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gnomemodule_la-gsfgnomemodule.Tpo $(DEPDIR)/gnomemodule_la-gsfgnomemodule.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gsfgnomemodule.c' object='gnomemodule_la-gsfgnomemodule.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnomemodule_la_CFLAGS) $(CFLAGS) -c -o gnomemodule_la-gsfgnomemodule.lo `test -f 'gsfgnomemodule.c' || echo '$(srcdir)/'`gsfgnomemodule.c + +gnomemodule_la-gsfgnome.lo: gsfgnome.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnomemodule_la_CFLAGS) $(CFLAGS) -MT gnomemodule_la-gsfgnome.lo -MD -MP -MF $(DEPDIR)/gnomemodule_la-gsfgnome.Tpo -c -o gnomemodule_la-gsfgnome.lo `test -f 'gsfgnome.c' || echo '$(srcdir)/'`gsfgnome.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gnomemodule_la-gsfgnome.Tpo $(DEPDIR)/gnomemodule_la-gsfgnome.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gsfgnome.c' object='gnomemodule_la-gsfgnome.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gnomemodule_la_CFLAGS) $(CFLAGS) -c -o gnomemodule_la-gsfgnome.lo `test -f 'gsfgnome.c' || echo '$(srcdir)/'`gsfgnome.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pygsfPYTHON: $(pygsf_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(pygsfdir)" || $(MKDIR_P) "$(DESTDIR)$(pygsfdir)" + @list='$(pygsf_PYTHON)'; dlist=; list2=; test -n "$(pygsfdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pygsfdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pygsfdir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(pygsfdir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pygsfdir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-pygsfPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(pygsf_PYTHON)'; test -n "$(pygsfdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + echo " ( cd '$(DESTDIR)$(pygsfdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pygsfdir)" && rm -f $$files || exit $$?; \ + echo " ( cd '$(DESTDIR)$(pygsfdir)' && rm -f" $$filesc ")"; \ + cd "$(DESTDIR)$(pygsfdir)" && rm -f $$filesc || exit $$?; \ + echo " ( cd '$(DESTDIR)$(pygsfdir)' && rm -f" $$fileso ")"; \ + cd "$(DESTDIR)$(pygsfdir)" && rm -f $$fileso + +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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + 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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + 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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pygsfexecdir)" "$(DESTDIR)$(pygsfdir)"; 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) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-pygsfexecLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pygsfPYTHON + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pygsfexecLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pygsfPYTHON uninstall-pygsfexecLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pygsfexecLTLIBRARIES 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-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-pygsfPYTHON install-pygsfexecLTLIBRARIES 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-pygsfPYTHON \ + uninstall-pygsfexecLTLIBRARIES + +gsfgnome.c: gsfgnome.defs gsfgnome.override gsf-arg-types.py +gsf.c: gsf.defs gsf.override gsf-arg-types.py + +.defs.c: + (cd $(srcdir) \ + && $(PYGTK_CODEGEN) \ + --load-types gsf-arg-types.py \ + --override $*.override \ + --prefix py$* $*.defs) > gen-$*.c \ + && cp gen-$*.c $*.c \ + && rm -f gen-$*.c + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/python/__init__.py b/python/__init__.py new file mode 100644 index 0000000..8ea4298 --- /dev/null +++ b/python/__init__.py @@ -0,0 +1,8 @@ +# -*- Mode: Python; py-indent-offset: 4 -*- +import pygtk +pygtk.require('2.0') +import gobject +del gobject +del pygtk + +from _gsf import * diff --git a/python/gsf-arg-types.py b/python/gsf-arg-types.py new file mode 100644 index 0000000..03eaa36 --- /dev/null +++ b/python/gsf-arg-types.py @@ -0,0 +1,11 @@ +import argtypes + +arg = argtypes.StringArg() + +argtypes.matcher.register('guint8*', arg) +argtypes.matcher.register('const-guint8*', arg) +argtypes.matcher.register('guint8-const*', arg) + +arg = argtypes.IntArg() + +argtypes.matcher.register('GsfZipCompressionMethod', arg) diff --git a/python/gsf.defs b/python/gsf.defs new file mode 100644 index 0000000..f3db2a4 --- /dev/null +++ b/python/gsf.defs @@ -0,0 +1,550 @@ +;; -*- scheme -*- + +; object definitions ... +(define-object Input + (in-module "Gsf") + (parent "GObject") + (c-name "GsfInput") + (gtype-id "GSF_TYPE_INPUT") +) + +(define-object Infile + (in-module "Gsf") + (parent "GsfInput") + (c-name "GsfInfile") + (gtype-id "GSF_TYPE_INFILE") +) + +;; Enumerations and flags ... + + +;; From libgsf/gsf/gsf-input.h + +(define-method container + (of-object "GsfInput") + (c-name "gsf_input_container") + (return-type "GsfInfile*") +) + +(define-method dup + (of-object "GsfInput") + (c-name "gsf_input_dup") + (return-type "GsfInput*") + (parameters + '("GError**" "err") + ) +) + +(define-method size + (of-object "GsfInput") + (c-name "gsf_input_size") + (return-type "gsf_off_t") +) + +(define-method eof + (of-object "GsfInput") + (c-name "gsf_input_eof") + (return-type "gboolean") +) + +(define-method remaining + (of-object "GsfInput") + (c-name "gsf_input_remaining") + (return-type "gsf_off_t") +) + +(define-method tell + (of-object "GsfInput") + (c-name "gsf_input_tell") + (return-type "gsf_off_t") +) + +(define-method seek + (of-object "GsfInput") + (c-name "gsf_input_seek") + (return-type "gboolean") + (parameters + '("gsf_off_t" "offset") + '("GSeekType" "whence") + ) +) + +(define-method uncompress + (of-object "GsfInput") + (c-name "gsf_input_uncompress") + (return-type "GsfInput*") +) + +(define-function gsf_input_error + (c-name "gsf_input_error") + (return-type "GQuark") +) + +;; From libgsf/gsf/gsf-input-impl.h + +(define-method set_name + (of-object "GsfInput") + (c-name "gsf_input_set_name") + (return-type "gboolean") + (parameters + '("char-const*" "name") + ) +) + +(define-method set_container + (of-object "GsfInput") + (c-name "gsf_input_set_container") + (return-type "gboolean") + (parameters + '("GsfInfile*" "container") + ) +) + +(define-method set_size + (of-object "GsfInput") + (c-name "gsf_input_set_size") + (return-type "gboolean") + (parameters + '("gsf_off_t" "size") + ) +) + +;; From libgsf/gsf/gsf-infile.h + +(define-method num_children + (of-object "GsfInfile") + (c-name "gsf_infile_num_children") + (return-type "int") +) + +(define-method child_by_index + (of-object "GsfInfile") + (c-name "gsf_infile_child_by_index") + (return-type "GsfInput*") + (parameters + '("int" "i") + ) +) + +(define-method child_by_name + (of-object "GsfInfile") + (c-name "gsf_infile_child_by_name") + (return-type "GsfInput*") + (parameters + '("char-const*" "name") + ) +) + +(define-method child_by_vname + (of-object "GsfInfile") + (c-name "gsf_infile_child_by_vname") + (return-type "GsfInput*") + (parameters + '("char-const*" "name") + ) + (varargs #t) +) + +;; From libgsf/gsf/gsf-infile-impl.h + + +;; Stuff which h2def.py didn't catch + +;; gsf-input.h + +(define-method name + (of-object "GsfInput") + (c-name "gsf_input_name") + (return-type "char-const*") +) + +(define-method read + (of-object "GsfInput") + (c-name "gsf_input_read") + (return-type "guint8-const*") + (caller-owns-return true) + (parameters + '("size_t" "num_bytes") + '("guint8*" "optional_buffer" (default null) (null-ok)) + ) +) + +;; gsf-input-stdio.[ch] + +(define-object InputStdio + (in-module "Gsf") + (parent "GsfInput") + (c-name "GsfInputStdio") + (gtype-id "GSF_TYPE_INPUT_STDIO") +) + +(define-function gsf_input_stdio_new + (c-name "gsf_input_stdio_new") + (is-constructor-of "GsfInputStdio") + (return-type "GsfInput*") + (parameters + '("char-const*" "filename") + '("GError**" "err") + ) +) + +;; gsf-input-memory.[ch] + +(define-object InputMemory + (in-module "Gsf") + (parent "GsfInput") + (c-name "GsfInputMemory") + (gtype-id "GSF_TYPE_INPUT_MEMORY") +) + +(define-function gsf_input_memory_new + (c-name "gsf_input_memory_new") + (is-constructor-of "GsfInputMemory") + (return-type "GsfInput*") + (parameters + '("guint8-const*" "buf") + '("gsf_off_t" "length") + '("gboolean" "needs_free") + ) +) + +(define-function gsf_input_mmap_new + (c-name "gsf_input_mmap_new") + (return-type "GsfInput*") + (parameters + '("char-const*" "filename") + '("GError**" "err") + ) +) + +;; gsf-input-textline.[ch] + +(define-object InputTextline + (in-module "Gsf") + (parent "GsfInput") + (c-name "GsfInputTextline") + (gtype-id "GSF_TYPE_INPUT_TEXTLINE") +) + +(define-function gsf_input_textline_new + (c-name "gsf_input_textline_new") + (is-constructor-of "GsfInputTextline") + (return-type "GsfInputTextline*") + (parameters + '("GsfInput*" "source") + ) +) + +(define-method ascii_gets + (of-object "GsfInputTextline") + (c-name "gsf_input_textline_ascii_gets") + (return-type "unsigned-char*") + (caller-owns-return true) +) + +(define-method utf8_gets + (of-object "GsfInputTextline") + (c-name "gsf_input_textline_utf8_gets") + (return-type "guint8*") + (caller-owns-return true) +) + +;; gsf-input-gzip.[ch] + +(define-object InputGZip + (in-module "Gsf") + (parent "GsfInput") + (c-name "GsfInputGZip") + (gtype-id "GSF_TYPE_INPUT_GZIP") +) + +(define-function gsf_input_gzip_new + (c-name "gsf_input_gzip_new") + (is-constructor-of "GsfInputGZip") + (return-type "GsfInputGZip*") + (parameters + '("GsfInput*" "source") + '("GError**" "err") + ) +) + +;; gsf-infile.h +(define-method name_by_index + (of-object "GsfInfile") + (c-name "gsf_infile_name_by_index") + (return-type "char-const*") + (caller-owns-return true) + (parameters + '("int" "i") + ) +) + +;; gsf-infile-msole.[ch] +(define-object InfileMSOle + (in-module "Gsf") + (parent "GsfInfile") + (c-name "GsfInfileMSOle") + (gtype-id "GSF_TYPE_INFILE_MS_OLE") +) + +(define-function gsf_infile_msole_new + (c-name "gsf_infile_msole_new") + (is-constructor-of "GsfInfileMSOle") + (return-type "GsfInfile*") + (parameters + '("GsfInput*" "source") + '("GError**" "err") + ) +) + +;; From gsf-infile-msvba.[ch] +(define-object InfileMSVBA + (in-module "Gsf") + (parent "GsfInfile") + (c-name "GsfInfileMSVBA") + (gtype-id "GSF_TYPE_INFILE_MSVBA") +) + +(define-function gsf_infile_msvba_new + (c-name "gsf_infile_msvba_new") + (is-constructor-of "GsfInfileMSVBA") + (return-type "GsfInfile*") + (parameters + '("GsfInfile*" "source") + '("GError**" "err") + ) +) + +;; gsf-infile-zip.[ch] + +(define-object InfileZip + (in-module "Gsf") + (parent "GsfInfile") + (c-name "GsfInfileZip") + (gtype-id "GSF_TYPE_INFILE_ZIP") +) + +(define-function gsf_infile_zip_new + (c-name "gsf_infile_zip_new") + (is-constructor-of "GsfInfileZip") + (return-type "GsfInfile*") + (parameters + '("GsfInput*" "source") + '("GError**" "err") + ) +) + + +;; gsf-output.[ch], gsf-output-impl.h + +(define-object Output + (in-module "Gsf") + (parent "GObject") + (c-name "GsfOutput") + (gtype-id "GSF_TYPE_OUTPUT") +) + +(define-method name + (of-object "GsfOutput") + (c-name "gsf_output_name") + (return-type "char-const*") +) + +(define-method container + (of-object "GsfOutput") + (c-name "gsf_output_container") + (return-type "GsfOutfile*") +) + +(define-method size + (of-object "GsfOutput") + (c-name "gsf_output_size") + (return-type "gsf_off_t") +) + +(define-method close + (of-object "GsfOutput") + (c-name "gsf_output_close") + (return-type "gboolean") +) + +(define-method is_closed + (of-object "GsfOutput") + (c-name "gsf_output_is_closed") + (return-type "gboolean") +) + +(define-method tell + (of-object "GsfOutput") + (c-name "gsf_output_tell") + (return-type "gsf_off_t") +) + +(define-method seek + (of-object "GsfOutput") + (c-name "gsf_output_seek") + (return-type "gboolean") + (parameters + '("gsf_off_t" "offset") + '("GSeekType" "whence") + ) +) + +(define-method write + (of-object "GsfOutput") + (c-name "gsf_output_write") + (return-type "gboolean") + (parameters + '("size_t" "num_bytes") + '("guint8-const*" "data") + ) +) + +(define-method wrap + (of-object "GsfOutput") + (c-name "gsf_output_wrap") + (return-type "gboolean") + (parameters + '("GsfOutput*" "wrapee") + ) +) + +(define-method unwrap + (of-object "GsfOutput") + (c-name "gsf_output_unwrap") + (return-type "gboolean") + (parameters + '("GsfOutput*" "wrapee") + ) +) + +(define-function gsf_output_error + (c-name "gsf_output_error") + (return-type "GQuark") +) + + + +;; gsf-outfile.[ch] + +(define-object Outfile + (in-module "Gsf") + (parent "GsfOutput") + (c-name "GsfOutfile") + (gtype-id "GSF_TYPE_OUTFILE") +) + +(define-method new_child + (of-object "GsfOutfile") + (c-name "gsf_outfile_new_child") + (return-type "GsfOutput*") + (parameters + '("char-const*" "name") + '("gboolean" "is_dir") + ) +) + +(define-function gsf_outfile_error + (c-name "gsf_outfile_error") + (return-type "GQuark") +) + +;; gsf-outfile-msole.[ch] + +(define-object OutfileMSOle + (in-module "Gsf") + (parent "GsfOutfile") + (c-name "GsfOutfileMSOle") + (gtype-id "GSF_TYPE_OUTFILE_MS_OLE") +) + +(define-function gsf_outfile_msole_new + (c-name "gsf_outfile_msole_new") + (is-constructor-of "GsfOutfileMSOle") + (return-type "GsfOutfile*") + (parameters + '("GsfOutput*" "sink") + ) +) + +;; gsf-outfile-zip.[ch] + +(define-object OutfileZip + (in-module "Gsf") + (parent "GsfOutfile") + (c-name "GsfOutfileZip") + (gtype-id "GSF_TYPE_OUTFILE_ZIP") +) + +(define-function gsf_outfile_zip_new + (c-name "gsf_outfile_zip_new") + (is-constructor-of "GsfOutfileZip") + (return-type "GsfOutfile*") + (parameters + '("GsfOutput*" "source") + '("GError**" "err") + ) +) + +(define-method set_compression_method + (of-object "GsfOutfileZip") + (c-name "gsf_outfile_zip_set_compression_method") + (return-type "gboolean") + (parameters + '("GsfZipCompressionMethod" "method") + ) +) + +;; gsf-output-stdio.[ch] + +(define-object OutputStdio + (in-module "Gsf") + (parent "GsfOutput") + (c-name "GsfOutputStdio") + (gtype-id "GSF_TYPE_OUTPUT_STDIO") +) + +(define-function gsf_output_stdio_new + (c-name "gsf_output_stdio_new") + (is-constructor-of "GsfOutputStdio") + (return-type "GsfOutput*") + (parameters + '("char-const*" "filename") + '("GError**" "err") + ) +) + +;; From gsf-output-memory.[hh] + +(define-object OutputMemory + (in-module "Gsf") + (parent "GsfOutput") + (c-name "GsfOutputMemory") + (gtype-id "GSF_TYPE_OUTPUT_MEMORY") +) + +(define-function gsf_output_memory_new + (c-name "gsf_output_memory_new") + (is-constructor-of "GsfOutputMemory") + (return-type "GsfOutput*") +) + +(define-method get_bytes + (of-object "GsfOutputMemory") + (c-name "gsf_output_memory_get_bytes") + (return-type "none") + (parameters + '("guint8**" "outbuffer") + '("gsf_off_t*" "outlength") + ) +) + +(define-function gsf_xml_parser_context + (c-name "gsf_xml_parser_context") + (return-type "xmlParserCtxtPtr") + (caller-owns-return true) + (parameters + '("GsfInput*" "input") + ) +) + diff --git a/python/gsf.override b/python/gsf.override new file mode 100644 index 0000000..68d2d2e --- /dev/null +++ b/python/gsf.override @@ -0,0 +1,272 @@ +/* -*- Mode: C; c-basic-offset: 4 -*- */ +%% +headers +#include + +#define NO_IMPORT_PYGOBJECT +#include "pygobject.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define GSF_TYPE_INPUT GSF_INPUT_TYPE +#define GSF_TYPE_INPUT_STDIO GSF_INPUT_STDIO_TYPE +#define GSF_TYPE_INPUT_MEMORY GSF_INPUT_MEMORY_TYPE +#define GSF_TYPE_INPUT_TEXTLINE GSF_INPUT_TEXTLINE_TYPE +#define GSF_TYPE_INPUT_GZIP GSF_INPUT_GZIP_TYPE + +#define GSF_TYPE_INFILE GSF_INFILE_TYPE +#define GSF_TYPE_INFILE_ZIP GSF_INFILE_ZIP_TYPE +#define GSF_TYPE_INFILE_MSVBA GSF_INFILE_MSVBA_TYPE +#define GSF_TYPE_INFILE_MS_OLE GSF_INFILE_MSOLE_TYPE +# +#define GSF_TYPE_META_DATA_BAG GSF_METADATA_BAG_TYPE +#define GSF_TYPE_OUTPUT GSF_OUTPUT_TYPE +#define GSF_TYPE_OUTFILE GSF_OUTFILE_TYPE +#define GSF_TYPE_OUTFILE_MS_OLE GSF_OUTFILE_MSOLE_TYPE +#define GSF_TYPE_OUTFILE_ZIP GSF_OUTFILE_ZIP_TYPE +#define GSF_TYPE_OUTPUT_MEMORY GSF_OUTPUT_MEMORY_TYPE +#define GSF_TYPE_OUTPUT_STDIO GSF_OUTPUT_STDIO_TYPE +%% +modulename gsf +%% +import gobject.GObject as PyGObject_Type +%% +ignore-glob + _* + gsf_input_set_* + *_get_type + gsf_metadata_bag_* + gsf_*_error + gsf_infile_child_by_vname +%% +override gsf_input_size noargs +static PyObject * +_wrap_gsf_input_size(PyGObject *self) +{ + long ret; + gsf_off_t size = gsf_input_size(GSF_INPUT(self->obj)); + + ret = size; + if (ret != size) { /* Check for overflow */ + PyErr_SetString(PyExc_OverflowError, "Size is too large"); + } + return PyInt_FromLong(ret); +} +%% +override gsf_input_read kwargs +static PyObject * +_wrap_gsf_input_read(PyGObject *self, PyObject *args, PyObject *kwargs) +{ + static char *kwlist[] = { (char *) "num_bytes", + (char *) "optional_buffer", NULL }; + size_t num_bytes; + guint8 *optional_buffer = NULL; + guint8 const *ret; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "i|z:GsfInput.read", + kwlist, &num_bytes, &optional_buffer)) + return NULL; + ret = gsf_input_read(GSF_INPUT(self->obj), num_bytes, optional_buffer); + if (ret) + return PyString_FromStringAndSize(ret, (int) num_bytes); + Py_INCREF(Py_None); + return Py_None; +} +%% +override gsf_input_seek kwargs +static PyObject * +_wrap_gsf_input_seek(PyGObject *self, PyObject *args, PyObject *kwargs) +{ + static char *kwlist[] = { (char *) "offset", (char *) "whence", NULL }; + long loffset; + gsf_off_t offset; + GSeekType whence; + gboolean ret; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "li:GsfInput.seek", + kwlist, &loffset, &whence)) + return NULL; + offset = loffset; + ret = gsf_input_seek(GSF_INPUT(self->obj), offset, whence); + return PyInt_FromLong(ret); +} +%% +override gsf_input_remaining noargs +static PyObject * +_wrap_gsf_input_remaining(PyGObject *self) +{ + long ret; + gsf_off_t remain = gsf_input_remaining(GSF_INPUT(self->obj)); + + ret = remain; + if (ret != remain) { /* Check for overflow */ + PyErr_SetString(PyExc_OverflowError, "Size is too large"); + } + return PyInt_FromLong(ret); +} +%% +override gsf_input_tell noargs +static PyObject * +_wrap_gsf_input_tell(PyGObject *self) +{ + long ret; + gsf_off_t pos = gsf_input_tell(GSF_INPUT(self->obj)); + ret = pos; + if (ret != pos) { /* Check for overflow */ + PyErr_SetString(PyExc_OverflowError, "Position is too large"); + } + return PyInt_FromLong(ret); +} +%% +override gsf_input_memory_new kwargs +static int +_wrap_gsf_input_memory_new(PyGObject *self, PyObject *args, PyObject *kwargs) +{ + static char *kwlist[] = { + (char *) "buf", (char *) "needs_free", NULL }; + guint8 *buf; + size_t length; + gboolean needs_free; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, + (char *) "s#i:GsfInputMemory.__init__", + kwlist, &buf, &length, &needs_free)) + return -1; + self->obj = (GObject *)gsf_input_memory_new(buf, (gsf_off_t) length, + needs_free); + + if (!self->obj) { + PyErr_SetString(PyExc_RuntimeError, "could not create GsfInputMemory object"); + return -1; + } + pygobject_register_wrapper((PyObject *)self); + return 0; +} +%% +override gsf_input_textline_ascii_gets noargs +static PyObject * +_wrap_gsf_input_textline_ascii_gets(PyGObject *self) +{ + const unsigned char *ret; + + ret = gsf_input_textline_ascii_gets(GSF_INPUT_TEXTLINE(self->obj)); + if (ret) + return PyString_FromString(ret); + Py_INCREF(Py_None); + return Py_None; +} +%% +override gsf_output_size noargs +static PyObject * +_wrap_gsf_output_size(PyGObject *self) +{ + long ret; + gsf_off_t size = gsf_output_size(GSF_OUTPUT(self->obj)); + + ret = size; + if (ret != size) { /* Check for overflow */ + PyErr_SetString(PyExc_OverflowError, "Size is too large"); + } + return PyInt_FromLong(ret); +} +%% +override gsf_output_tell noargs +static PyObject * +_wrap_gsf_output_tell(PyGObject *self) +{ + long ret; + gsf_off_t pos = gsf_output_tell(GSF_OUTPUT(self->obj)); + ret = pos; + if (ret != pos) { /* Check for overflow */ + PyErr_SetString(PyExc_OverflowError, "Position is too large"); + } + return PyInt_FromLong(ret); +} +%% +override gsf_output_seek kwargs +static PyObject * +_wrap_gsf_output_seek(PyGObject *self, PyObject *args, PyObject *kwargs) +{ + static char *kwlist[] = { (char *) "offset", (char *) "whence", NULL }; + long loffset; + gsf_off_t offset; + GSeekType whence; + gboolean ret; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, + (char *) "li:GsfOutput.seek", + kwlist, &loffset, &whence)) + return NULL; + offset = loffset; + ret = gsf_output_seek(GSF_OUTPUT(self->obj), offset, whence); + return PyInt_FromLong(ret); +} +%% +override gsf_output_write kwargs +static PyObject * +_wrap_gsf_output_write(PyGObject *self, PyObject *args, PyObject *kwargs) +{ + static char *kwlist[] = { (char *) "num_bytes", (char *) "data", NULL }; + size_t num_bytes, ret; + char *data; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, + (char *) "is:GsfOutput.write", + kwlist, &num_bytes, &data)) + return NULL; + ret = gsf_output_write(GSF_OUTPUT(self->obj), num_bytes, data); + return PyInt_FromLong((long) ret); +} +%% +override gsf_output_memory_get_bytes noargs +static PyObject * +_wrap_gsf_output_memory_get_bytes(PyGObject *self, PyObject *args, PyObject *kwargs) +{ + const guint8 *outbuffer = NULL; + + outbuffer = gsf_output_memory_get_bytes (GSF_OUTPUT_MEMORY(self->obj)); + if (outbuffer) { + gsf_off_t outlength = gsf_output_size (GSF_OUTPUT(self->obj)); + int num_bytes = outlength; + if (num_bytes != outlength) { /* Check for overflow */ + PyErr_SetString(PyExc_OverflowError, "Size is too large"); + } + return PyString_FromStringAndSize(outbuffer, (int) num_bytes); + } else + return NULL; +} +%% +override gsf_xml_parser_context kwargs +static PyObject * +_wrap_gsf_xml_parser_context(PyObject *self, PyObject *args, PyObject *kwargs) +{ + static char *kwlist[] = { (char *) "input", NULL }; + PyGObject *input; + xmlParserCtxtPtr ret; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, + (char *) "O!:gsf_xml_parser_context", + kwlist, &PyGsfInput_Type, &input)) + return NULL; + ret = gsf_xml_parser_context(GSF_INPUT(input->obj)); + if (ret) + return PyCObject_FromVoidPtrAndDesc((void *) ret, + (char *) "xmlParserCtxtPtr", + NULL); + Py_INCREF(Py_None); + return Py_None; +} diff --git a/python/gsfgnome.defs b/python/gsfgnome.defs new file mode 100644 index 0000000..e5d3a60 --- /dev/null +++ b/python/gsfgnome.defs @@ -0,0 +1,57 @@ +;; -*- scheme -*- +;; gsf-input-bonobo.[ch] + +(define-object InputBonobo + (in-module "Gsf") + (parent "GsfInput") + (c-name "GsfInputBonobo") + (gtype-id "GSF_TYPE_INPUT_BONOBO") +) + +(define-function gsf_input_bonobo_new + (c-name "gsf_input_bonobo_new") + (is-constructor-of "GsfInputBonobo") + (return-type "GsfInput*") + (parameters + '("Bonobo_Stream-const" "stream") + '("GError**" "err") + ) +) + +;; gsf-input-gnomevfs.[ch] + +(define-object InputVFS + (in-module "Gsf") + (parent "GsfInput") + (c-name "GsfInputGnomeVFS") + (gtype-id "GSF_TYPE_INPUT_GNOME_VFS") +) + +(define-function gsf_input_gnomevfs_new + (c-name "gsf_input_gnomevfs_new") + (is-constructor-of "GsfInputGnomeVFS") + (return-type "GsfInput*") + (parameters + '("char-const*" "uri") + '("GError**" "error") + ) +) + +;; From /home/jk/gnome2/libgsf/gsf/gsf-output-gnomevfs.[ch] + +(define-object OutputVFS + (in-module "Gsf") + (parent "GsfOutput") + (c-name "GsfOutputGnomeVFS") + (gtype-id "GSF_TYPE_OUTPUT_GNOME_VFS") +) + +(define-function gsf_output_gnomevfs_new + (c-name "gsf_output_gnomevfs_new") + (is-constructor-of "GsfOutputGnomeVFS") + (return-type "GsfOutput*") + (parameters + '("char-const*" "filename") + '("GError**" "err") + ) +) diff --git a/python/gsfgnome.override b/python/gsfgnome.override new file mode 100644 index 0000000..4b8ad5c --- /dev/null +++ b/python/gsfgnome.override @@ -0,0 +1,98 @@ +/* -*- Mode: C; c-basic-offset: 4 -*- */ +%% +headers +#include + +#define NO_IMPORT_PYGOBJECT +#include "pygobject.h" +#include +#include +#include +#include +#include +#include + +#define GSF_TYPE_INPUT_BONOBO GSF_INPUT_BONOBO_TYPE +#define GSF_TYPE_INPUT_GNOME_VFS GSF_INPUT_GNOMEVFS_TYPE +#define GSF_TYPE_OUTPUT_BONOBO GSF_OUTPUT_BONOBO_TYPE +#define GSF_TYPE_OUTPUT_GNOME_VFS GSF_OUTPUT_GNOMEVFS_TYPE +%% +modulename gnome +%% +import gsf.Input as PyGsfInput_Type +import gsf.Output as PyGsfOutput_Type +%% +init +#ifndef LIBGSF_GNOMEVFS_VIA_GIO + gnome_vfs_init(); +#endif +%% +ignore-glob + _* + gsf_input_set_* + *_get_type + gsf_*_error +%% +override gsf_input_bonobo_new kwargs +static int +_wrap_gsf_input_bonobo_new(PyGObject *self, PyObject *args, PyObject *kwargs) +{ + static char *kwlist[] = { (char *) "stream", NULL }; + PyObject *stream; + GError *err = NULL; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, + (char *) "O:GsfInputBonobo.__init__", + kwlist, &stream)) + return -1; +#if 1 + /* See http://bugzilla.gnome.org/show_bug.cgi?id=382254 */ + return -1; +#else + if (!PyORBit_Object_Check(stream)) { + PyErr_SetString(PyExc_TypeError, "stream must be a CORBA.Object"); + return -1; + } + self->obj = (GObject *)gsf_input_bonobo_new((CORBA_Object)PyORBit_Object_Get(stream), &err); + if (pyg_error_check(&err)) + return -1; + + if (!self->obj) { + PyErr_SetString(PyExc_RuntimeError, "could not create GsfInputBonobo object"); + return -1; + } + pygobject_register_wrapper((PyObject *)self); + return 0; +#endif +} +%% +override gsf_output_bonobo_new kwargs +static int +_wrap_gsf_output_bonobo_new(PyGObject *self, PyObject *args, PyObject *kwargs) +{ + static char *kwlist[] = { "stream", NULL }; + PyObject *stream; + GError *err = NULL; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GsfOutputBonobo.__init__", kwlist, &stream)) + return -1; +#if 1 + /* See http://bugzilla.gnome.org/show_bug.cgi?id=382254 */ + return -1; +#else + if (!PyORBit_Object_Check(stream)) { + PyErr_SetString(PyExc_TypeError, "stream must be a CORBA.Object"); + return -1; + } + self->obj = (GObject *)gsf_output_bonobo_new((CORBA_Object)PyORBit_Object_Get(stream), &err); + if (pyg_error_check(&err)) + return -1; + + if (!self->obj) { + PyErr_SetString(PyExc_RuntimeError, "could not create GsfOutputBonobo object"); + return -1; + } + pygobject_register_wrapper((PyObject *)self); + return 0; +#endif +} diff --git a/python/gsfgnomemodule.c b/python/gsfgnomemodule.c new file mode 100644 index 0000000..dbb2c46 --- /dev/null +++ b/python/gsfgnomemodule.c @@ -0,0 +1,47 @@ +/* + * gsfmodule.c + * + * Copyright (C) 2002-2003 Jon K Hellan (hellan@acm.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +/* + * Python bindings for gnome extensions to libgsf. + */ + +#include + +extern PyMethodDef pygsfgnome_functions[]; +extern DL_EXPORT(void) initgnome (void); + +extern void pygsfgnome_register_classes(PyObject *d); + +DL_EXPORT(void) +initgnome (void) +{ + PyObject *m, *d; + + init_pygobject (); + + m = Py_InitModule ((char *) "gsf.gnome", pygsfgnome_functions); + d = PyModule_GetDict (m); + + pygsfgnome_register_classes (d); + + if (PyErr_Occurred ()) { + Py_FatalError ((char *) "can't initialise module gsf.gnome"); + } +} diff --git a/python/gsfmodule.c b/python/gsfmodule.c new file mode 100644 index 0000000..35880ea --- /dev/null +++ b/python/gsfmodule.c @@ -0,0 +1,47 @@ +/* + * gsfmodule.c + * + * Copyright (C) 2002-2003 Jon K Hellan (hellan@acm.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +/* + * Python bindings for libgsf. + */ + +#include + +extern PyMethodDef pygsf_functions[]; +extern DL_EXPORT(void) init_gsf (void); + +extern void pygsf_register_classes(PyObject *d); + +DL_EXPORT(void) +init_gsf (void) +{ + PyObject *m, *d; + + init_pygobject (); + + m = Py_InitModule ((char *) "_gsf", pygsf_functions); + d = PyModule_GetDict (m); + + pygsf_register_classes (d); + + if (PyErr_Occurred ()) { + Py_FatalError ((char *) "can't initialise module gsf"); + } +} diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 0000000..85d7a8a --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,17 @@ +AM_CPPFLAGS = -I$(top_srcdir) $(LIBGSF_CFLAGS) $(LIBXML_CFLAGS) +LDADD = $(top_builddir)/gsf/libgsf-1.la $(LIBGSF_LIBS) + +check_PROGRAMS = test-msole1 test-msole2 test-cp-msole test-msvba \ + test-zip1 test-input1 test-cp \ + test-textline test-ls-zip test-cat-zip test-zip2 \ + test-cp-zip test-out-printf test-outmem-printf \ + test-msole-printf test-zip-out test-zip-out-subdirs \ + test-out-gzip1 test-out-gzip2 test-gzip1 test-gzip2 \ + test-out-bzip test-bzip \ + test-dump-msole test-restore-msole test-msvba-zip \ + test-http # test-xml + +if WITH_GIO +check_PROGRAMS += test-gio +test_gio_LDADD = $(top_builddir)/gsf/libgsf-1.la $(LDADD) $(LIBGSF_GIO_LIBS) +endif diff --git a/tests/Makefile.in b/tests/Makefile.in new file mode 100644 index 0000000..f6714d7 --- /dev/null +++ b/tests/Makefile.in @@ -0,0 +1,839 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test-msole1$(EXEEXT) test-msole2$(EXEEXT) \ + test-cp-msole$(EXEEXT) test-msvba$(EXEEXT) test-zip1$(EXEEXT) \ + test-input1$(EXEEXT) test-cp$(EXEEXT) test-textline$(EXEEXT) \ + test-ls-zip$(EXEEXT) test-cat-zip$(EXEEXT) test-zip2$(EXEEXT) \ + test-cp-zip$(EXEEXT) test-out-printf$(EXEEXT) \ + test-outmem-printf$(EXEEXT) test-msole-printf$(EXEEXT) \ + test-zip-out$(EXEEXT) test-zip-out-subdirs$(EXEEXT) \ + test-out-gzip1$(EXEEXT) test-out-gzip2$(EXEEXT) \ + test-gzip1$(EXEEXT) test-gzip2$(EXEEXT) test-out-bzip$(EXEEXT) \ + test-bzip$(EXEEXT) test-dump-msole$(EXEEXT) \ + test-restore-msole$(EXEEXT) test-msvba-zip$(EXEEXT) \ + test-http$(EXEEXT) $(am__EXEEXT_1) +@WITH_GIO_TRUE@am__append_1 = test-gio +subdir = tests +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/gsf-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +@WITH_GIO_TRUE@am__EXEEXT_1 = test-gio$(EXEEXT) +test_bzip_SOURCES = test-bzip.c +test_bzip_OBJECTS = test-bzip.$(OBJEXT) +test_bzip_LDADD = $(LDADD) +am__DEPENDENCIES_1 = +test_bzip_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +test_cat_zip_SOURCES = test-cat-zip.c +test_cat_zip_OBJECTS = test-cat-zip.$(OBJEXT) +test_cat_zip_LDADD = $(LDADD) +test_cat_zip_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_cp_SOURCES = test-cp.c +test_cp_OBJECTS = test-cp.$(OBJEXT) +test_cp_LDADD = $(LDADD) +test_cp_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_cp_msole_SOURCES = test-cp-msole.c +test_cp_msole_OBJECTS = test-cp-msole.$(OBJEXT) +test_cp_msole_LDADD = $(LDADD) +test_cp_msole_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_cp_zip_SOURCES = test-cp-zip.c +test_cp_zip_OBJECTS = test-cp-zip.$(OBJEXT) +test_cp_zip_LDADD = $(LDADD) +test_cp_zip_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_dump_msole_SOURCES = test-dump-msole.c +test_dump_msole_OBJECTS = test-dump-msole.$(OBJEXT) +test_dump_msole_LDADD = $(LDADD) +test_dump_msole_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_gio_SOURCES = test-gio.c +test_gio_OBJECTS = test-gio.$(OBJEXT) +am__DEPENDENCIES_2 = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +@WITH_GIO_TRUE@test_gio_DEPENDENCIES = \ +@WITH_GIO_TRUE@ $(top_builddir)/gsf/libgsf-1.la \ +@WITH_GIO_TRUE@ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) +test_gzip1_SOURCES = test-gzip1.c +test_gzip1_OBJECTS = test-gzip1.$(OBJEXT) +test_gzip1_LDADD = $(LDADD) +test_gzip1_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_gzip2_SOURCES = test-gzip2.c +test_gzip2_OBJECTS = test-gzip2.$(OBJEXT) +test_gzip2_LDADD = $(LDADD) +test_gzip2_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_http_SOURCES = test-http.c +test_http_OBJECTS = test-http.$(OBJEXT) +test_http_LDADD = $(LDADD) +test_http_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_input1_SOURCES = test-input1.c +test_input1_OBJECTS = test-input1.$(OBJEXT) +test_input1_LDADD = $(LDADD) +test_input1_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_ls_zip_SOURCES = test-ls-zip.c +test_ls_zip_OBJECTS = test-ls-zip.$(OBJEXT) +test_ls_zip_LDADD = $(LDADD) +test_ls_zip_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_msole_printf_SOURCES = test-msole-printf.c +test_msole_printf_OBJECTS = test-msole-printf.$(OBJEXT) +test_msole_printf_LDADD = $(LDADD) +test_msole_printf_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_msole1_SOURCES = test-msole1.c +test_msole1_OBJECTS = test-msole1.$(OBJEXT) +test_msole1_LDADD = $(LDADD) +test_msole1_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_msole2_SOURCES = test-msole2.c +test_msole2_OBJECTS = test-msole2.$(OBJEXT) +test_msole2_LDADD = $(LDADD) +test_msole2_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_msvba_SOURCES = test-msvba.c +test_msvba_OBJECTS = test-msvba.$(OBJEXT) +test_msvba_LDADD = $(LDADD) +test_msvba_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_msvba_zip_SOURCES = test-msvba-zip.c +test_msvba_zip_OBJECTS = test-msvba-zip.$(OBJEXT) +test_msvba_zip_LDADD = $(LDADD) +test_msvba_zip_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_out_bzip_SOURCES = test-out-bzip.c +test_out_bzip_OBJECTS = test-out-bzip.$(OBJEXT) +test_out_bzip_LDADD = $(LDADD) +test_out_bzip_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_out_gzip1_SOURCES = test-out-gzip1.c +test_out_gzip1_OBJECTS = test-out-gzip1.$(OBJEXT) +test_out_gzip1_LDADD = $(LDADD) +test_out_gzip1_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_out_gzip2_SOURCES = test-out-gzip2.c +test_out_gzip2_OBJECTS = test-out-gzip2.$(OBJEXT) +test_out_gzip2_LDADD = $(LDADD) +test_out_gzip2_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_out_printf_SOURCES = test-out-printf.c +test_out_printf_OBJECTS = test-out-printf.$(OBJEXT) +test_out_printf_LDADD = $(LDADD) +test_out_printf_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_outmem_printf_SOURCES = test-outmem-printf.c +test_outmem_printf_OBJECTS = test-outmem-printf.$(OBJEXT) +test_outmem_printf_LDADD = $(LDADD) +test_outmem_printf_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_restore_msole_SOURCES = test-restore-msole.c +test_restore_msole_OBJECTS = test-restore-msole.$(OBJEXT) +test_restore_msole_LDADD = $(LDADD) +test_restore_msole_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_textline_SOURCES = test-textline.c +test_textline_OBJECTS = test-textline.$(OBJEXT) +test_textline_LDADD = $(LDADD) +test_textline_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_zip_out_SOURCES = test-zip-out.c +test_zip_out_OBJECTS = test-zip-out.$(OBJEXT) +test_zip_out_LDADD = $(LDADD) +test_zip_out_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_zip_out_subdirs_SOURCES = test-zip-out-subdirs.c +test_zip_out_subdirs_OBJECTS = test-zip-out-subdirs.$(OBJEXT) +test_zip_out_subdirs_LDADD = $(LDADD) +test_zip_out_subdirs_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_zip1_SOURCES = test-zip1.c +test_zip1_OBJECTS = test-zip1.$(OBJEXT) +test_zip1_LDADD = $(LDADD) +test_zip1_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +test_zip2_SOURCES = test-zip2.c +test_zip2_OBJECTS = test-zip2.$(OBJEXT) +test_zip2_LDADD = $(LDADD) +test_zip2_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = test-bzip.c test-cat-zip.c test-cp.c test-cp-msole.c \ + test-cp-zip.c test-dump-msole.c test-gio.c test-gzip1.c \ + test-gzip2.c test-http.c test-input1.c test-ls-zip.c \ + test-msole-printf.c test-msole1.c test-msole2.c test-msvba.c \ + test-msvba-zip.c test-out-bzip.c test-out-gzip1.c \ + test-out-gzip2.c test-out-printf.c test-outmem-printf.c \ + test-restore-msole.c test-textline.c test-zip-out.c \ + test-zip-out-subdirs.c test-zip1.c test-zip2.c +DIST_SOURCES = test-bzip.c test-cat-zip.c test-cp.c test-cp-msole.c \ + test-cp-zip.c test-dump-msole.c test-gio.c test-gzip1.c \ + test-gzip2.c test-http.c test-input1.c test-ls-zip.c \ + test-msole-printf.c test-msole1.c test-msole2.c test-msvba.c \ + test-msvba-zip.c test-out-bzip.c test-out-gzip1.c \ + test-out-gzip2.c test-out-printf.c test-outmem-printf.c \ + test-restore-msole.c test-textline.c test-zip-out.c \ + test-zip-out-subdirs.c test-zip1.c test-zip2.c +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BONOBO_REQ = @BONOBO_REQ@ +BZ2_LIBS = @BZ2_LIBS@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURRENT_MINUS_AGE = @CURRENT_MINUS_AGE@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ +GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GNOMEVFS_REQ = @GNOMEVFS_REQ@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEXE = @LIBEXE@ +LIBGSF_BONOBO_CFLAGS = @LIBGSF_BONOBO_CFLAGS@ +LIBGSF_BONOBO_LIBS = @LIBGSF_BONOBO_LIBS@ +LIBGSF_CFLAGS = @LIBGSF_CFLAGS@ +LIBGSF_GIO_CFLAGS = @LIBGSF_GIO_CFLAGS@ +LIBGSF_GIO_LIBS = @LIBGSF_GIO_LIBS@ +LIBGSF_GNOME_CFLAGS = @LIBGSF_GNOME_CFLAGS@ +LIBGSF_GNOME_LIBS = @LIBGSF_GNOME_LIBS@ +LIBGSF_LIBS = @LIBGSF_LIBS@ +LIBGSF_MAJOR_VERSION = @LIBGSF_MAJOR_VERSION@ +LIBGSF_MICRO_VERSION = @LIBGSF_MICRO_VERSION@ +LIBGSF_MINOR_VERSION = @LIBGSF_MINOR_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +PYGTK_CFLAGS = @PYGTK_CFLAGS@ +PYGTK_CODEGEN = @PYGTK_CODEGEN@ +PYGTK_LIBS = @PYGTK_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +WARN_CFLAGS = @WARN_CFLAGS@ +WINDRES = @WINDRES@ +XGETTEXT = @XGETTEXT@ +Z_CPPFLAGS = @Z_CPPFLAGS@ +Z_LIBS = @Z_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CPPFLAGS = -I$(top_srcdir) $(LIBGSF_CFLAGS) $(LIBXML_CFLAGS) +LDADD = $(top_builddir)/gsf/libgsf-1.la $(LIBGSF_LIBS) +@WITH_GIO_TRUE@test_gio_LDADD = $(top_builddir)/gsf/libgsf-1.la $(LDADD) $(LIBGSF_GIO_LIBS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test-bzip$(EXEEXT): $(test_bzip_OBJECTS) $(test_bzip_DEPENDENCIES) + @rm -f test-bzip$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_bzip_OBJECTS) $(test_bzip_LDADD) $(LIBS) +test-cat-zip$(EXEEXT): $(test_cat_zip_OBJECTS) $(test_cat_zip_DEPENDENCIES) + @rm -f test-cat-zip$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_cat_zip_OBJECTS) $(test_cat_zip_LDADD) $(LIBS) +test-cp$(EXEEXT): $(test_cp_OBJECTS) $(test_cp_DEPENDENCIES) + @rm -f test-cp$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_cp_OBJECTS) $(test_cp_LDADD) $(LIBS) +test-cp-msole$(EXEEXT): $(test_cp_msole_OBJECTS) $(test_cp_msole_DEPENDENCIES) + @rm -f test-cp-msole$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_cp_msole_OBJECTS) $(test_cp_msole_LDADD) $(LIBS) +test-cp-zip$(EXEEXT): $(test_cp_zip_OBJECTS) $(test_cp_zip_DEPENDENCIES) + @rm -f test-cp-zip$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_cp_zip_OBJECTS) $(test_cp_zip_LDADD) $(LIBS) +test-dump-msole$(EXEEXT): $(test_dump_msole_OBJECTS) $(test_dump_msole_DEPENDENCIES) + @rm -f test-dump-msole$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_dump_msole_OBJECTS) $(test_dump_msole_LDADD) $(LIBS) +test-gio$(EXEEXT): $(test_gio_OBJECTS) $(test_gio_DEPENDENCIES) + @rm -f test-gio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_gio_OBJECTS) $(test_gio_LDADD) $(LIBS) +test-gzip1$(EXEEXT): $(test_gzip1_OBJECTS) $(test_gzip1_DEPENDENCIES) + @rm -f test-gzip1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_gzip1_OBJECTS) $(test_gzip1_LDADD) $(LIBS) +test-gzip2$(EXEEXT): $(test_gzip2_OBJECTS) $(test_gzip2_DEPENDENCIES) + @rm -f test-gzip2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_gzip2_OBJECTS) $(test_gzip2_LDADD) $(LIBS) +test-http$(EXEEXT): $(test_http_OBJECTS) $(test_http_DEPENDENCIES) + @rm -f test-http$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_http_OBJECTS) $(test_http_LDADD) $(LIBS) +test-input1$(EXEEXT): $(test_input1_OBJECTS) $(test_input1_DEPENDENCIES) + @rm -f test-input1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_input1_OBJECTS) $(test_input1_LDADD) $(LIBS) +test-ls-zip$(EXEEXT): $(test_ls_zip_OBJECTS) $(test_ls_zip_DEPENDENCIES) + @rm -f test-ls-zip$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_ls_zip_OBJECTS) $(test_ls_zip_LDADD) $(LIBS) +test-msole-printf$(EXEEXT): $(test_msole_printf_OBJECTS) $(test_msole_printf_DEPENDENCIES) + @rm -f test-msole-printf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_msole_printf_OBJECTS) $(test_msole_printf_LDADD) $(LIBS) +test-msole1$(EXEEXT): $(test_msole1_OBJECTS) $(test_msole1_DEPENDENCIES) + @rm -f test-msole1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_msole1_OBJECTS) $(test_msole1_LDADD) $(LIBS) +test-msole2$(EXEEXT): $(test_msole2_OBJECTS) $(test_msole2_DEPENDENCIES) + @rm -f test-msole2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_msole2_OBJECTS) $(test_msole2_LDADD) $(LIBS) +test-msvba$(EXEEXT): $(test_msvba_OBJECTS) $(test_msvba_DEPENDENCIES) + @rm -f test-msvba$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_msvba_OBJECTS) $(test_msvba_LDADD) $(LIBS) +test-msvba-zip$(EXEEXT): $(test_msvba_zip_OBJECTS) $(test_msvba_zip_DEPENDENCIES) + @rm -f test-msvba-zip$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_msvba_zip_OBJECTS) $(test_msvba_zip_LDADD) $(LIBS) +test-out-bzip$(EXEEXT): $(test_out_bzip_OBJECTS) $(test_out_bzip_DEPENDENCIES) + @rm -f test-out-bzip$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_out_bzip_OBJECTS) $(test_out_bzip_LDADD) $(LIBS) +test-out-gzip1$(EXEEXT): $(test_out_gzip1_OBJECTS) $(test_out_gzip1_DEPENDENCIES) + @rm -f test-out-gzip1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_out_gzip1_OBJECTS) $(test_out_gzip1_LDADD) $(LIBS) +test-out-gzip2$(EXEEXT): $(test_out_gzip2_OBJECTS) $(test_out_gzip2_DEPENDENCIES) + @rm -f test-out-gzip2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_out_gzip2_OBJECTS) $(test_out_gzip2_LDADD) $(LIBS) +test-out-printf$(EXEEXT): $(test_out_printf_OBJECTS) $(test_out_printf_DEPENDENCIES) + @rm -f test-out-printf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_out_printf_OBJECTS) $(test_out_printf_LDADD) $(LIBS) +test-outmem-printf$(EXEEXT): $(test_outmem_printf_OBJECTS) $(test_outmem_printf_DEPENDENCIES) + @rm -f test-outmem-printf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_outmem_printf_OBJECTS) $(test_outmem_printf_LDADD) $(LIBS) +test-restore-msole$(EXEEXT): $(test_restore_msole_OBJECTS) $(test_restore_msole_DEPENDENCIES) + @rm -f test-restore-msole$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_restore_msole_OBJECTS) $(test_restore_msole_LDADD) $(LIBS) +test-textline$(EXEEXT): $(test_textline_OBJECTS) $(test_textline_DEPENDENCIES) + @rm -f test-textline$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_textline_OBJECTS) $(test_textline_LDADD) $(LIBS) +test-zip-out$(EXEEXT): $(test_zip_out_OBJECTS) $(test_zip_out_DEPENDENCIES) + @rm -f test-zip-out$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_zip_out_OBJECTS) $(test_zip_out_LDADD) $(LIBS) +test-zip-out-subdirs$(EXEEXT): $(test_zip_out_subdirs_OBJECTS) $(test_zip_out_subdirs_DEPENDENCIES) + @rm -f test-zip-out-subdirs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_zip_out_subdirs_OBJECTS) $(test_zip_out_subdirs_LDADD) $(LIBS) +test-zip1$(EXEEXT): $(test_zip1_OBJECTS) $(test_zip1_DEPENDENCIES) + @rm -f test-zip1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_zip1_OBJECTS) $(test_zip1_LDADD) $(LIBS) +test-zip2$(EXEEXT): $(test_zip2_OBJECTS) $(test_zip2_DEPENDENCIES) + @rm -f test-zip2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_zip2_OBJECTS) $(test_zip2_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-bzip.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-cat-zip.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-cp-msole.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-cp-zip.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-cp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dump-msole.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-gio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-gzip1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-gzip2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-http.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-input1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ls-zip.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-msole-printf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-msole1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-msole2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-msvba-zip.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-msvba.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-out-bzip.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-out-gzip1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-out-gzip2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-out-printf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-outmem-printf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-restore-msole.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-textline.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-zip-out-subdirs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-zip-out.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-zip1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-zip2.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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 + +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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + 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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + 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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) +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: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-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-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS 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-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am + + +# 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/tests/test-bzip.c b/tests/test-bzip.c new file mode 100644 index 0000000..cab03f1 --- /dev/null +++ b/tests/test-bzip.c @@ -0,0 +1,78 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-bzip.c: + * + * Copyright (C) 2003-2006 Dom Lachowicz (cinamod@hotmail.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include + +static int +test (int argc, char *argv[]) +{ + GsfInput *input; + GsfInput *bzip; + GError *err = NULL; + int i; + + for (i = 1 ; i < argc ; i++) { + puts (argv[i]); + input = gsf_input_stdio_new (argv[i], &err); + if (input == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[i], err->message); + g_error_free (err); + err = NULL; + continue; + } + + bzip = gsf_input_memory_new_from_bzip (input, &err); + if (bzip == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' Not a BZip file: %s", argv[i], err->message); + g_error_free (err); + err = NULL; + g_object_unref (G_OBJECT (input)); + continue; + } + gsf_input_dump (bzip, FALSE); + + g_object_unref (G_OBJECT (bzip)); + g_object_unref (G_OBJECT (input)); + } + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-cat-zip.c b/tests/test-cat-zip.c new file mode 100644 index 0000000..d5e5984 --- /dev/null +++ b/tests/test-cat-zip.c @@ -0,0 +1,135 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-cat-zip.c: test program to list content and dump raw stream data + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include + +#include +#include +#include + +static void +ls_R (GsfInput *input) +{ + int i; + char const *name = gsf_input_name (GSF_INPUT (input)); + gboolean is_dir = GSF_IS_INFILE (input) && + (gsf_infile_num_children (GSF_INFILE (input)) >= 0); + + printf ("%c '%s'\t\t%" GSF_OFF_T_FORMAT "\n", + (is_dir ? 'd' : ' '), + (name != NULL) ? name : "", + gsf_input_size (GSF_INPUT (input))); + + if (is_dir) { + puts ("{"); + for (i = 0 ; i < gsf_infile_num_children (GSF_INFILE (input)) ; i++) + ls_R (gsf_infile_child_by_index (GSF_INFILE (input), i)); + puts ("}"); + } + + g_object_unref (G_OBJECT (input)); +} + +static int +test (int argc, char *argv[]) +{ + GsfInput *input; + GsfInfile *infile; + GError *err = NULL; + + fprintf (stderr, "%s\n", argv [1]); + input = gsf_input_stdio_new (argv[1], &err); + if (input == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[1], err->message); + g_error_free (err); + return 1; + } + + input = gsf_input_uncompress (input); + infile = gsf_infile_zip_new (input, &err); + g_object_unref (G_OBJECT (input)); + + if (infile == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' Not an OLE file: %s", argv[1], err->message); + g_error_free (err); + return 1; + } + + if (argc > 2) { + int i; + GsfInput *child, *ptr = GSF_INPUT (infile); + for (i = 2 ; i < argc && ptr != NULL; i++, ptr = child) { + fprintf (stderr, "--> '%s'\n", argv [i]); + if (GSF_IS_INFILE (ptr) && + gsf_infile_num_children (GSF_INFILE (ptr)) >= 0) { + child = gsf_infile_child_by_name (GSF_INFILE (ptr), argv [i]); + + if (child == NULL) { + g_warning ("No child named '%s'", argv [i]); + child = NULL; + break; + } + } else { + g_warning ("stream is not a directory '%s'", argv [i]); + child = NULL; + break; + } + g_object_unref (G_OBJECT (ptr)); + } + if (ptr != NULL) { + if (GSF_IS_INFILE (ptr) && + gsf_infile_num_children (GSF_INFILE (ptr)) >= 0) + ls_R (ptr); /* unrefs infile */ + else { + gsf_input_dump (GSF_INPUT (ptr), FALSE); + g_object_unref (G_OBJECT (ptr)); + } + } + } else + ls_R (GSF_INPUT (infile)); /* unrefs infile */ + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + if (argc < 2) { + fprintf (stderr, "%s : file stream stream ...\n", argv [0]); + return 1; + } + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-cp-msole.c b/tests/test-cp-msole.c new file mode 100644 index 0000000..e076bb4 --- /dev/null +++ b/tests/test-cp-msole.c @@ -0,0 +1,160 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-cp-msole.c: Test gsf-outfile-msole by cloning a file the hard way + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include + +#include +#include +#include + +#include +#include +#include + +#include + +static void clone_dir (GsfInfile *in, GsfOutfile *out); + +static void +clone (GsfInput *input, GsfOutput *output) +{ + if (gsf_input_size (input) > 0) { + guint8 const *data; + size_t len; + + while ((len = gsf_input_remaining (input)) > 0) { + /* copy in odd sized chunks to exercise system */ + if (len > 314) + len = 314; + if (NULL == (data = gsf_input_read (input, len, NULL))) { + g_warning ("error reading ?"); + return; + } + if (!gsf_output_write (output, len, data)) { + g_warning ("error writing ?"); + return; + } + } + } else if (GSF_IS_INFILE(input)) + clone_dir (GSF_INFILE(input), GSF_OUTFILE(output)); + + gsf_output_close (output); + g_object_unref (G_OBJECT (output)); + g_object_unref (G_OBJECT (input)); +} + +static void +clone_dir (GsfInfile *in, GsfOutfile *out) +{ + GsfInput *new_input; + GsfOutput *new_output; + gboolean is_dir; + int i; + + for (i = 0 ; i < gsf_infile_num_children (in) ; i++) { + new_input = gsf_infile_child_by_index (in, i); + + /* In theory, if new_file is a regular file (not directory), + * it should be GsfInput only, not GsfInfile, as it is not + * structured. However, having each Infile define a 2nd class + * that only inherited from Input was cumbersome. So in + * practice, the convention is that new_input is always + * GsfInfile, but regular file is distinguished by having -1 + * children. + */ + is_dir = GSF_IS_INFILE (new_input) && + gsf_infile_num_children (GSF_INFILE (new_input)) >= 0; + + new_output = gsf_outfile_new_child (out, + gsf_infile_name_by_index (in, i), + is_dir); + + clone (new_input, new_output); + } + /* An observation: when you think about the explanation to is_dir + * above, you realize that clone_dir is called even for regular files. + * But nothing bad happens, as the loop is never entered. + */ +} + +static int +test (char *argv[]) +{ + GsfInput *input; + GsfInfile *infile; + GsfOutput *output; + GsfOutfile *outfile; + GError *err = NULL; + + fprintf (stderr, "%s\n", argv [1]); + input = gsf_input_stdio_new (argv[1], &err); + if (input == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[1], err->message); + g_error_free (err); + return 1; + } + + infile = gsf_infile_msole_new (input, &err); + g_object_unref (G_OBJECT (input)); + + if (infile == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' Not an OLE file: %s", argv[1], err->message); + g_error_free (err); + return 1; + } + + output = gsf_output_stdio_new (argv[2], &err); + if (output == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[2], err->message); + g_error_free (err); + g_object_unref (G_OBJECT (infile)); + return 1; + } + + outfile = gsf_outfile_msole_new (output); + g_object_unref (G_OBJECT (output)); + clone (GSF_INPUT (infile), GSF_OUTPUT (outfile)); + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + if (argc != 3) { + fprintf (stderr, "%s : infile outfile\n", argv [0]); + return 1; + } + + gsf_init (); + res = test (argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-cp-zip.c b/tests/test-cp-zip.c new file mode 100644 index 0000000..5523f33 --- /dev/null +++ b/tests/test-cp-zip.c @@ -0,0 +1,160 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-cp-zip.c: Test gsf-outfile-zip by cloning a file the hard way + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include + +#include +#include +#include + +#include +#include +#include + +#include + +static void +clone (GsfInfile *in, GsfOutfile *out) +{ + GsfInput *input = GSF_INPUT (in); + GsfOutput *output = GSF_OUTPUT (out); + + if (gsf_input_size (input) > 0) { + size_t len; + while ((len = gsf_input_remaining (input)) > 0) { + guint8 const *data; + /* copy in odd sized chunks to exercise system */ + if (len > 314) + len = 314; + if (NULL == (data = gsf_input_read (input, len, NULL))) { + g_warning ("error reading ?"); + break; + } + if (!gsf_output_write (output, len, data)) { + g_warning ("error writing ?"); + break; + } + } + } else { + int i, n = gsf_infile_num_children (in); + for (i = 0 ; i < n; i++) { + int level; + gboolean is_dir; + char const *name = gsf_infile_name_by_index (in, i); + char *display_name = name + ? g_filename_display_name (name) + : NULL; + + input = gsf_infile_child_by_index (in, i); + if (NULL == input) { + g_print ("Error opening '%s, index = %d\n", + display_name ? display_name : "?", i); + g_free (display_name); + continue; + } + + is_dir = gsf_infile_num_children (GSF_INFILE (input)) >= 0; + + g_object_get (G_OBJECT (input), "compression-level", &level, NULL); + + g_print ("%s: size=%ld, level=%d, %s\n", + display_name ? display_name : "?", + (long)gsf_input_size (input), + level, + is_dir ? "directory" : "file"); + g_free (display_name); + + output = gsf_outfile_new_child_full (out, name, is_dir, + "compression-level", level, + NULL); + clone (GSF_INFILE (input), GSF_OUTFILE (output)); + } + } + gsf_output_close (GSF_OUTPUT (out)); + g_object_unref (G_OBJECT (out)); + g_object_unref (G_OBJECT (in)); +} + +static int +test (char *argv[]) +{ + GsfInput *input; + GsfInfile *infile; + GsfOutput *output; + GsfOutfile *outfile; + GError *err = NULL; + + fprintf (stderr, "%s\n", argv [1]); + input = gsf_input_stdio_new (argv[1], &err); + if (input == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[1], err->message); + g_error_free (err); + return 1; + } + + infile = gsf_infile_zip_new (input, &err); + g_object_unref (G_OBJECT (input)); + + if (infile == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' Not a zip file: %s", argv[1], err->message); + g_error_free (err); + return 1; + } + + output = gsf_output_stdio_new (argv[2], &err); + if (output == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[2], err->message); + g_error_free (err); + g_object_unref (G_OBJECT (infile)); + return 1; + } + + outfile = gsf_outfile_zip_new (output, &err); + g_object_unref (G_OBJECT (output)); + clone (infile, outfile); + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + if (argc != 3) { + fprintf (stderr, "%s : infile outfile\n", argv [0]); + return 1; + } + + gsf_init (); + res = test (argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-cp.c b/tests/test-cp.c new file mode 100644 index 0000000..26d9667 --- /dev/null +++ b/tests/test-cp.c @@ -0,0 +1,90 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-cp-zip.c: Test gsf_input_copy + * + * Copyright (C) 2002-2006 Dom Lachowicz + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include + +static int +test (char *argv[]) +{ + GsfInput *input; + GsfOutput *output; + GError *err = NULL; + int rval = 0; + + input = gsf_input_stdio_new (argv[1], &err); + if (input == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s\n", argv[1], err->message); + g_error_free (err); + return 1; + } + + output = gsf_output_stdio_new (argv[2], &err); + if (output == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s\n", argv[2], err->message); + g_error_free (err); + + g_object_unref (G_OBJECT (input)); + return 1; + } + + if (gsf_input_copy (input, output) == FALSE) { + rval = 1; + err = (GError*) gsf_output_error (output); + if (err != NULL) { + g_warning ("'%s' error: %s\n", argv[2], err->message); + } + } + + g_object_unref (G_OBJECT (input)); + + gsf_output_close (output); + g_object_unref (G_OBJECT (output)); + + return rval; +} + +int +main (int argc, char *argv[]) +{ + int res; + + if (argc != 3) { + fprintf (stderr, "%s : infile outfile\n", argv [0]); + return 1; + } + + gsf_init (); + res = test (argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-dump-msole.c b/tests/test-dump-msole.c new file mode 100644 index 0000000..1012b91 --- /dev/null +++ b/tests/test-dump-msole.c @@ -0,0 +1,141 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-dump-msole.c: Export a msole file to a directory tree + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include + +#include +#include +#include + +#include +#include +#include + +#include + +static void +clone (GsfInput *input, GsfOutput *output) +{ + guint8 const *data; + size_t len; + int i; + + if (gsf_input_size (input) > 0) { + while ((len = gsf_input_remaining (input)) > 0) { + /* copy in odd sized chunks to exercise system */ + if (len > 314) + len = 314; + if (NULL == (data = gsf_input_read (input, len, NULL))) { + g_warning ("error reading ?"); + return; + } + if (!gsf_output_write (output, len, data)) { + g_warning ("error writing ?"); + return; + } + } + } + + /* See test-cp-msole.c for explanation how to distinct directories + * from regular files. + */ + if (GSF_IS_INFILE (input) && + gsf_infile_num_children (GSF_INFILE (input)) > 0) { + GsfInfile *in = GSF_INFILE (input); + GsfOutfile *out = GSF_OUTFILE (output); + GsfInput *src; + GsfOutput *dst; + gboolean is_dir; + + for (i = 0 ; i < gsf_infile_num_children (in) ; i++) { + src = gsf_infile_child_by_index (in, i); + is_dir = GSF_IS_INFILE (src) && + gsf_infile_num_children (GSF_INFILE (src)) >= 0; + dst = gsf_outfile_new_child (out, + gsf_infile_name_by_index (in, i), + is_dir); + clone (src, dst); + } + } + + gsf_output_close (output); + g_object_unref (G_OBJECT (output)); + g_object_unref (G_OBJECT (input)); +} + +static int +test (char *argv[]) +{ + GsfInput *input; + GsfInfile *infile; + GsfOutfile *outfile; + GError *err = NULL; + + fprintf (stderr, "%s\n", argv [1]); + input = gsf_input_stdio_new (argv[1], &err); + if (input == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[1], err->message); + g_error_free (err); + return 1; + } + + infile = gsf_infile_msole_new (input, &err); + g_object_unref (G_OBJECT (input)); + + if (infile == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' Not an OLE file: %s", argv[1], err->message); + g_error_free (err); + return 1; + } + + outfile = gsf_outfile_stdio_new (argv[2], &err); + if (outfile == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[1], err->message); + g_error_free (err); + return 1; + } + clone (GSF_INPUT (infile), GSF_OUTPUT (outfile)); + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + if (argc != 3) { + fprintf (stderr, "%s : infile outdir\n", argv [0]); + return 1; + } + + gsf_init (); + res = test (argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-gio.c b/tests/test-gio.c new file mode 100644 index 0000000..0c93d58 --- /dev/null +++ b/tests/test-gio.c @@ -0,0 +1,90 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-cp-zip.c: Test gsf_input_copy + * + * Copyright (C) 2002-2006 Dom Lachowicz + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include + +static int +test (char *argv[]) +{ + GsfInput *input; + GsfOutput *output; + GError *err = NULL; + int rval = 0; + + input = gsf_input_gio_new_for_path (argv[1], &err); + if (input == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s\n", argv[1], err->message); + g_error_free (err); + return 1; + } + + output = gsf_output_gio_new_for_path (argv[2], &err); + if (output == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s\n", argv[2], err->message); + g_error_free (err); + + g_object_unref (G_OBJECT (input)); + return 1; + } + + if (gsf_input_copy (input, output) == FALSE) { + rval = 1; + err = (GError*) gsf_output_error (output); + if (err != NULL) { + g_warning ("'%s' error: %s\n", argv[2], err->message); + } + } + + g_object_unref (G_OBJECT (input)); + + gsf_output_close (output); + g_object_unref (G_OBJECT (output)); + + return rval; +} + +int +main (int argc, char *argv[]) +{ + int res; + + if (argc != 3) { + fprintf (stderr, "%s : infile outfile\n", argv [0]); + return 1; + } + + gsf_init (); + res = test (argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-gzip1.c b/tests/test-gzip1.c new file mode 100644 index 0000000..6821a0c --- /dev/null +++ b/tests/test-gzip1.c @@ -0,0 +1,79 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-gzip1.c: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include + +#include + +static int +test (int argc, char *argv[]) +{ + GsfInput *input; + GsfInput *gzip; + GError *err = NULL; + int i; + + for (i = 1 ; i < argc ; i++) { + puts (argv[i]); + input = gsf_input_stdio_new (argv[i], &err); + if (input == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[i], err->message); + g_error_free (err); + err = NULL; + continue; + } + + gzip = gsf_input_gzip_new (input, &err); + if (gzip == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' Not a GZip file: %s", argv[i], err->message); + g_error_free (err); + err = NULL; + g_object_unref (G_OBJECT (input)); + continue; + } + gsf_input_dump (gzip, FALSE); + + g_object_unref (G_OBJECT (gzip)); + g_object_unref (G_OBJECT (input)); + } + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-gzip2.c b/tests/test-gzip2.c new file mode 100644 index 0000000..f315ba1 --- /dev/null +++ b/tests/test-gzip2.c @@ -0,0 +1,85 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-gzip2.c: + * + * Copyright (C) 2002-2003 Jody Goldberg (jody@gnome.org) + * Copyright (C) 2005-2006 Morten Welinder (terra@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include + +#include + +static int +test (int argc, char *argv[]) +{ + GsfInput *input; + GsfInput *gzip; + GError *err = NULL; + int i; + + for (i = 1 ; i < argc ; i++) { + puts (argv[i]); + input = gsf_input_stdio_new (argv[i], &err); + if (input == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[i], err->message); + g_error_free (err); + err = NULL; + continue; + } + + /* + * We must know the length of the uncompressed file in advance. + * test-out-gzip2's output uncompresses to 90 bytes. + */ + gzip = g_object_new (GSF_INPUT_GZIP_TYPE, + "source", input, + "raw", TRUE, + "uncompressed_size", (gsf_off_t)90, + NULL); + if (gzip == NULL) { + g_warning ("'%s' Not a GZip file: %s", argv[i], "???" /* err->message */); + g_error_free (err); + err = NULL; + g_object_unref (G_OBJECT (input)); + continue; + } + gsf_input_dump (gzip, FALSE); + + g_object_unref (G_OBJECT (gzip)); + g_object_unref (G_OBJECT (input)); + } + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-http.c b/tests/test-http.c new file mode 100644 index 0000000..9f2387b --- /dev/null +++ b/tests/test-http.c @@ -0,0 +1,65 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-http.c: + * + * Copyright (C) 2006 Michael Lawrence (lawremi@iastate.edu) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include + +#include + +static int +test (int argc, char *argv[]) +{ + GsfInput *input; + GError *err = NULL; + int i; + + for (i = 1 ; i < argc ; i++) { + puts (argv[i]); + input = gsf_input_http_new (argv[i], &err); + if (input == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[i], err->message); + g_error_free (err); + err = NULL; + continue; + } + + gsf_input_dump (input, FALSE); + + g_object_unref (G_OBJECT (input)); + } + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-input1.c b/tests/test-input1.c new file mode 100644 index 0000000..b7c5261 --- /dev/null +++ b/tests/test-input1.c @@ -0,0 +1,62 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-input1.c: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include + +#include + +static int +test (int argc, char *argv[]) +{ + GsfInput *input; + GError *err = NULL; + + if (argc != 3) { + fprintf (stderr, "Usage : %s infile outfile\n", argv[0]); + return 1; + } + + input = gsf_input_stdio_new (argv[1], &err); + if (input == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[1], err->message); + g_error_free (err); + return 1; + } else + g_object_unref (G_OBJECT (input)); + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-ls-zip.c b/tests/test-ls-zip.c new file mode 100644 index 0000000..1cef7dd --- /dev/null +++ b/tests/test-ls-zip.c @@ -0,0 +1,91 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-ls-zip.c: test program to list content of zip files. + * + * Copyright (C) 2002-2006 Tambet Ingo (tambet@ximian.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include + +#include +#include +#include + +static int +test (int argc, char *argv[]) +{ + GsfInput *input; + GsfInfile *infile; + GError *err = NULL; + gint i, j; + + for (i = 1; i < argc; i++) { + fprintf (stderr, "%s\n", argv [i]); + input = gsf_input_stdio_new (argv[i], &err); + if (input == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[i], err->message); + g_error_free (err); + return 1; + } + + input = gsf_input_uncompress (input); + infile = gsf_infile_zip_new (input, &err); + g_object_unref (G_OBJECT (input)); + + if (infile == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' Not a zip file: %s", argv[i], err->message); + g_error_free (err); + return 1; + } + + for (j = 0; j < gsf_infile_num_children (infile); j++) { + GsfInput *child = gsf_infile_child_by_index (infile, j); + + g_print ("\t%s\t\t%" GSF_OFF_T_FORMAT "\n", gsf_input_name (child), gsf_input_size (child)); + g_object_unref (G_OBJECT (child)); + } + + g_object_unref (G_OBJECT (infile)); + } + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + if (argc < 2) { + fprintf (stderr, "%s : file.zip ...\n", argv [0]); + return 1; + } + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-msole-printf.c b/tests/test-msole-printf.c new file mode 100644 index 0000000..61f7faa --- /dev/null +++ b/tests/test-msole-printf.c @@ -0,0 +1,106 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-msole-printf.c: Create a simple msole file. + * + * Copyright (C) 2002-2006 Jon K Hellan (hellan@acm.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include + +#include + +static gboolean +test_write_once (GsfOutput *output) +{ + if (!gsf_output_printf (output, + "The %s sat on the %s.\n", "cat", "mat")) + return FALSE; + if (!gsf_output_printf (output, "%d %ss sat on the %s.\n", + 2, "cat", "mat")) + return FALSE; + if (!gsf_output_puts (output, + "The quick brown fox is afraid of the cats.\n")) + return FALSE; + + return TRUE; +} + +static int +test (int argc, char *argv[]) +{ + GsfOutput *output; + GsfOutfile *outfile; + GsfOutput *small; + GsfOutput *large; + GError *err = NULL; + int i; + + if (argc != 2) { + fprintf (stderr, "Usage : %s outfile\n", argv[0]); + return 1; + } + + output = gsf_output_stdio_new (argv[1], &err); + if (output == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[1], err->message); + g_error_free (err); + return 1; + } + outfile = gsf_outfile_msole_new (output); + g_object_unref (G_OBJECT (output)); + + small = gsf_outfile_new_child (outfile, "small", FALSE); + if (!test_write_once (small)) + return 1; + if (!gsf_output_close (small)) + return 1; + g_object_unref (G_OBJECT(small)); + + large = gsf_outfile_new_child (outfile, "large", FALSE); + for (i = 1; i <= 100; i++) { + if (!gsf_output_printf (large, "=== Round %d ===\n", i)) + return 1; + if (!test_write_once (large)) + return 1; + } + if (!gsf_output_close (large)) + return 1; + g_object_unref (G_OBJECT(large)); + + if (!gsf_output_close (GSF_OUTPUT (outfile))) + return 1; + g_object_unref (G_OBJECT (outfile)); + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-msole1.c b/tests/test-msole1.c new file mode 100644 index 0000000..d07bbf9 --- /dev/null +++ b/tests/test-msole1.c @@ -0,0 +1,280 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-msole1.c: test program to dump biff streams + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * Copyright (C) 2002-2003 Michael Meeks (michael.meeks@novell.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * Parts of this code are taken from libole2/test/test-ole.c + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define BIFF_TYPES_FILE "biff-types.h" +#define DUMP_CONTENT + +typedef struct { + guint16 opcode; + char *name; +} GENERIC_TYPE; + +#ifdef DUMP_CONTENT +static GPtrArray *biff_types = NULL; +static void +read_types (char const *fname, GPtrArray **types) +{ + FILE *file = fopen(fname, "r"); + unsigned char buffer[1024]; + *types = g_ptr_array_new (); + if (!file) { + char *newname = g_strconcat ("../", fname, NULL); + file = fopen (newname, "r"); + } + if (!file) { + g_printerr ("Can't find vital file '%s'\n", fname); + return; + } + while (!feof(file)) { + unsigned char *p; + fgets ((char *)buffer, sizeof (buffer)-1, file); + for (p=buffer;*p;p++) + if (*p=='0' && *(p+1)=='x') { + GENERIC_TYPE *bt = g_new (GENERIC_TYPE,1); + unsigned char *name, *pt; + bt->opcode=strtol((char *)p+2,0,16); + pt = buffer; + while (*pt && *pt != '#') pt++; /* # */ + while (*pt && !isspace(*pt)) + pt++; /* define */ + while (*pt && isspace((unsigned char)*pt)) + pt++; /* ' ' */ + while (*pt && *pt != '_') pt++; /* BIFF_ */ + name = *pt?pt+1:pt; + while (*pt && !isspace((unsigned char)*pt)) + pt++; + bt->name = g_strndup ((gchar *)name, (unsigned)(pt - name)); + g_ptr_array_add (*types, bt); + break; + } + } + fclose (file); +} + +static char const * +get_biff_opcode_name (unsigned opcode) +{ + int lp; + if (!biff_types) + read_types (BIFF_TYPES_FILE, &biff_types); + /* Count backwars to give preference to non-filtered record types */ + for (lp=biff_types->len; --lp >= 0 ;) { + GENERIC_TYPE *bt = g_ptr_array_index (biff_types, lp); + if (bt->opcode == opcode) + return bt->name; + } + return "Unknown"; +} + +static void +dump_biff_stream (GsfInput *stream) +{ + guint8 const *data; + guint16 len, opcode; + unsigned pos = gsf_input_tell (stream); + + while (NULL != (data = gsf_input_read (stream, 4, NULL))) { + gboolean enable_dump = TRUE; + + opcode = GSF_LE_GET_GUINT16 (data); + len = GSF_LE_GET_GUINT16 (data+2); + + if (len > 15000) { + enable_dump = TRUE; + g_warning ("Suspicious import of biff record > 15,000 (0x%x) for opcode 0x%hx", + len, opcode); + } else if ((opcode & 0xff00) > 0x1000) { + enable_dump = TRUE; + g_warning ("Suspicious import of biff record with opcode 0x%hx", + opcode); + } + + if (enable_dump) + printf ("Opcode 0x%3hx : %15s, length 0x%hx (=%hd)\n", + opcode, get_biff_opcode_name (opcode), + len, len); + + if (len > 0) { + data = gsf_input_read (stream, len, NULL); + if (data == NULL) + break; + if (enable_dump) + gsf_mem_dump (data, len); + } + pos = gsf_input_tell (stream); + } +} +#endif /* DUMP_CONTENT */ + +static int +test (unsigned argc, char *argv[]) +{ + static char const * const stream_names[] = { + "Workbook", "WORKBOOK", "workbook", + "Book", "BOOK", "book" + }; + + GsfInput *input, *stream, *pcache_dir; + GsfInfile *infile; + GError *err = NULL; + unsigned i, j; + + for (i = 1 ; i < argc ; i++) { + fprintf( stderr, "%s\n",argv[i]); + + input = gsf_input_mmap_new (argv[i], NULL); + if (input == NULL) /* Only report error if stdio fails too */ + input = gsf_input_stdio_new (argv[i], &err); + if (input == NULL) { + g_return_val_if_fail (err != NULL, 1); + g_warning ("'%s' error: %s", argv[i], err->message); + g_error_free (err); + err = NULL; + continue; + } + + input = gsf_input_uncompress (input); + + infile = gsf_infile_msole_new (input, &err); + + if (infile == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' Not an OLE file: %s", argv[i], err->message); + g_error_free (err); + err = NULL; + +#ifdef DUMP_CONTENT + dump_biff_stream (input); +#endif + + g_object_unref (G_OBJECT (input)); + continue; + } +#if 0 + stream = gsf_infile_child_by_name (infile, "\01CompObj"); + if (stream != NULL) { + gsf_off_t len = gsf_input_size (stream); + guint8 const *data = gsf_input_read (stream, len, NULL); + if (data != NULL) + gsf_mem_dump (data, len); + g_object_unref (G_OBJECT (stream)); + } + return 0; +#endif + + stream = gsf_infile_child_by_name (infile, "\05SummaryInformation"); + if (stream != NULL) { + GsfDocMetaData *meta_data = gsf_doc_meta_data_new (); + + puts ( "SummaryInfo"); + err = gsf_msole_metadata_read (stream, meta_data); + if (err != NULL) { + g_warning ("'%s' error: %s", argv[i], err->message); + g_error_free (err); + err = NULL; + } else + gsf_doc_meta_dump (meta_data); + + g_object_unref (meta_data); + g_object_unref (G_OBJECT (stream)); + } + + stream = gsf_infile_child_by_name (infile, "\05DocumentSummaryInformation"); + if (stream != NULL) { + GsfDocMetaData *meta_data = gsf_doc_meta_data_new (); + + puts ( "DocSummaryInfo"); + err = gsf_msole_metadata_read (stream, meta_data); + if (err != NULL) { + g_warning ("'%s' error: %s", argv[i], err->message); + g_error_free (err); + err = NULL; + } else + gsf_doc_meta_dump (meta_data); + + g_object_unref (meta_data); + g_object_unref (G_OBJECT (stream)); + } + + for (j = 0 ; j < G_N_ELEMENTS (stream_names) ; j++) { + stream = gsf_infile_child_by_name (infile, stream_names[j]); + if (stream != NULL) { + puts (j < 3 ? "Excel97" : "Excel95"); +#ifdef DUMP_CONTENT + dump_biff_stream (stream); +#endif + g_object_unref (G_OBJECT (stream)); + break; + } + } + +#ifdef DUMP_CONTENT + pcache_dir = gsf_infile_child_by_name (infile, "_SX_DB_CUR"); /* Excel 97 */ + if (NULL == pcache_dir) + pcache_dir = gsf_infile_child_by_name (infile, "_SX_DB"); /* Excel 95 */ + if (NULL != pcache_dir) { + int i, n = gsf_infile_num_children (infile); + for (i = 0 ; i < n ; i++) { + stream = gsf_infile_child_by_index (GSF_INFILE (pcache_dir), i); + if (stream != NULL) { + printf ("=================================================\nPivot cache '%04hX'\n\n", i); + + dump_biff_stream (stream); + g_object_unref (G_OBJECT (stream)); + } + } + g_object_unref (G_OBJECT (pcache_dir)); + } +#endif + + g_object_unref (G_OBJECT (infile)); + g_object_unref (G_OBJECT (input)); + } + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-msole2.c b/tests/test-msole2.c new file mode 100644 index 0000000..31d7ea6 --- /dev/null +++ b/tests/test-msole2.c @@ -0,0 +1,149 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-msole2.c: test program to list content and dump raw stream data + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include + +#include +#include +#include +#include + +static gboolean dump_as_hex = FALSE; + +static void +ls_R (GsfInput *input) +{ + char const *name = gsf_input_name (input); + gboolean is_dir = GSF_IS_INFILE (input) && + (gsf_infile_num_children (GSF_INFILE (input)) >= 0); + /* Please see the comment on is_dir in test-cp-msole.c. */ + + printf ("%c '%s'\t\t%" GSF_OFF_T_FORMAT "\n", + (is_dir ? 'd' : ' '), + (name != NULL) ? name : "", + gsf_input_size (input)); + + if (is_dir) { + GsfInfile *infile = GSF_INFILE (input); + int i; + + puts ("{"); + for (i = 0 ; i < gsf_infile_num_children (infile) ; i++) + ls_R (gsf_infile_child_by_index (infile, i)); + puts ("}"); + } + + g_object_unref (G_OBJECT (input)); +} + +static int +test (int argc, char *argv[]) +{ + GsfInput *input; + GsfInfile *infile; + GError *err = NULL; + + fprintf (stderr, "%s\n", argv [1]); + input = gsf_input_stdio_new (argv[1], &err); + if (input == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[1], err->message); + g_error_free (err); + return 1; + } + + input = gsf_input_uncompress (input); + infile = gsf_infile_msole_new (input, &err); + g_object_unref (G_OBJECT (input)); + + if (infile == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' Not an OLE file: %s", argv[1], err->message); + g_error_free (err); + return 1; + } + + if (argc > 2) { + int i; + GsfInput *child, *ptr = GSF_INPUT (infile); + + for (i = 2 ; i < argc && ptr != NULL; i++, ptr = child) { + fprintf (stderr, "--> '%s'\n", argv [i]); + if (GSF_IS_INFILE (ptr) && + gsf_infile_num_children (GSF_INFILE (ptr)) >= 0) { + child = gsf_infile_child_by_name (GSF_INFILE (ptr), argv [i]); + if (child == NULL) { + g_warning ("No child named '%s'", argv [i]); + child = NULL; + } + } else { + g_warning ("stream is not a directory '%s'", argv [i]); + child = NULL; + } + g_object_unref (G_OBJECT (ptr)); + } + if (ptr != NULL) { + /* See the comment on is_dir in test-cp-msole.c. */ + if (GSF_IS_INFILE (ptr) && + gsf_infile_num_children (GSF_INFILE (ptr)) >= 0) + ls_R (ptr); /* unrefs infile */ + else { + gsf_input_dump (GSF_INPUT (ptr), dump_as_hex); + g_object_unref (G_OBJECT (ptr)); + } + } + } else + ls_R (GSF_INPUT (infile)); /* unrefs infile */ + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + char *progname = argv[0]; + + if (argc >= 2 && argv[1] != NULL && 0 == strcmp (argv[1], "--hex")) { + dump_as_hex = TRUE; + argv++; + argc--; + } + + if (argc < 2) { + fprintf (stderr, "Usage: %s [--hex] file stream stream ...\n\n", progname); + fprintf (stderr, "For example, \"%s X A B C\" dumps the streem C " + "from directory A/B from file X.\n", progname); + return 1; + } + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-msvba-zip.c b/tests/test-msvba-zip.c new file mode 100644 index 0000000..003bc13 --- /dev/null +++ b/tests/test-msvba-zip.c @@ -0,0 +1,382 @@ +#include +#include +#include +#include +#include +#include + +#define VBA_COMPRESSION_WINDOW 4096 + +#define HEADER_SIZE 3 + +/* Brute force and ugliness ! */ +typedef struct { + guint8 inblock[VBA_COMPRESSION_WINDOW]; + guint length; + guint pos; + guint8 shift; + + guint8 mask; + GString *outstr; + + GsfOutput *output; +} CompressBuf; + +#define DEBUG + +static char +byte_to_char (guint8 data) +{ + return data >= 0x20 && data < 126 ? data : '.'; +} + +static gint +get_shift (guint cur_pos) +{ + int shift; + + if (cur_pos <= 0x80) { + if (cur_pos <= 0x20) + shift = (cur_pos <= 0x10) ? 12 : 11; + else + shift = (cur_pos <= 0x40) ? 10 : 9; + } else { + if (cur_pos <= 0x200) + shift = (cur_pos <= 0x100) ? 8 : 7; + else if (cur_pos <= 0x800) + shift = (cur_pos <= 0x400) ? 6 : 5; + else + shift = 4; + } + + return shift; +} + +static gint +find_match (CompressBuf *buf, guint pos, guint *len) +{ + gint i; + guint max_match = (1 << get_shift (pos)) - 1; + + /* FIXME: the MS impl. does different to a linear search here + and is not very good at this either; is happy to get much + worse matches; perhaps some single-entry match lookup table ? + it seems to ~regularly truncate strings, and get earlier + / later matches of equivalent length with no predictability + ( hashing ? ). + */ + for (i = pos - 1; i >= 0; i--) { + guint j; + + for (j = 0; j < buf->length - pos && j < pos; j++) + if (buf->inblock[pos + j] != buf->inblock[i + j]) + break; + + if (j >= 3) { + *len = MIN (j, max_match); + return i; + } + } + return -1; +} + +static void +output_data (CompressBuf *buf, guint8 *data, gboolean compressed) +{ + if (compressed) { + buf->mask |= 1 << buf->shift; + g_string_append_c (buf->outstr, data [0]); + g_string_append_c (buf->outstr, data [1]); + } else + g_string_append_c (buf->outstr, data [0]); + + buf->shift++; + if (buf->shift == 8) { + guint i; + + gsf_output_write (buf->output, 1, &buf->mask); + gsf_output_write (buf->output, buf->outstr->len, buf->outstr->str); + +#ifdef DEBUG + fprintf (stderr, "Block: 0x%x '", buf->mask); + for (i = 0; i < buf->outstr->len; i++) + fprintf (stderr, "%c", byte_to_char (buf->outstr->str[i])); + fprintf (stderr, "'\n"); +#endif + + buf->mask = 0; + buf->shift = 0; + g_string_set_size (buf->outstr, 0); + } +} + +static void +output_match (CompressBuf *buf, guint cur_pos, guint pos, guint len) +{ + int shift, token, distance; + guint8 data[2]; + + shift = get_shift (cur_pos); + + distance = cur_pos - pos - 1; + + /* Window size issue !? - get a better match later with a larger window !? */ + + token = (distance << shift) + ((len - 3) & ((1<<(shift + 1))-1)); + data[0] = token & 0xff; + data[1] = token >> 8; + +#ifdef DEBUG + fprintf (stderr, "shift %d, [0x%x(%d) - %d], len %d, distance %d bytes %.2x %.2x\n", + shift, cur_pos, cur_pos, pos, len, distance, + data[0], data[1]); + if (cur_pos + len >= (1u<length;) { + if ((match = find_match (buf, pos, &len)) >= 0) { + output_match (buf, pos, match, len); + pos += len; + } else + output_data (buf, &(buf->inblock[pos++]), FALSE); + } +} + +static void +do_compress (GsfInput *input, GsfOutput *output) +{ + CompressBuf real_buf, *buf; + GString *string; + guint8 data[HEADER_SIZE]; + int length; + + buf = &real_buf; + memset (buf, 0, sizeof (CompressBuf)); + buf->output = output; + buf->outstr = g_string_sized_new (20); + + data[0] = 0x01; + data[1] = 0x00; + data[2] = 0xb0; + gsf_output_write (buf->output, 3, data); /* dummy padding */ + + string = g_string_sized_new (64); + + while (gsf_input_remaining (input) > 0) { + buf->length = MIN (gsf_input_remaining (input), VBA_COMPRESSION_WINDOW); + if (!gsf_input_read (input, buf->length, buf->inblock)) + g_error ("Failed to read %d bytes\n", buf->length); + compress_block (buf); + } + + if (buf->outstr->len) { + gsf_output_write (buf->output, 1, &buf->mask); + gsf_output_write (buf->output, buf->outstr->len, buf->outstr->str); + } + + length = gsf_output_size (buf->output) - 3 - 1; + if (length > 0x0c0c) /* TESTME: is this really right ? */ + length = 0x0c0c; + data[1] = length & 0xff; + data[2] |= (length >> 8); + gsf_output_seek (output, 0, G_SEEK_SET); + gsf_output_write (buf->output, 3, data); /* real data */ +} + +static void +do_decompress (GsfInput *input, GsfOutput *output) +{ + gboolean err = FALSE; + guint8 data[HEADER_SIZE]; + GByteArray *decompressed; + int size, comp_len; + + err |= !gsf_input_read (input, HEADER_SIZE, data); + if (data [0] != 0x01) + fprintf (stderr, "Odd pre-amble byte 0x%x\n", data[0]); + if ((data [2] & 0xf0) != 0xb0) + fprintf (stderr, "Odd high nibble 0x%x\n", (data[2] & 0xf0)); + comp_len = ((data[2] & 0x0f) << 8) + data[1]; + if (comp_len + 1 != gsf_input_size (input) - 3) + fprintf (stderr, "Size mismatch %d %d\n", + comp_len + 1, (int) (gsf_input_size (input) - 3)); + + decompressed = gsf_msole_inflate (input, 3); + if (!decompressed) + fprintf (stderr, "Failed to decompress\n"); + + size = decompressed->len; + err |= !gsf_output_write (output, size, + g_byte_array_free (decompressed, FALSE)); + + if (err) + fprintf (stderr, "I/O error\n"); +} + +#define MAP(a,b) + +static void +decode_dir (GsfInput *input) +{ + gboolean err = FALSE; + guint8 data[6]; + int op_count = 0; + + while (gsf_input_remaining (input) && !err) { + unsigned i; + guint16 op; + guint32 length; + gboolean ascii = FALSE; + gboolean unicode = FALSE; + gboolean offset = FALSE; + + err |= !gsf_input_read (input, 6, data); + + op = GSF_LE_GET_GUINT16 (&data[0]); + length = GSF_LE_GET_GUINT32 (&data[2]); + + if (op == 9) { + fprintf (stderr, "** Quirk fix **\n"); + length += 2; + } + + /* Special nasties / up-stream bugs */ + switch (op) { + case 0x4: + case 0x16: + case 0x19: + case 0x1a: + ascii = TRUE; + break; + case 0x32: + case 0x3e: + case 0x47: + unicode = TRUE; + break; + case 0x31: + offset = TRUE; + break; + default: + break; + } + + fprintf (stderr, "0x%.6x Op %3d 0x%.2x, length %3d: '", + (int)gsf_input_tell (input), op_count, op, length); + + if (length > gsf_input_remaining (input)) { + fprintf (stderr, "Broken - foo !\n"); + length = MIN (64, gsf_input_remaining (input)); + err = TRUE; + } + + if (ascii || unicode) { + int advance = ascii ? 1 : 2; + /* quick and dirty for now */ + for (i = 0 ; i < length; i += advance) { + guint8 ug; + err |= !gsf_input_read (input, advance, &ug); + fprintf (stderr, "%c", byte_to_char (ug)); + } + fprintf (stderr, "' - '%s", ascii ? "Ascii" : "Unicode"); + } else if (offset) { + gint8 data[4]; + guint32 offset; + g_assert (length == 4); + err |= !gsf_input_read (input, 4, data); + offset = GSF_LE_GET_GUINT32 (data); + fprintf (stderr, "0x%.8x' - 'Offset", offset); + } else { + GString *chars = g_string_new (""); + + for (i = 0 ; i < length; i++) { + guint8 ug; + err |= !gsf_input_read (input, 1, &ug); + fprintf (stderr, "%.2x ", ug); + g_string_append_printf (chars, "%c", byte_to_char (ug)); + } + fprintf (stderr, "' - '%s", chars->str); + g_string_free (chars, TRUE); + } + fprintf (stderr, "'\n"); + + op_count++; + } +} + +int +main (int argc, char *argv[]) +{ + int i; + char const *src = NULL; + char const *dest = NULL; + GsfInput *input; + GsfOutput *output; + GError *error = NULL; + + /* options */ + gboolean dir = FALSE; + gboolean compress = FALSE; + + gsf_init (); + + for (i = 1; i < argc; i++) { + if (argv[i][0] == '-') { + switch (argv[i][1]) { + case 'c': + compress = TRUE; + break; + case 'd': + dir = TRUE; + break; + default: + fprintf (stderr, "Unknown option '%s'\n", argv[i]); + return 1; + break; + } + } else if (!src) + src = argv[i]; + else + dest = argv[i]; + } + + if (!src || (!dir && !dest)) { + fprintf (stderr, "%s: [-c(ompress)] \n", argv[0]); + fprintf (stderr, "%s: [-d(ecode dir)] \n", argv[0]); + return 1; + } + + input = gsf_input_stdio_new (src, &error); + if (dir) + decode_dir (input); + else { + output = gsf_output_stdio_new (dest, &error); + if (!input || !output) { + fprintf (stderr, "Failed to open input(%p)/output(%p): '%s'\n", + input, output, error ? error->message : ""); + return 1; + } + + if (compress) + do_compress (input, output); + else + do_decompress (input, output); + + g_object_unref (output); + } + + g_object_unref (input); + + gsf_shutdown (); + + return 0; +} diff --git a/tests/test-msvba.c b/tests/test-msvba.c new file mode 100644 index 0000000..75b205c --- /dev/null +++ b/tests/test-msvba.c @@ -0,0 +1,87 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-msvba.c: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include + +#include + +static int +test (int argc, char *argv[]) +{ + GsfInfile *vba_wrapper; + GsfInput *input; + GError *err = NULL; + int i; + + for (i = 1 ; i < argc ; i++) { + input = gsf_input_mmap_new (argv[i], NULL); + if (input == NULL) /* Only report error if stdio fails too */ + input = gsf_input_stdio_new (argv[i], &err); + if (input != NULL) { + GsfInfile *infile = gsf_infile_msole_new (input, &err); + if (infile != NULL) { + GsfInput *vba = gsf_infile_child_by_vname (infile, "_VBA_PROJECT_CUR", "VBA", NULL); + if (vba != NULL) { + fprintf( stderr, "%s\n",argv[i]); + + vba_wrapper = gsf_infile_msvba_new (GSF_INFILE (vba), &err); + if (vba_wrapper != NULL) { + g_object_unref (G_OBJECT (vba_wrapper)); + } + g_object_unref (G_OBJECT (vba)); + } else { +#if 0 + g_warning ("'%s' : No VBA directory", argv[i]); +#endif + continue; + } + + g_object_unref (G_OBJECT (infile)); + } + g_object_unref (G_OBJECT (input)); + } + + if (err != NULL) { + g_warning ("'%s' error: %s", argv[i], err->message); + g_error_free (err); + err = NULL; + } + } + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-out-bzip.c b/tests/test-out-bzip.c new file mode 100644 index 0000000..08743f6 --- /dev/null +++ b/tests/test-out-bzip.c @@ -0,0 +1,88 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-out-bzip.c: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * 2003-2006 Dom Lachowicz (cinamod@hotmail.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include + +#include + +static int +test (int argc, char *argv[]) +{ + GsfOutput *output; + GsfOutput *bzout; + GError *err = NULL; + + if (argc != 2) { + fprintf (stderr, "Usage : %s outfile\n", argv[0]); + return 1; + } + + output = gsf_output_stdio_new (argv[1], &err); + if (output == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[1], err->message); + g_error_free (err); + return 1; + } + + bzout = gsf_output_bzip_new (output, &err); + if (bzout == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", "bzip output", err->message); + g_error_free (err); + return 1; + } + + if (!gsf_output_printf (bzout, + "The %s sat on the %s.\n", "cat", "mat")) + return 1; + if (!gsf_output_printf (bzout, "%d %ss sat on the %s.\n", + 2, "cat", "mat")) + return 1; + if (!gsf_output_puts (bzout, + "The quick brown fox is afraid of the cats.\n")) + return 1; + if (!gsf_output_close (bzout)) + return 1; + if (!gsf_output_close (output)) + return 1; + g_object_unref (G_OBJECT (bzout)); + g_object_unref (G_OBJECT (output)); + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-out-gzip1.c b/tests/test-out-gzip1.c new file mode 100644 index 0000000..e72185c --- /dev/null +++ b/tests/test-out-gzip1.c @@ -0,0 +1,87 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-out-gzip1.c: + * + * Copyright (C) 2002-2003-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include + +#include + +static int +test (int argc, char *argv[]) +{ + GsfOutput *output; + GsfOutput *gzout; + GError *err = NULL; + + if (argc != 2) { + fprintf (stderr, "Usage : %s outfile\n", argv[0]); + return 1; + } + + output = gsf_output_stdio_new (argv[1], &err); + if (output == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[1], err->message); + g_error_free (err); + return 1; + } + + gzout = gsf_output_gzip_new (output, &err); + if (gzout == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", "gzip output", err->message); + g_error_free (err); + return 1; + } + + if (!gsf_output_printf (gzout, + "The %s sat on the %s.\n", "cat", "mat")) + return 1; + if (!gsf_output_printf (gzout, "%d %ss sat on the %s.\n", + 2, "cat", "mat")) + return 1; + if (!gsf_output_puts (gzout, + "The quick brown fox is afraid of the cats.\n")) + return 1; + if (!gsf_output_close (gzout)) + return 1; + if (!gsf_output_close (output)) + return 1; + g_object_unref (G_OBJECT (gzout)); + g_object_unref (G_OBJECT (output)); + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-out-gzip2.c b/tests/test-out-gzip2.c new file mode 100644 index 0000000..860abeb --- /dev/null +++ b/tests/test-out-gzip2.c @@ -0,0 +1,88 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-out-gzip2.c: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include + +#include + +static int +test (int argc, char *argv[]) +{ + GsfOutput *output; + GsfOutput *gzout; + GError *err = NULL; + + if (argc != 2) { + fprintf (stderr, "Usage : %s outfile\n", argv[0]); + return 1; + } + + output = gsf_output_stdio_new (argv[1], &err); + if (output == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[1], err->message); + g_error_free (err); + return 1; + } + + gzout = g_object_new (GSF_OUTPUT_GZIP_TYPE, + "sink", output, + "raw", TRUE, + NULL); + if (gsf_output_error (gzout)) { + g_warning ("'%s' error: %s", "gzip output", gsf_output_error (gzout)->message); + g_object_unref (gzout); + return 1; + } + + if (!gsf_output_printf (gzout, + "The %s sat on the %s.\n", "cat", "mat")) + return 1; + if (!gsf_output_printf (gzout, "%d %ss sat on the %s.\n", + 2, "cat", "mat")) + return 1; + if (!gsf_output_puts (gzout, + "The quick brown fox is afraid of the cats.\n")) + return 1; + if (!gsf_output_close (gzout)) + return 1; + if (!gsf_output_close (output)) + return 1; + g_object_unref (G_OBJECT (gzout)); + g_object_unref (G_OBJECT (output)); + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-out-printf.c b/tests/test-out-printf.c new file mode 100644 index 0000000..bb0ee3c --- /dev/null +++ b/tests/test-out-printf.c @@ -0,0 +1,73 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-input1.c: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include + +#include + +static int +test (int argc, char *argv[]) +{ + GsfOutput *output; + GError *err = NULL; + + if (argc != 2) { + fprintf (stderr, "Usage : %s outfile\n", argv[0]); + return 1; + } + + output = gsf_output_stdio_new (argv[1], &err); + if (output == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[1], err->message); + g_error_free (err); + return 1; + } + + if (!gsf_output_printf (output, + "The %s sat on the %s.\n", "cat", "mat")) + return 1; + if (!gsf_output_printf (output, "%d %ss sat on the %s.\n", + 2, "cat", "mat")) + return 1; + if (!gsf_output_puts (output, + "The quick brown fox is afraid of the cats.\n")) + return 1; + if (!gsf_output_close (output)) + return 1; + g_object_unref (G_OBJECT (output)); + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-outmem-printf.c b/tests/test-outmem-printf.c new file mode 100644 index 0000000..2eb755e --- /dev/null +++ b/tests/test-outmem-printf.c @@ -0,0 +1,97 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-outmem-printf.c: + * + * Copyright (C) 2002-2006 Jon K Hellan (hellan@acm.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include + +#include + +static gboolean +test_write_once (GsfOutput *output) +{ + if (!gsf_output_printf (output, + "The %s sat on the %s.\n", "cat", "mat")) + return FALSE; + if (!gsf_output_printf (output, "%d %ss sat on the %s.\n", + 2, "cat", "mat")) + return FALSE; + if (!gsf_output_puts (output, + "The quick brown fox is afraid of the cats.\n")) + return FALSE; + + return TRUE; +} + +static int +test (int argc, char *argv[]) +{ + GsfOutput *output; + guint8 const *buf; + gsf_off_t size; + FILE *fout; + int i; + int res; + + if (argc != 2) { + fprintf (stderr, "Usage : %s outfile\n", argv[0]); + return 1; + } + + fout = fopen (argv[1], "w"); + if (!fout) { + perror (argv[1]); + return 1; + } + + output = gsf_output_memory_new (); + for (i = 1; i <= 100; i++) { + if (!gsf_output_printf (output, "=== Round %d ===\n", i)) { + res = 1; + goto out; + } + if (!test_write_once (output)) { + res = 1; + goto out; + } + } + + buf = gsf_output_memory_get_bytes (GSF_OUTPUT_MEMORY (output)); + size = gsf_output_size (output); + res = fwrite (buf, size, 1, fout) == 1 ? 0 : 1; + + out: + fclose (fout); + gsf_output_close (output); + g_object_unref (output); + return res; +} + +int +main (int argc, char *argv[]) +{ + int res; + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-restore-msole.c b/tests/test-restore-msole.c new file mode 100644 index 0000000..dafca84 --- /dev/null +++ b/tests/test-restore-msole.c @@ -0,0 +1,134 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-restore-msole.c: Create a msole file from a directory tree + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include + +#include +#include +#include + +#include +#include +#include + +#include + +static void +clone (GsfInput *input, GsfOutput *output) +{ + guint8 const *data; + size_t len; + int i; + + if (gsf_input_size (input) > 0) { + while ((len = gsf_input_remaining (input)) > 0) { + /* copy in odd sized chunks to exercise system */ + if (len > 314) + len = 314; + if (NULL == (data = gsf_input_read (input, len, NULL))) { + g_warning ("error reading ?"); + return; + } + if (!gsf_output_write (output, len, data)) { + g_warning ("error writing ?"); + return; + } + } + } + + /* See test-cp-msole.c for explanation how to distinct directories + * from regular files. + */ + if (GSF_IS_INFILE (input) && + gsf_infile_num_children (GSF_INFILE (input)) > 0) { + GsfInfile *in = GSF_INFILE (input); + GsfOutfile *out = GSF_OUTFILE (output); + GsfInput *src; + GsfOutput *dst; + gboolean is_dir; + + for (i = 0 ; i < gsf_infile_num_children (in) ; i++) { + src = gsf_infile_child_by_index (in, i); + is_dir = GSF_IS_INFILE (src) && + gsf_infile_num_children (GSF_INFILE (src)) >= 0; + dst = gsf_outfile_new_child (out, + gsf_infile_name_by_index (in, i), + is_dir); + clone (src, dst); + } + } + + gsf_output_close (output); + g_object_unref (G_OBJECT (output)); + g_object_unref (G_OBJECT (input)); +} + +static int +test (char *argv[]) +{ + GsfInfile *infile; + GsfOutfile *outfile; + GsfOutput *output; + GError *err = NULL; + + fprintf (stderr, "%s\n", argv [1]); + infile = gsf_infile_stdio_new (argv[1], &err); + if (infile == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[1], err->message); + g_error_free (err); + return 1; + } + + output = gsf_output_stdio_new (argv[2], &err); + if (output == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[2], err->message); + g_error_free (err); + g_object_unref (G_OBJECT (infile)); + return 1; + } + + outfile = gsf_outfile_msole_new (output); + g_object_unref (G_OBJECT (output)); + clone (GSF_INPUT (infile), GSF_OUTPUT (outfile)); + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + if (argc != 3) { + fprintf (stderr, "%s : inputdir outfile\n", argv [0]); + return 1; + } + + gsf_init (); + res = test (argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-textline.c b/tests/test-textline.c new file mode 100644 index 0000000..e274d25 --- /dev/null +++ b/tests/test-textline.c @@ -0,0 +1,75 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-textline.c: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include + +#include + +static int +test (int argc, char *argv[]) +{ + GsfInput *input; + GsfInputTextline *textline; + GError *err = NULL; + unsigned char *line; + + if (argc < 2) { + fprintf (stderr, "Usage : %s \n", argv[0]); + return 1; + } + + fprintf (stderr, "%s\n", argv[1]); + input = gsf_input_stdio_new (argv[1], &err); + if (input == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[1], err->message); + g_error_free (err); + return 1; + } + textline = (GsfInputTextline *)gsf_input_textline_new (input); + if (textline == NULL) { + g_warning ("unable to create a textline"); + return 2; + } + + while (NULL != (line = gsf_input_textline_ascii_gets (textline))) + puts (line); + + g_object_unref (G_OBJECT (input)); + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-zip-out-subdirs.c b/tests/test-zip-out-subdirs.c new file mode 100644 index 0000000..a670da7 --- /dev/null +++ b/tests/test-zip-out-subdirs.c @@ -0,0 +1,113 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-zip-out.c: + * + * Copyright (C) 2002-2006 Jon K Hellan (hellan@acm.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include + +#include +#include + +static gboolean +test_write_once (GsfOutput *output) +{ + char const *str = "The cat sat on the mat. 2 cats sat on the mat. The quick brown fox is afraid of the cats.\n"; + + return gsf_output_write (output, strlen (str), str); +} + +static int +test (int argc, char *argv[]) +{ + GsfOutput *output; + GsfOutfile *outfile, *dir1, *dir2; + GsfOutput *ch1, *ch2, *ch3; + GError *err = NULL; + + if (argc != 2) { + fprintf (stderr, "Usage : %s outfile\n", argv[0]); + return 1; + } + + output = gsf_output_stdio_new (argv[1], &err); + if (output == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[1], err->message); + g_error_free (err); + return 1; + } + outfile = gsf_outfile_zip_new (output, &err); + if (output == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", + "gsf_outfile_zip_new", err->message); + g_error_free (err); + return 1; + } + g_object_unref (G_OBJECT (output)); + dir1 = GSF_OUTFILE (gsf_outfile_new_child (outfile, "test", TRUE)); + ch1 = gsf_outfile_new_child (dir1, "portfolio.abw", FALSE); + ch2 = gsf_outfile_new_child (dir1, "test.abw", FALSE); + dir2 = GSF_OUTFILE (gsf_outfile_new_child (dir1, "1", TRUE)); + if (!gsf_output_close ((GsfOutput *) dir1)) + return 1; + ch3 = gsf_outfile_new_child (dir2, "simply.pve", FALSE); + + if (!test_write_once (ch1)) + return 1; + if (!gsf_output_close ((GsfOutput *) ch1)) + return 1; + if (!test_write_once (ch2)) + return 1; + if (!gsf_output_close ((GsfOutput *) ch2)) + return 1; + if (!test_write_once (ch3)) + return 1; + if (!gsf_output_close ((GsfOutput *) ch3)) + return 1; + if (!gsf_output_close ((GsfOutput *) dir2)) + return 1; + if (!gsf_output_close ((GsfOutput *) outfile)) + return 1; + g_object_unref (G_OBJECT (outfile)); + g_object_unref (ch1); + g_object_unref (ch2); + g_object_unref (ch3); + g_object_unref (dir1); + g_object_unref (dir2); + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-zip-out.c b/tests/test-zip-out.c new file mode 100644 index 0000000..69e25dd --- /dev/null +++ b/tests/test-zip-out.c @@ -0,0 +1,93 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-zip-out.c: + * + * Copyright (C) 2002-2006 Jon K Hellan (hellan@acm.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include + +#include +#include + +static gboolean +test_write_once (GsfOutput *output) +{ + char const *str = "The cat sat on the mat. 2 cats sat on the mat. The quick brown fox is afraid of the cats.\n"; + + return gsf_output_write (output, strlen (str), str); +} + +static int +test (int argc, char *argv[]) +{ + GsfOutput *output; + GsfOutfile *outfile; + GsfOutput *child; + GError *err = NULL; + + if (argc != 2) { + fprintf (stderr, "Usage : %s outfile\n", argv[0]); + return 1; + } + + output = gsf_output_stdio_new (argv[1], &err); + if (output == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[1], err->message); + g_error_free (err); + return 1; + } + outfile = gsf_outfile_zip_new (output, &err); + if (output == NULL) { + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", + "gsf_outfile_zip_new", err->message); + g_error_free (err); + return 1; + } + g_object_unref (G_OBJECT (output)); + child = gsf_outfile_new_child (outfile, "child", FALSE); + + if (!test_write_once (child)) + return 1; + if (!gsf_output_close ((GsfOutput *) child)) + return 1; + if (!gsf_output_close ((GsfOutput *) outfile)) + return 1; + g_object_unref (G_OBJECT (outfile)); + g_object_unref (child); + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-zip1.c b/tests/test-zip1.c new file mode 100644 index 0000000..1887e06 --- /dev/null +++ b/tests/test-zip1.c @@ -0,0 +1,100 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-zip1.c: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include + +#include + +static void +ls_R (GsfInput *input) +{ + int i; + gboolean is_dir = GSF_IS_INFILE (input) && + (gsf_infile_num_children (GSF_INFILE (input)) >= 0); + + printf ("%c '%s' %" GSF_OFF_T_FORMAT "\n", + (is_dir ? 'd' : ' '), + gsf_input_name (GSF_INPUT (input)), + gsf_input_size (GSF_INPUT (input))); + + if (!is_dir) + return; + + puts ("{"); + for (i = 0 ; i < gsf_infile_num_children (GSF_INFILE (input)) ; i++) + ls_R (gsf_infile_child_by_index (GSF_INFILE (input), i)); + puts ("}"); +} + +static int +test (int argc, char *argv[]) +{ + GsfInput *input; + GsfInfile *infile; + GError *err = NULL; + int i; + + for (i = 1 ; i < argc ; i++) { + puts (argv[i]); + input = gsf_input_stdio_new (argv[i], &err); + if (input == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[i], err->message); + g_error_free (err); + err = NULL; + continue; + } + + infile = gsf_infile_zip_new (input, &err); + if (infile == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' Not a Zip file: %s", argv[i], err->message); + g_error_free (err); + err = NULL; + continue; + } + + ls_R (GSF_INPUT (infile)); + g_object_unref (G_OBJECT (infile)); + g_object_unref (G_OBJECT (input)); + } + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tests/test-zip2.c b/tests/test-zip2.c new file mode 100644 index 0000000..96b8cda --- /dev/null +++ b/tests/test-zip2.c @@ -0,0 +1,113 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * test-zip2.c: + * + * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include + +#include +#include + +static void +dump_child (GsfInfile *infile, char const *childname) +{ + GsfInput *child = gsf_infile_child_by_name (infile, childname); + GsfInputTextline *textinput; + unsigned char *res; + int len = 0; + + if (child == NULL) { + printf ("not an OpenOffice document\n"); + return; + } + + textinput = (GsfInputTextline *)gsf_input_textline_new (child); + if (textinput == NULL) { + printf ("Could not read lines from %s", + gsf_input_name (child)); + return; + } + + do { + res = gsf_input_textline_ascii_gets (textinput); + if (res) { + printf ("'%s'\n", res); + len += strlen (res) + 1; + } + } while (res); + + printf ("Finished reading - %d bytes\n", len); + g_object_unref (G_OBJECT (textinput)); + g_object_unref (G_OBJECT (child)); +} + +static int +test (int argc, char *argv[]) +{ + GsfInput *input; + GsfInfile *infile; + GError *err = NULL; + int i; + + puts (argv[1]); + input = gsf_input_stdio_new (argv[1], &err); + if (input == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' error: %s", argv[1], err->message); + g_error_free (err); + return -1; + } + + infile = gsf_infile_zip_new (input, &err); + if (infile == NULL) { + + g_return_val_if_fail (err != NULL, 1); + + g_warning ("'%s' Not a Zip file: %s", argv[1], err->message); + g_error_free (err); + g_object_unref (G_OBJECT (input)); + return -1; + } + + for (i = 2 ; i < argc ; i++) { + dump_child (infile, argv[i]); + } + g_object_unref (G_OBJECT (infile)); + g_object_unref (G_OBJECT (input)); + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/thumbnailer/Makefile.am b/thumbnailer/Makefile.am new file mode 100644 index 0000000..1e033a5 --- /dev/null +++ b/thumbnailer/Makefile.am @@ -0,0 +1,46 @@ +@INTLTOOL_SCHEMAS_RULE@ + +AM_CPPFLAGS = -I$(top_srcdir) $(LIBGSF_CFLAGS) $(GDK_PIXBUF_CFLAGS) $(LIBXML_CFLAGS) +LDADD = $(top_builddir)/gsf/libgsf-1.la $(LIBGSF_LIBS) $(GDK_PIXBUF_LIBS) + +bin_PROGRAMS = gsf-office-thumbnailer + +gsf_office_thumbnailer_SOURCES = \ + main.c + +schema_files = \ + gsf-office-thumbnailer.schemas.in + +schemas = gsf-office-thumbnailer.schemas +schemadir = $(GCONF_SCHEMA_FILE_DIR) +if GCONF_SCHEMAS_INSTALL +schema_DATA = $(schemas) +endif + +install-data-local: +if GCONF_SCHEMAS_INSTALL +if WITH_WIN32 +if !CROSS_COMPILING + if test -z "$(DESTDIR)" -a -n "$(GCONF_SCHEMA_FILE_DIR)" ; then \ + for p in $(schemas); do \ + (echo set GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE); \ + echo $(GCONFTOOL) --makefile-install-rule $$p) >_temp.bat; \ + cmd /c _temp.bat; \ + done \ + fi +endif +else + if test -z "$(DESTDIR)" -a -n "$(GCONF_SCHEMA_FILE_DIR)" ; then \ + for p in $(schemas); do \ + GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ + $(GCONFTOOL) --makefile-install-rule $$p; \ + done \ + fi +endif +endif + +EXTRA_DIST = \ + $(schema_files) + +DISTCLEANFILES = \ + $(schema_DATA) diff --git a/thumbnailer/Makefile.in b/thumbnailer/Makefile.in new file mode 100644 index 0000000..6893513 --- /dev/null +++ b/thumbnailer/Makefile.in @@ -0,0 +1,680 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = gsf-office-thumbnailer$(EXEEXT) +subdir = thumbnailer +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/gsf-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(schemadir)" +PROGRAMS = $(bin_PROGRAMS) +am_gsf_office_thumbnailer_OBJECTS = main.$(OBJEXT) +gsf_office_thumbnailer_OBJECTS = $(am_gsf_office_thumbnailer_OBJECTS) +gsf_office_thumbnailer_LDADD = $(LDADD) +am__DEPENDENCIES_1 = +gsf_office_thumbnailer_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(gsf_office_thumbnailer_SOURCES) +DIST_SOURCES = $(gsf_office_thumbnailer_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 = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +DATA = $(schema_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BONOBO_REQ = @BONOBO_REQ@ +BZ2_LIBS = @BZ2_LIBS@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURRENT_MINUS_AGE = @CURRENT_MINUS_AGE@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ +GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GNOMEVFS_REQ = @GNOMEVFS_REQ@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEXE = @LIBEXE@ +LIBGSF_BONOBO_CFLAGS = @LIBGSF_BONOBO_CFLAGS@ +LIBGSF_BONOBO_LIBS = @LIBGSF_BONOBO_LIBS@ +LIBGSF_CFLAGS = @LIBGSF_CFLAGS@ +LIBGSF_GIO_CFLAGS = @LIBGSF_GIO_CFLAGS@ +LIBGSF_GIO_LIBS = @LIBGSF_GIO_LIBS@ +LIBGSF_GNOME_CFLAGS = @LIBGSF_GNOME_CFLAGS@ +LIBGSF_GNOME_LIBS = @LIBGSF_GNOME_LIBS@ +LIBGSF_LIBS = @LIBGSF_LIBS@ +LIBGSF_MAJOR_VERSION = @LIBGSF_MAJOR_VERSION@ +LIBGSF_MICRO_VERSION = @LIBGSF_MICRO_VERSION@ +LIBGSF_MINOR_VERSION = @LIBGSF_MINOR_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +PYGTK_CFLAGS = @PYGTK_CFLAGS@ +PYGTK_CODEGEN = @PYGTK_CODEGEN@ +PYGTK_LIBS = @PYGTK_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +WARN_CFLAGS = @WARN_CFLAGS@ +WINDRES = @WINDRES@ +XGETTEXT = @XGETTEXT@ +Z_CPPFLAGS = @Z_CPPFLAGS@ +Z_LIBS = @Z_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CPPFLAGS = -I$(top_srcdir) $(LIBGSF_CFLAGS) $(GDK_PIXBUF_CFLAGS) $(LIBXML_CFLAGS) +LDADD = $(top_builddir)/gsf/libgsf-1.la $(LIBGSF_LIBS) $(GDK_PIXBUF_LIBS) +gsf_office_thumbnailer_SOURCES = \ + main.c + +schema_files = \ + gsf-office-thumbnailer.schemas.in + +schemas = gsf-office-thumbnailer.schemas +schemadir = $(GCONF_SCHEMA_FILE_DIR) +@GCONF_SCHEMAS_INSTALL_TRUE@schema_DATA = $(schemas) +EXTRA_DIST = \ + $(schema_files) + +DISTCLEANFILES = \ + $(schema_DATA) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu thumbnailer/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu thumbnailer/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +gsf-office-thumbnailer$(EXEEXT): $(gsf_office_thumbnailer_OBJECTS) $(gsf_office_thumbnailer_DEPENDENCIES) + @rm -f gsf-office-thumbnailer$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(gsf_office_thumbnailer_OBJECTS) $(gsf_office_thumbnailer_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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 +install-schemaDATA: $(schema_DATA) + @$(NORMAL_INSTALL) + test -z "$(schemadir)" || $(MKDIR_P) "$(DESTDIR)$(schemadir)" + @list='$(schema_DATA)'; test -n "$(schemadir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(schemadir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(schemadir)" || exit $$?; \ + done + +uninstall-schemaDATA: + @$(NORMAL_UNINSTALL) + @list='$(schema_DATA)'; test -n "$(schemadir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(schemadir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(schemadir)" && rm -f $$files + +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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + 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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + 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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(schemadir)"; 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: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -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-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-data-local install-schemaDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-schemaDATA + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + 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-binPROGRAMS install-data install-data-am \ + install-data-local install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-schemaDATA 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-binPROGRAMS \ + uninstall-schemaDATA + +@INTLTOOL_SCHEMAS_RULE@ + +install-data-local: +@CROSS_COMPILING_FALSE@@GCONF_SCHEMAS_INSTALL_TRUE@@WITH_WIN32_TRUE@ if test -z "$(DESTDIR)" -a -n "$(GCONF_SCHEMA_FILE_DIR)" ; then \ +@CROSS_COMPILING_FALSE@@GCONF_SCHEMAS_INSTALL_TRUE@@WITH_WIN32_TRUE@ for p in $(schemas); do \ +@CROSS_COMPILING_FALSE@@GCONF_SCHEMAS_INSTALL_TRUE@@WITH_WIN32_TRUE@ (echo set GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE); \ +@CROSS_COMPILING_FALSE@@GCONF_SCHEMAS_INSTALL_TRUE@@WITH_WIN32_TRUE@ echo $(GCONFTOOL) --makefile-install-rule $$p) >_temp.bat; \ +@CROSS_COMPILING_FALSE@@GCONF_SCHEMAS_INSTALL_TRUE@@WITH_WIN32_TRUE@ cmd /c _temp.bat; \ +@CROSS_COMPILING_FALSE@@GCONF_SCHEMAS_INSTALL_TRUE@@WITH_WIN32_TRUE@ done \ +@CROSS_COMPILING_FALSE@@GCONF_SCHEMAS_INSTALL_TRUE@@WITH_WIN32_TRUE@ fi +@GCONF_SCHEMAS_INSTALL_TRUE@@WITH_WIN32_FALSE@ if test -z "$(DESTDIR)" -a -n "$(GCONF_SCHEMA_FILE_DIR)" ; then \ +@GCONF_SCHEMAS_INSTALL_TRUE@@WITH_WIN32_FALSE@ for p in $(schemas); do \ +@GCONF_SCHEMAS_INSTALL_TRUE@@WITH_WIN32_FALSE@ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ +@GCONF_SCHEMAS_INSTALL_TRUE@@WITH_WIN32_FALSE@ $(GCONFTOOL) --makefile-install-rule $$p; \ +@GCONF_SCHEMAS_INSTALL_TRUE@@WITH_WIN32_FALSE@ done \ +@GCONF_SCHEMAS_INSTALL_TRUE@@WITH_WIN32_FALSE@ fi + +# 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/thumbnailer/gsf-office-thumbnailer.schemas.in b/thumbnailer/gsf-office-thumbnailer.schemas.in new file mode 100644 index 0000000..aacd9e1 --- /dev/null +++ b/thumbnailer/gsf-office-thumbnailer.schemas.in @@ -0,0 +1,673 @@ + + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.ms-powerpoint/enable + /desktop/gnome/thumbnailers/application@vnd.ms-powerpoint/enable + libgsf + bool + true + + Enable thumbnailing of Microsoft PowerPoint presentations + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.ms-powerpoint/command + /desktop/gnome/thumbnailers/application@vnd.ms-powerpoint/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for Microsoft PowerPoint presentations + Valid command plus arguments for the Microsoft PowerPoint thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.openxmlformats-officedocument.presentationml.presentation/enable + /desktop/gnome/thumbnailers/application@vnd.openxmlformats-officedocument.presentationml.presentation/enable + libgsf + bool + true + + Enable thumbnailing of Microsoft PowerPoint 2007 presentations + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.openxmlformats-officedocument.presentationml.presentation/command + /desktop/gnome/thumbnailers/application@vnd.openxmlformats-officedocument.presentationml.presentation/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for Microsoft PowerPoint 2007 presentations + Valid command plus arguments for the Microsoft PowerPoint 2007 thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.ms-excel/enable + /desktop/gnome/thumbnailers/application@vnd.ms-excel/enable + libgsf + bool + true + + Enable thumbnailing of Microsoft Excel spreadsheets + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.ms-excel/command + /desktop/gnome/thumbnailers/application@vnd.ms-excel/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for Microsoft Excel spreadsheets + Valid command plus arguments for the Microsoft Excel spreadsheets. + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.openxmlformats-officedocument.spreadsheetml.sheet/enable + /desktop/gnome/thumbnailers/application@vnd.openxmlformats-officedocument.spreadsheetml.sheet/enable + libgsf + bool + true + + Enable thumbnailing of Microsoft Excel 2007 spreadsheets + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.openxmlformats-officedocument.spreadsheetml.sheet/command + /desktop/gnome/thumbnailers/application@vnd.openxmlformats-officedocument.spreadsheetml.sheet/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for Microsoft Excel 2007 spreadsheets + Valid command plus arguments for the Microsoft Excel 2007 spreadsheets. + + + + + /schemas/desktop/gnome/thumbnailers/application@msword/enable + /desktop/gnome/thumbnailers/application@msword/enable + libgsf + bool + true + + Enable thumbnailing of Microsoft Word documents + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@msword/command + /desktop/gnome/thumbnailers/application@msword/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for Microsoft Word documents + Valid command plus arguments for the Microsoft Word thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.openxmlformats-officedocument.wordprocessingml.document/enable + /desktop/gnome/thumbnailers/application@vnd.openxmlformats-officedocument.wordprocessingml.document/enable + libgsf + bool + true + + Enable thumbnailing of Microsoft Word 2007 documents + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.openxmlformats-officedocument.wordprocessingml.document/command + /desktop/gnome/thumbnailers/application@vnd.openxmlformats-officedocument.wordprocessingml.document/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for Microsoft Word 2007 documents + Valid command plus arguments for the Microsoft Word 2007 thumbnailer + + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.presentation-template/enable + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.presentation-template/enable + libgsf + bool + true + + Enable thumbnailing of OpenDocument presentation templates + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.presentation-template/command + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.presentation-template/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenDocument presentation templates + Valid command plus arguments for the OpenDocument presentation template thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.presentation/enable + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.presentation/enable + libgsf + bool + true + + Enable thumbnailing of OpenDocument presentations + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.presentation/command + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.presentation/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenDocument presentations + Valid command plus arguments for the OpenDocument presentation thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.spreadsheet-template/enable + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.spreadsheet-template/enable + libgsf + bool + true + + Enable thumbnailing of OpenDocument spreadsheet templates + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.spreadsheet-template/command + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.spreadsheet-template/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenDocument spreadsheet templates + Valid command plus arguments for the OpenDocument spreadsheet template thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.spreadsheet/enable + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.spreadsheet/enable + libgsf + bool + true + + Enable thumbnailing of OpenDocument spreadsheets + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.spreadsheet/command + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.spreadsheet/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenDocument spreadsheets + Valid command plus arguments for the OpenDocument spreadsheet thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.text-template/enable + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.text-template/enable + libgsf + bool + true + + Enable thumbnailing of OpenDocument wordprocessing document templates + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.text-template/command + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.text-template/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenDocument wordprocessing document templates + Valid command plus arguments for the OpenDocument wordprocessing document template thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.text-master/enable + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.text-master/enable + libgsf + bool + true + + Enable thumbnailing of OpenDocument wordprocessing master documents + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.text-master/command + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.text-master/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenDocument wordprocessing master documents + Valid command plus arguments for the OpenDocument wordprocessing master document thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.text/enable + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.text/enable + libgsf + bool + true + + Enable thumbnailing of OpenDocument wordprocessing documents + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.text/command + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.text/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenDocument wordprocessing documents + Valid command plus arguments for the OpenDocument wordprocessing document thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.graphics-template/enable + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.graphics-template/enable + libgsf + bool + true + + Enable thumbnailing of OpenDocument drawing templates + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.graphics-template/command + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.graphics-template/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenDocument drawing templates + Valid command plus arguments for the OpenDocument drawing template thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.graphics/enable + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.graphics/enable + libgsf + bool + true + + Enable thumbnailing of OpenDocument drawings + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.graphics/command + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.graphics/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenDocument drawings + Valid command plus arguments for the OpenDocument drawing thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.chart/enable + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.chart/enable + libgsf + bool + true + + Enable thumbnailing of OpenDocument charts + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.chart/command + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.chart/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenDocument charts + Valid command plus arguments for the OpenDocument chart thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.image/enable + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.image/enable + libgsf + bool + true + + Enable thumbnailing of OpenDocument images + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.image/command + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.image/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenDocument images + Valid command plus arguments for the OpenDocument image thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.formula/enable + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.formula/enable + libgsf + bool + true + + Enable thumbnailing of OpenDocument formulas + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.formula/command + /desktop/gnome/thumbnailers/application@vnd.oasis.opendocument.formula/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenDocument formulas + Valid command plus arguments for the OpenDocument formula thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.impress.template/enable + /desktop/gnome/thumbnailers/application@vnd.sun.xml.impress.template/enable + libgsf + bool + true + + Enable thumbnailing for OpenOffice 1.x Impress Presentation templates + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.impress.template/command + /desktop/gnome/thumbnailers/application@vnd.sun.xml.impress.template/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenOffice 1.x Impress Presentation templates + Valid command plus arguments for the OpenOffice 1.x Impress presentation template thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.impress.template/enable + /desktop/gnome/thumbnailers/application@vnd.sun.xml.impress.template/enable + libgsf + bool + true + + Enable thumbnailing for OpenOffice 1.x Impress Presentation templates + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.impress.template/command + /desktop/gnome/thumbnailers/application@vnd.sun.xml.impress.template/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenOffice 1.x Impress Presentation templates + Valid command plus arguments for the OpenOffice 1.x Impress presentation template thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.impress/enable + /desktop/gnome/thumbnailers/application@vnd.sun.xml.impress/enable + libgsf + bool + true + + Enable thumbnailing for OpenOffice 1.x Impress presentations + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.impress/command + /desktop/gnome/thumbnailers/application@vnd.sun.xml.impress/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenOffice 1.x Impress presentations + Valid command plus arguments for the OpenOffice 1.x Impress presentation thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.calc.template/enable + /desktop/gnome/thumbnailers/application@vnd.sun.xml.calc.template/enable + libgsf + bool + true + + Enable thumbnailing for OpenOffice 1.x Spreadsheet templates + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.calc.template/command + /desktop/gnome/thumbnailers/application@vnd.sun.xml.calc.template/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenOffice 1.x Spreadsheet templates + Valid command plus arguments for the OpenOffice 1.x Writer template thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.calc/enable + /desktop/gnome/thumbnailers/application@vnd.sun.xml.calc/enable + libgsf + bool + true + + Enable thumbnailing for OpenOffice 1.x Calc spreadsheets + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.calc/command + /desktop/gnome/thumbnailers/application@vnd.sun.xml.calc/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenOffice 1.x Calc spreadsheets + Valid command plus arguments for the OpenOffice 1.x spreadsheet thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.writer.global/enable + /desktop/gnome/thumbnailers/application@vnd.sun.xml.writer.global/enable + libgsf + bool + true + + Enable thumbnailing for OpenOffice 1.x Writer global templates + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.writer.global/command + /desktop/gnome/thumbnailers/application@vnd.sun.xml.writer.global/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenOffice 1.x Writer global templates + Valid command plus arguments for the OpenOffice 1.x Writer global template thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.writer.template/enable + /desktop/gnome/thumbnailers/application@vnd.sun.xml.writer.template/enable + libgsf + bool + true + + Enable thumbnailing for OpenOffice 1.x Writer templates + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.writer.template/command + /desktop/gnome/thumbnailers/application@vnd.sun.xml.writer.template/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenOffice 1.x Writer templates + Valid command plus arguments for the OpenOffice 1.x Writer template thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.writer/enable + /desktop/gnome/thumbnailers/application@vnd.sun.xml.writer/enable + libgsf + bool + true + + Enable thumbnailing for OpenOffice 1.x Writer documents + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.writer/command + /desktop/gnome/thumbnailers/application@vnd.sun.xml.writer/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenOffice 1.x Writer documents + Valid command plus arguments for the OpenOffice 1.x Writer document thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.draw.template/enable + /desktop/gnome/thumbnailers/application@vnd.sun.xml.draw.template/enable + libgsf + bool + true + + Enable thumbnailing for OpenOffice 1.x Drawing templates + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.draw.template/command + /desktop/gnome/thumbnailers/application@vnd.sun.xml.draw.template/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenOffice 1.x Drawing templates + Valid command plus arguments for the OpenOffice 1.x Drawing template thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.draw/enable + /desktop/gnome/thumbnailers/application@vnd.sun.xml.draw/enable + libgsf + bool + true + + Enable thumbnailing for OpenOffice 1.x Calc spreadsheets + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.draw/command + /desktop/gnome/thumbnailers/application@vnd.sun.xml.draw/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenOffice 1.x Calc spreadsheets + Valid command plus arguments for the OpenOffice 1.x Drawing thumbnailer + + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.math/enable + /desktop/gnome/thumbnailers/application@vnd.sun.xml.math/enable + libgsf + bool + true + + Enable thumbnailing for OpenOffice 1.x Math documents + Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails + + + + /schemas/desktop/gnome/thumbnailers/application@vnd.sun.xml.math/command + /desktop/gnome/thumbnailers/application@vnd.sun.xml.math/command + libgsf + string + gsf-office-thumbnailer -i %i -o %o -s %s + + Thumbnail command for OpenOffice 1.x Math documents + Valid command plus arguments for the OpenOffice 1.x Math document thumbnailer + + + + diff --git a/thumbnailer/main.c b/thumbnailer/main.c new file mode 100644 index 0000000..985fd36 --- /dev/null +++ b/thumbnailer/main.c @@ -0,0 +1,310 @@ +/* GNOME thumbnailer for Office files + * Copyright (C) 2005 Novell, Inc. + * + * Authors: + * Federico Mena-Quintero + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_GDK_PIXBUF +#include +#endif + +#ifdef HAVE_SETRLIMI +#include +#endif + +G_GNUC_NORETURN static void +show_error_string_and_exit (const char *str) +{ + g_printerr ("error: %s\n", str); + exit (EXIT_FAILURE); +} + +G_GNUC_NORETURN static void +show_error_and_exit (GError *error) +{ + if (error) + show_error_string_and_exit (error->message); + else + show_error_string_and_exit ("an error happened, and we didn't get a GError. Exiting."); +} + +static void +call_convert (const char *in_filename, const char *out_filename, int thumb_size) +{ + char *in_quote; + char *out_quote; + char *cmd_line; + GError *error; + gint exit_status; + +#ifdef HAVE_GDK_PIXBUF + GdkPixbuf* pixbuf; + + pixbuf = gdk_pixbuf_new_from_file_at_scale (in_filename, + thumb_size, thumb_size, + TRUE, NULL); + if (pixbuf) { + gboolean success = gdk_pixbuf_save (pixbuf, + out_filename, "png", + NULL, NULL); + g_object_unref (pixbuf); + if (success) + return; + } +#endif + + in_quote = g_shell_quote (in_filename); + out_quote = g_shell_quote (out_filename); + cmd_line = g_strdup_printf ("convert %s +matte -thumbnail %dx%d png:%s", + in_quote, + thumb_size, thumb_size, + out_quote); + g_printerr ("calling %s\n", cmd_line); + g_free (in_quote); + g_free (out_quote); + + error = NULL; + if (!g_spawn_command_line_sync (cmd_line, NULL, NULL, &exit_status, &error)) + show_error_and_exit (error); + + g_free (cmd_line); +} + +static void +write_thumbnail (const char *filename, gconstpointer data, gsize size, int thumb_size) +{ + char *tmp_name; + int fd; + FILE *file; + + tmp_name = g_strdup_printf ("%s.XXXXXX", filename); + fd = g_mkstemp (tmp_name); + if (fd == -1) { + perror ("Could not create temporary file"); + exit (EXIT_FAILURE); + } + + file = fdopen (fd, "w"); + if (!file) { + show_error_string_and_exit ("Could not open temporary file for writing"); + exit (EXIT_FAILURE); + } + + if (fwrite (data, 1, size, file) != size) { + perror ("Could not write data to output file"); + exit (EXIT_FAILURE); + } + + if (fclose (file) != 0) { + perror ("Could not close oputput file"); + exit (EXIT_FAILURE); + } + + call_convert (tmp_name, filename, thumb_size); + unlink (tmp_name); +} + +static void +zip_thumbnail (GsfInfile *infile, const char *out_filename, int thumb_size) +{ + GsfInput *thumbnail; + + /* Office Document thumbnail */ + if (NULL != (thumbnail = gsf_infile_child_by_vname (infile, + "Thumbnails", "thumbnail.png", NULL))) { + gsf_off_t len = gsf_input_remaining (thumbnail); + guint8 const *data = gsf_input_read (thumbnail, len, NULL); + write_thumbnail (out_filename, data, len, thumb_size); + g_object_unref (thumbnail); + /* Check MS Office Open thumbnail */ + } else if (NULL != (thumbnail = gsf_open_pkg_open_rel_by_type (GSF_INPUT(infile), + "http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail", + NULL))) { + gsf_off_t len = gsf_input_remaining (thumbnail); + guint8 const *data = gsf_input_read (thumbnail, len, NULL); + write_thumbnail (out_filename, data, len, thumb_size); + g_object_unref (thumbnail); + } else + show_error_string_and_exit ("Could not find thumbnail in zip file"); +} + +static void +msole_thumbnail (GsfInfile *infile, const char *out_filename, int thumb_size) +{ + GsfInput *summary_stream; + GsfDocMetaData *meta_data; + GsfDocProp *thumb_doc_prop; + GValue const *thumb_value; + GsfClipData *clip_data; + GsfClipFormat clip_format; + gconstpointer data; + gsize size; + GError *error; + + summary_stream = gsf_infile_child_by_name (infile, "\05SummaryInformation"); + if (!summary_stream) + show_error_string_and_exit ("Could not find the SummaryInformation stream"); + + meta_data = gsf_doc_meta_data_new (); + error = gsf_msole_metadata_read (summary_stream, meta_data); + if (error) + show_error_and_exit (error); + + thumb_doc_prop = gsf_doc_meta_data_lookup (meta_data, GSF_META_NAME_THUMBNAIL); + if (!thumb_doc_prop) + show_error_string_and_exit ("The metadata does not have a thumbnail property"); + + thumb_value = gsf_doc_prop_get_val (thumb_doc_prop); + if (!thumb_value) + show_error_string_and_exit ("We got the thumbnail property, but it didn't have a value!?"); + + clip_data = GSF_CLIP_DATA (g_value_get_object (thumb_value)); + + clip_format = gsf_clip_data_get_format (clip_data); + + if (clip_format == GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD) { + GsfClipFormatWindows win_format; + + error = NULL; + win_format = gsf_clip_data_get_windows_clipboard_format (clip_data, &error); + if (win_format == GSF_CLIP_FORMAT_WINDOWS_ERROR) + show_error_and_exit (error); + } + + error = NULL; + data = gsf_clip_data_peek_real_data (clip_data, &size, &error); + + if (!data) + show_error_and_exit (error); + + write_thumbnail (out_filename, data, size, thumb_size); + + g_object_unref (clip_data); + + g_object_unref (meta_data); + g_object_unref (summary_stream); +} + +static void +read_thumbnail_and_write (const char *in_filename, const char *out_filename, int thumb_size) +{ + GsfInput *input; + GsfInfile *infile; + GError *error; + + input = gsf_input_mmap_new (in_filename, NULL); + if (!input) { + error = NULL; + input = gsf_input_stdio_new (in_filename, &error); + if (!input) + show_error_and_exit (error); + } + + input = gsf_input_uncompress (input); + + error = NULL; + if (NULL != (infile = gsf_infile_msole_new (input, &error))) + msole_thumbnail (infile, out_filename, thumb_size); + else if (NULL != (infile = gsf_infile_zip_new (input, &error))) + zip_thumbnail (infile, out_filename, thumb_size); + else + show_error_and_exit (error); + + g_object_unref (infile); + g_object_unref (input); +} + +#define MAX_HELPER_MEMORY (256 * 1024 * 1024) /* 256 MB */ +#define MAX_HELPER_SECONDS (5) /* 5 seconds */ + +static void +set_resource_limits (void) +{ +#ifdef HAVE_SETRLIMI + struct rlimit limit; + + /* We call convert(1) from ImageMagick, which is especially scary when converting + * WMF thumbnails into PNGs. Convert(1) is known to leak tons of memory and CPU + * time on certain WMFs. So, we'll put a cap on how much resources it can use. + */ + + limit.rlim_cur = MAX_HELPER_MEMORY; + limit.rlim_max = MAX_HELPER_MEMORY; + setrlimit (RLIMIT_AS, &limit); + + limit.rlim_cur = MAX_HELPER_SECONDS; + limit.rlim_max = MAX_HELPER_SECONDS; + setrlimit (RLIMIT_CPU, &limit); +#endif +} + +/* Command-line options */ +static int option_size = -1; +static char *option_input_filename = NULL; +static char *option_output_filename = NULL; + +static GOptionEntry option_entries[] = { + { "input", 'i', 0, G_OPTION_ARG_FILENAME, &option_input_filename, + "Name of file for which to create a thumbnail", + "filename" }, + { "output", 'o', 0, G_OPTION_ARG_FILENAME, &option_output_filename, + "Name of the file to put the thumbnail", + "filename" }, + { "size", 's', 0, G_OPTION_ARG_INT, &option_size, + "Size of thumbnail in pixels; the thumbnail will be at most N*N pixels large", + "N" }, + { NULL, 0, 0, 0, NULL, NULL, NULL } +}; + +int +main (int argc, char **argv) +{ + GOptionContext *option_ctx; + + set_resource_limits (); + + option_ctx = g_option_context_new ("Options"); + g_option_context_add_main_entries (option_ctx, option_entries, NULL); /* FIXME: no translation domain */ + if (!g_option_context_parse (option_ctx, &argc, &argv, NULL) + || option_size == -1 + || option_input_filename == NULL + || option_output_filename == NULL) { + g_printerr ("Invalid usage; type \"%s --help\" for instructions. All the options must be used.\n", argv[0]); + exit (EXIT_FAILURE); + } + + gsf_init (); + read_thumbnail_and_write (option_input_filename, option_output_filename, option_size); + + return 0; +} diff --git a/tools/Makefile.am b/tools/Makefile.am new file mode 100644 index 0000000..4b12fb7 --- /dev/null +++ b/tools/Makefile.am @@ -0,0 +1,7 @@ +AM_CPPFLAGS = -I$(top_srcdir) $(LIBGSF_CFLAGS) $(Z_CPPFLAGS) \ + -DGNOMELOCALEDIR=\"$(datadir)/locale\" +LDADD = $(top_builddir)/gsf/libgsf-1.la $(LIBGSF_LIBS) + +bin_PROGRAMS = gsf gsf-vba-dump +gsf_SOURCES = gsf.c +gsf_vba_dump_SOURCES = gsf-vba-dump.c diff --git a/tools/Makefile.in b/tools/Makefile.in new file mode 100644 index 0000000..d86342f --- /dev/null +++ b/tools/Makefile.in @@ -0,0 +1,617 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = gsf$(EXEEXT) gsf-vba-dump$(EXEEXT) +subdir = tools +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/gsf-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_gsf_OBJECTS = gsf.$(OBJEXT) +gsf_OBJECTS = $(am_gsf_OBJECTS) +gsf_LDADD = $(LDADD) +am__DEPENDENCIES_1 = +gsf_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +am_gsf_vba_dump_OBJECTS = gsf-vba-dump.$(OBJEXT) +gsf_vba_dump_OBJECTS = $(am_gsf_vba_dump_OBJECTS) +gsf_vba_dump_LDADD = $(LDADD) +gsf_vba_dump_DEPENDENCIES = $(top_builddir)/gsf/libgsf-1.la \ + $(am__DEPENDENCIES_1) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(gsf_SOURCES) $(gsf_vba_dump_SOURCES) +DIST_SOURCES = $(gsf_SOURCES) $(gsf_vba_dump_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BONOBO_REQ = @BONOBO_REQ@ +BZ2_LIBS = @BZ2_LIBS@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURRENT_MINUS_AGE = @CURRENT_MINUS_AGE@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCONFTOOL = @GCONFTOOL@ +GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ +GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ +GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ +GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GNOMEVFS_REQ = @GNOMEVFS_REQ@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBEXE = @LIBEXE@ +LIBGSF_BONOBO_CFLAGS = @LIBGSF_BONOBO_CFLAGS@ +LIBGSF_BONOBO_LIBS = @LIBGSF_BONOBO_LIBS@ +LIBGSF_CFLAGS = @LIBGSF_CFLAGS@ +LIBGSF_GIO_CFLAGS = @LIBGSF_GIO_CFLAGS@ +LIBGSF_GIO_LIBS = @LIBGSF_GIO_LIBS@ +LIBGSF_GNOME_CFLAGS = @LIBGSF_GNOME_CFLAGS@ +LIBGSF_GNOME_LIBS = @LIBGSF_GNOME_LIBS@ +LIBGSF_LIBS = @LIBGSF_LIBS@ +LIBGSF_MAJOR_VERSION = @LIBGSF_MAJOR_VERSION@ +LIBGSF_MICRO_VERSION = @LIBGSF_MICRO_VERSION@ +LIBGSF_MINOR_VERSION = @LIBGSF_MINOR_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +PYGTK_CFLAGS = @PYGTK_CFLAGS@ +PYGTK_CODEGEN = @PYGTK_CODEGEN@ +PYGTK_LIBS = @PYGTK_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +WARN_CFLAGS = @WARN_CFLAGS@ +WINDRES = @WINDRES@ +XGETTEXT = @XGETTEXT@ +Z_CPPFLAGS = @Z_CPPFLAGS@ +Z_LIBS = @Z_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CPPFLAGS = -I$(top_srcdir) $(LIBGSF_CFLAGS) $(Z_CPPFLAGS) \ + -DGNOMELOCALEDIR=\"$(datadir)/locale\" + +LDADD = $(top_builddir)/gsf/libgsf-1.la $(LIBGSF_LIBS) +gsf_SOURCES = gsf.c +gsf_vba_dump_SOURCES = gsf-vba-dump.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tools/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +gsf$(EXEEXT): $(gsf_OBJECTS) $(gsf_DEPENDENCIES) + @rm -f gsf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(gsf_OBJECTS) $(gsf_LDADD) $(LIBS) +gsf-vba-dump$(EXEEXT): $(gsf_vba_dump_OBJECTS) $(gsf_vba_dump_DEPENDENCIES) + @rm -f gsf-vba-dump$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(gsf_vba_dump_OBJECTS) $(gsf_vba_dump_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf-vba-dump.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsf.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@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 + +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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + 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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + 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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; 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: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + 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-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# 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/tools/gsf-vba-dump.c b/tools/gsf-vba-dump.c new file mode 100644 index 0000000..db473c9 --- /dev/null +++ b/tools/gsf-vba-dump.c @@ -0,0 +1,82 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * gsf-vba-dump.c: + * + * Copyright (C) 2002-2008 Jody Goldberg (jody@gnome.org) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2.1 of the GNU Lesser General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +static void +cb_dump_vba (char const *name, guint8 const *src_code) +{ + printf ("\n\n\n", name, src_code); +} + +static int +test (int argc, char *argv[]) +{ + GsfInput *input; + GError *err = NULL; + int i; + + for (i = 1 ; i < argc ; i++) { + input = gsf_input_mmap_new (argv[i], NULL); + if (input == NULL) /* Only report error if stdio fails too */ + input = gsf_input_stdio_new (argv[i], &err); + + if (input != NULL) { + GsfInfileMSVBA *vba = gsf_input_find_vba (input, &err); + if (NULL != vba) { + GHashTable *modules = gsf_infile_msvba_get_modules (vba); + if (NULL != modules) + g_hash_table_foreach (modules, + (GHFunc) cb_dump_vba, NULL); + g_object_unref (G_OBJECT (vba)); + } + g_object_unref (G_OBJECT (input)); + } + + if (err != NULL) { + g_warning ("'%s' error: %s", argv[i], err->message); + g_error_free (err); + } + } + + return 0; +} + +int +main (int argc, char *argv[]) +{ + int res; + + gsf_init (); + res = test (argc, argv); + gsf_shutdown (); + + return res; +} diff --git a/tools/gsf.c b/tools/gsf.c new file mode 100644 index 0000000..fb9a76b --- /dev/null +++ b/tools/gsf.c @@ -0,0 +1,407 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define GETTEXT_PACKAGE NULL /* FIXME */ + +static gboolean show_version; + +static GOptionEntry const gsf_options [] = { + { + "version", 'v', + 0, G_OPTION_ARG_NONE, &show_version, + N_("Display program version"), + NULL + }, + + /* ---------------------------------------- */ + + { NULL, 0, 0, 0, NULL, NULL, NULL} +}; + +/* ------------------------------------------------------------------------- */ + +static GsfInfile * +open_archive (char const *filename) +{ + GsfInfile *infile; + GError *error = NULL; + GsfInput *src; + char *display_name; + + src = gsf_input_stdio_new (filename, &error); + if (error) { + display_name = g_filename_display_name (filename); + g_printerr (_("%s: Failed to open %s: %s\n"), + g_get_prgname (), + display_name, + error->message); + g_free (display_name); + return NULL; + } + + infile = gsf_infile_zip_new (src, NULL); + if (infile) + return infile; + + infile = gsf_infile_msole_new (src, NULL); + if (infile) + return infile; + + infile = gsf_infile_tar_new (src, NULL); + if (infile) + return infile; + + display_name = g_filename_display_name (filename); + g_printerr (_("%s: Failed to recognize %s as an archive\n"), + g_get_prgname (), + display_name); + g_free (display_name); + return NULL; +} + +/* ------------------------------------------------------------------------- */ + +static GsfInput * +find_member (GsfInfile *arch, char const *name) +{ + char const *slash = strchr (name, '/'); + + if (slash) { + char *dirname = g_strndup (name, slash - name); + GsfInput *member; + GsfInfile *dir; + + member = gsf_infile_child_by_name (arch, dirname); + g_free (dirname); + if (!member) + return NULL; + dir = GSF_INFILE (member); + member = find_member (dir, slash + 1); + g_object_unref (dir); + return member; + } else { + return gsf_infile_child_by_name (arch, name); + } +} + +/* ------------------------------------------------------------------------- */ + +static int +gsf_help (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv) +{ + g_print (_("Available subcommands are...\n")); + g_print (_("* cat output one or more files in archive\n")); + g_print (_("* dump dump one or more files in archive as hex\n")); + g_print (_("* help list subcommands\n")); + g_print (_("* list list files in archive\n")); + g_print (_("* listprops list document properties in archive\n")); + g_print (_("* props print specified document properties\n")); + return 0; +} + +/* ------------------------------------------------------------------------- */ + +static void +ls_R (GsfInput *input, char const *prefix) +{ + char const *name = gsf_input_name (input); + GsfInfile *infile = GSF_IS_INFILE (input) ? GSF_INFILE (input) : NULL; + gboolean is_dir = infile && gsf_infile_num_children (infile) > 0; + char *full_name; + char *new_prefix; + + if (prefix) { + char *display_name = name ? + g_filename_display_name (name) + : g_strdup ("?"); + full_name = g_strconcat (prefix, + display_name, + NULL); + new_prefix = g_strconcat (full_name, "/", NULL); + g_free (display_name); + } else { + full_name = g_strdup ("*root*"); + new_prefix = g_strdup (""); + } + + g_print ("%c %10" GSF_OFF_T_FORMAT " %s\n", + (is_dir ? 'd' : 'f'), + gsf_input_size (input), + full_name); + + if (is_dir) { + int i; + for (i = 0 ; i < gsf_infile_num_children (infile) ; i++) { + GsfInput *child = gsf_infile_child_by_index (infile, i); + /* We can get NULL here in case of file corruption. */ + if (child) { + ls_R (child, new_prefix); + g_object_unref (child); + } + } + } + + g_free (full_name); + g_free (new_prefix); +} + +static int +gsf_list (int argc, char **argv) +{ + int i; + + for (i = 0; i < argc; i++) { + char const *filename = argv[i]; + char *display_name; + GsfInfile *infile = open_archive (filename); + if (!infile) + return 1; + + if (i > 0) + g_print ("\n"); + + display_name = g_filename_display_name (filename); + g_print ("%s:\n", display_name); + g_free (display_name); + + ls_R (GSF_INPUT (infile), NULL); + g_object_unref (infile); + } + + return 0; +} + +/* ------------------------------------------------------------------------- */ + +static int +gsf_dump (int argc, char **argv, gboolean hex) +{ + char const *filename; + GsfInfile *infile; + int i; + int res = 0; + + if (argc < 2) + return 1; + + filename = argv[0]; + infile = open_archive (filename); + if (!infile) + return 1; + + for (i = 1; i < argc; i++) { + char const *name = argv[i]; + GsfInput *member = find_member (infile, name); + if (!member) { + char *display_name = g_filename_display_name (name); + g_print ("%s: archive has no member %s\n", + g_get_prgname (), display_name); + g_free (display_name); + res = 1; + break; + } + + if (hex) { + char *display_name = g_filename_display_name (name); + g_print ("%s:\n", display_name); + g_free (display_name); + } + gsf_input_dump (member, hex); + g_object_unref (member); + } + + g_object_unref (infile); + return res; +} + +static GsfDocMetaData * +get_meta_data (GsfInfile *infile, const char *filename) +{ + GsfDocMetaData *meta_data = gsf_doc_meta_data_new (); + + if (GSF_IS_INFILE_MSOLE (infile)) { + GsfInput *in; + GError *err; + + in = gsf_infile_child_by_name (infile, "\05SummaryInformation"); + if (NULL != in) { + err = gsf_msole_metadata_read (in, meta_data); + if (err != NULL) { + g_warning ("'%s' error: %s", filename, err->message); + g_error_free (err); + err = NULL; + } + g_object_unref (G_OBJECT (in)); + } + + in = gsf_infile_child_by_name (infile, "\05DocumentSummaryInformation"); + if (NULL != in) { + err = gsf_msole_metadata_read (in, meta_data); + if (err != NULL) { + g_warning ("'%s' error: %s", filename, err->message); + g_error_free (err); + err = NULL; + } + + g_object_unref (G_OBJECT (in)); + } + } + + return meta_data; +} + +static int +gsf_dump_props (int argc, char **argv) +{ + GsfInfile *infile; + GsfDocMetaData *meta_data; + char const *filename; + int res = 0; + int i; + + if (argc < 2) + return 1; + + filename = argv[0]; + infile = open_archive (filename); + if (!infile) + return 1; + + meta_data = get_meta_data (infile, filename); + + for (i = 1; i < argc; i++) { + const char *name = argv[i]; + GsfDocProp const *prop = + gsf_doc_meta_data_lookup (meta_data, name); + if (prop) { + if (argc > 2) + g_print ("%s: ", name); + gsf_doc_prop_dump (prop); + } else { + g_printerr (_("No property named %s\n"), name); + } + } + + g_object_unref (meta_data); + g_object_unref (infile); + return res; +} + +static void +cb_collect_names (gpointer key, + G_GNUC_UNUSED gpointer value, + gpointer user) +{ + const char *name = key; + GSList **names = user; + + *names = g_slist_prepend (*names, g_strdup (name)); +} + +static void +cb_print_names (const char *name) +{ + g_print ("%s\n", name); +} + +static int +gsf_list_props (int argc, char **argv) +{ + GsfInfile *infile; + GsfDocMetaData *meta_data; + char const *filename; + GSList *names = NULL; + + if (argc != 1) + return 1; + + filename = argv[0]; + infile = open_archive (filename); + if (!infile) + return 1; + + meta_data = get_meta_data (infile, filename); + gsf_doc_meta_data_foreach (meta_data, cb_collect_names, &names); + names = g_slist_sort (names, (GCompareFunc)strcmp); + g_slist_foreach (names, (GFunc)cb_print_names, NULL); + g_slist_free (names); + + g_object_unref (meta_data); + g_object_unref (infile); + return 0; +} + +/* ------------------------------------------------------------------------- */ + +int +main (int argc, char **argv) +{ + GOptionContext *ocontext; + GError *error = NULL; + char const *usage; + char const *cmd; + char const *me = (argv[0] ? argv[0] : "gsf"); + + g_set_prgname (me); + gsf_init (); + +#if 0 + bindtextdomain (GETTEXT_PACKAGE, gnm_locale_dir ()); + textdomain (GETTEXT_PACKAGE); + setlocale (LC_ALL, ""); +#endif + + usage = _("SUBCOMMAND ARCHIVE..."); + ocontext = g_option_context_new (usage); + g_option_context_add_main_entries (ocontext, gsf_options, GETTEXT_PACKAGE); + g_option_context_parse (ocontext, &argc, &argv, &error); + g_option_context_free (ocontext); + + if (error) { + g_printerr (_("%s\nRun '%s --help' to see a full list of available command line options.\n"), + error->message, me); + g_error_free (error); + return 1; + } + + if (show_version) { + g_print (_("gsf version %d.%d.%d\n"), + libgsf_major_version, libgsf_minor_version, libgsf_micro_version); + return 0; + } + + if (argc <= 1) { + g_printerr (_("Usage: %s %s\n"), me, usage); + return 1; + } + + cmd = argv[1]; + + if (strcmp (cmd, "help") == 0) + return gsf_help (argc - 2, argv + 2); + + if (strcmp (cmd, "list") == 0 || strcmp (cmd, "l") == 0) + return gsf_list (argc - 2, argv + 2); + + if (strcmp (cmd, "cat") == 0) + return gsf_dump (argc - 2, argv + 2, FALSE); + if (strcmp (cmd, "dump") == 0) + return gsf_dump (argc - 2, argv + 2, TRUE); + if (strcmp (cmd, "props") == 0) + return gsf_dump_props (argc - 2, argv + 2); + if (strcmp (cmd, "listprops") == 0) + return gsf_list_props (argc - 2, argv + 2); + + g_printerr (_("Run '%s help' to see a list subcommands.\n"), me); + return 1; +}